Giving a mail source as parameter to rt-mailgate through command line

Hi all,

Is it possible to run rt-mailgate through the command line wherein
the mail message source is passed as a parameter instead of running it
through a MTA?

I have to fine tune my system to read mails from a mailbox and give
it to RT directly rather than going through a MTA.

I have tried the following in a perl script,
"/opt/rt3/bin/rt-mailgate --queue ‘Myqueue’ --action correspond --url
http://192.168.2.3:4000/’ < $string

$string being the complete message source

But this returns the following error -
sh: Return-Path:: No such file or directory
sh: X-Sieve:: command not found
sh: -c: line 3: syntax error near unexpected token (l' 'h: -c: line 3: Received: from localhost (localhost [127.0.0.1])

Please suggest …

Regards,
Ritu

NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134

MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in

Pragatee: Integrated Server-Software Suite: http://www.pragatee.com

Emergic Freedom: Server-centric Computing: http://www.emergic.com

BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com

Deeshaa: Rural Development: http://www.deeshaa.com

Rajesh Jain’s Weblog on Technology: http://www.emergic.org

Put the message in a file and redirect the file into rt-mailgate.On Mon, 23 Feb 2004, Ritu Khetan wrote:

Hi all,

Is it possible to run rt-mailgate through the command line wherein
the mail message source is passed as a parameter instead of running it
through a MTA?

I have to fine tune my system to read mails from a mailbox and give
it to RT directly rather than going through a MTA.

I have tried the following in a perl script,
"/opt/rt3/bin/rt-mailgate --queue ‘Myqueue’ --action correspond --url
http://192.168.2.3:4000/’ < $string

$string being the complete message source

But this returns the following error -
sh: Return-Path:: No such file or directory
sh: X-Sieve:: command not found
sh: -c: line 3: syntax error near unexpected token (l' 'h: -c: line 3: Received: from localhost (localhost [127.0.0.1])

Please suggest …

Regards,
Ritu


NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134

MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in

Pragatee: Integrated Server-Software Suite: http://www.pragatee.com

Emergic Freedom: Server-centric Computing: http://www.emergic.com

BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com

Deeshaa: Rural Development: http://www.deeshaa.com

Rajesh Jain’s Weblog on Technology: http://www.emergic.org

Ritu Khetan wrote:

Is it possible to run rt-mailgate through the command line wherein
the mail message source is passed as a parameter instead of running it
through a MTA?

Sure. (Well, message passed on stdin, not as a parameter…)

"/opt/rt3/bin/rt-mailgate --queue ‘Myqueue’ --action correspond --url
http://192.168.2.3:4000/’ < $string

$string being the complete message source

You either want to “echo $string | rt-mailgate”, or run
“rt-mailgate < messagefile”. Or similar.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - A CyberGuard Company

Thanks! Just didnt think of this…

Regards,
RituOn Mon, 2004-02-23 at 18:29, asterr wrote:

Put the message in a file and redirect the file into rt-mailgate.

On Mon, 23 Feb 2004, Ritu Khetan wrote:

Hi all,

Is it possible to run rt-mailgate through the command line wherein
the mail message source is passed as a parameter instead of running it
through a MTA?

I have to fine tune my system to read mails from a mailbox and give
it to RT directly rather than going through a MTA.

I have tried the following in a perl script,
"/opt/rt3/bin/rt-mailgate --queue ‘Myqueue’ --action correspond --url
http://192.168.2.3:4000/’ < $string

$string being the complete message source

But this returns the following error -
sh: Return-Path:: No such file or directory
sh: X-Sieve:: command not found
sh: -c: line 3: syntax error near unexpected token (l' 'h: -c: line 3: Received: from localhost (localhost [127.0.0.1])

Please suggest …

Regards,
Ritu


NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134

MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in

Pragatee: Integrated Server-Software Suite: http://www.pragatee.com

Emergic Freedom: Server-centric Computing: http://www.emergic.com

BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com

Deeshaa: Rural Development: http://www.deeshaa.com

Rajesh Jain’s Weblog on Technology: http://www.emergic.org

NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134

MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in

Pragatee: Integrated Server-Software Suite: http://www.pragatee.com

Emergic Freedom: Server-centric Computing: http://www.emergic.com

BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com

Deeshaa: Rural Development: http://www.deeshaa.com

Rajesh Jain’s Weblog on Technology: http://www.emergic.org