Understanding mailgate

I am trying to get the mailgate on my test rt system set up without
interfering with the production system (which has the front end on one
system and the database on another). Unfortunately, the system I
inherited does not do things exactly as in the README file. The portion
added to /etc/aliases for the production system looks like this:

rt: rt@rt.progeny.com
rt-comment: rt-comment@rt.progeny.com

support: support@rt.progeny.com
support-comment: support-comment@rt.progeny.com

custserv: custserv@rt.progeny.com
custserv-comment: custserv-comment@rt.progeny.com

sysadmin: sysadmin@rt.progeny.com
sysadmin-comment: sysadmin-comment@rt.progeny.com

sales: sales@rt.progeny.com
sales-comment: sales-comment@rt.progeny.com

I want to create aliases for my test system without interfering with the
existing ones, so I added the following:

rt2: rt2@rt.progeny.com
rt2-comment: rt2-comment@rt.progeny.com

support2: support2@rt.progeny.com
support2-comment: support2-comment@rt.progeny.com

custserv2: custserv2@rt.progeny.com
custserv2-comment: custserv2-comment@rt.progeny.com

sysadmin2: sysadmin2@rt.progeny.com
sysadmin2-comment: sysadmin2-comment@rt.progeny.com

sales2: sales2@rt.progeny.com
sales2-comment: sales2-comment@rt.progeny.com

I then went to the production rt system and copied the /etc/aliases file
from it to the rt test system. In production, it contained the following:

rt: "| /opt/rt3/bin/rt-mailgate --queue General --action correspond
–url http://rt.progeny.com/"
rt-comment: “| /opt/rt3/bin/rt-mailgate --queue General --action comment
–url http://rt.progeny.com/

support: "| /opt/rt3/bin/rt-mailgate --queue Support --action correspond
–url http://rt.progeny.com/"
support-comment: “| /opt/rt3/bin/rt-mailgate --queue Support --action
comment --url http://rt.progeny.com/

custserv: "| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action correspond --url http://rt.progeny.com/"
custserv-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action comment --url http://rt.progeny.com/

sysadmin: "| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’
–action correspond --url http://rt.progeny.com/"
sysadmin-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘System
Administration’ --action comment --url http://rt.progeny.com/

sales: "| /opt/rt3/bin/rt-mailgate --queue Sales --action correspond
–url http://rt.progeny.com/"
sales-comment: “| /opt/rt3/bin/rt-mailgate --queue Sales --action
comment --url http://rt.progeny.com/

which I changed to:

rt2: "| /opt/rt3/bin/rt-mailgate --queue General --action correspond
–url http://testrt.progeny.com/"
rt2-comment: “| /opt/rt3/bin/rt-mailgate --queue General --action
comment --url http://testrt.progeny.com/

support2: "| /opt/rt3/bin/rt-mailgate --queue Support --action
correspond --url http://testrt.progeny.com/"
support2-comment: “| /opt/rt3/bin/rt-mailgate --queue Support --action
comment --url http://testrt.progeny.com/

custserv2: "| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action correspond --url http://testrt.progeny.com/"
custserv2-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘Customer
Service’ --action comment --url http://testrt.progeny.com/

sysadmin2: "| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’
–action correspond --url http://testrt.progeny.com/"
sysadmin2-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘System
Administration’ --action comment --url http://testrt.progeny.com/

sales2: "| /opt/rt3/bin/rt-mailgate --queue Sales --action correspond
–url http://testrt.progeny.com/"
sales2-comment: “| /opt/rt3/bin/rt-mailgate --queue Sales --action
comment --url http://testrt.progeny.com/

I reran newaliases on my mail server and on the test rt system. I then
tested it by sending a mail to rt2@progeny.com which I hoped would get
piped into mailgate on the new system , but it didn’t work. I tried the
following from the command line:

cat “Message to go to RT” | /opt/rt3/bin/rt-mailgate --queue General
–action correspond --url http://testrt.progeny.com/

but this didn’t work either. Am I misunderstanding how the mailgate
works? Is there some glaring error in my logic here?

Vicki

Hello Vicki,

I believe that you are forwarding all those emails to your production
server (rt.progeny.com) instead of some which you want to go to you test
server. Deducting from your email that your test server is
testrt.progeny.com, then have

rt2: rt2@rt.progeny.com
rt2-comment: rt2-comment@rt.progeny.com

as

rt2: rt2@testrt.progency.com
rt2-comment: rt2-comment@testrt.progeny.com

Hope it helps.

AnthonyOn Tue, 19 Apr 2005, Vicki Stanfield wrote:

I am trying to get the mailgate on my test rt system set up without
interfering with the production system (which has the front end on one
system and the database on another). Unfortunately, the system I
inherited does not do things exactly as in the README file. The portion
added to /etc/aliases for the production system looks like this:

rt: rt@rt.progeny.com
rt-comment: rt-comment@rt.progeny.com

support: support@rt.progeny.com
support-comment: support-comment@rt.progeny.com

custserv: custserv@rt.progeny.com
custserv-comment: custserv-comment@rt.progeny.com

sysadmin: sysadmin@rt.progeny.com
sysadmin-comment: sysadmin-comment@rt.progeny.com

sales: sales@rt.progeny.com
sales-comment: sales-comment@rt.progeny.com


I want to create aliases for my test system without interfering with the
existing ones, so I added the following:

rt2: rt2@rt.progeny.com
rt2-comment: rt2-comment@rt.progeny.com

support2: support2@rt.progeny.com
support2-comment: support2-comment@rt.progeny.com

custserv2: custserv2@rt.progeny.com
custserv2-comment: custserv2-comment@rt.progeny.com

sysadmin2: sysadmin2@rt.progeny.com
sysadmin2-comment: sysadmin2-comment@rt.progeny.com

sales2: sales2@rt.progeny.com
sales2-comment: sales2-comment@rt.progeny.com


I then went to the production rt system and copied the /etc/aliases file
from it to the rt test system. In production, it contained the following:

rt: "| /opt/rt3/bin/rt-mailgate --queue General --action correspond
–url http://rt.progeny.com/"
rt-comment: “| /opt/rt3/bin/rt-mailgate --queue General --action comment
–url http://rt.progeny.com/

support: "| /opt/rt3/bin/rt-mailgate --queue Support --action correspond
–url http://rt.progeny.com/"
support-comment: “| /opt/rt3/bin/rt-mailgate --queue Support --action
comment --url http://rt.progeny.com/

custserv: "| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action correspond --url http://rt.progeny.com/"
custserv-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action comment --url http://rt.progeny.com/

sysadmin: "| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’
–action correspond --url http://rt.progeny.com/"
sysadmin-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘System
Administration’ --action comment --url http://rt.progeny.com/

sales: "| /opt/rt3/bin/rt-mailgate --queue Sales --action correspond
–url http://rt.progeny.com/"
sales-comment: “| /opt/rt3/bin/rt-mailgate --queue Sales --action
comment --url http://rt.progeny.com/

which I changed to:

rt2: "| /opt/rt3/bin/rt-mailgate --queue General --action correspond
–url http://testrt.progeny.com/"
rt2-comment: “| /opt/rt3/bin/rt-mailgate --queue General --action
comment --url http://testrt.progeny.com/

support2: "| /opt/rt3/bin/rt-mailgate --queue Support --action
correspond --url http://testrt.progeny.com/"
support2-comment: “| /opt/rt3/bin/rt-mailgate --queue Support --action
comment --url http://testrt.progeny.com/

custserv2: "| /opt/rt3/bin/rt-mailgate --queue ‘Customer Service’
–action correspond --url http://testrt.progeny.com/"
custserv2-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘Customer
Service’ --action comment --url http://testrt.progeny.com/

sysadmin2: "| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’
–action correspond --url http://testrt.progeny.com/"
sysadmin2-comment: “| /opt/rt3/bin/rt-mailgate --queue ‘System
Administration’ --action comment --url http://testrt.progeny.com/

sales2: "| /opt/rt3/bin/rt-mailgate --queue Sales --action correspond
–url http://testrt.progeny.com/"
sales2-comment: “| /opt/rt3/bin/rt-mailgate --queue Sales --action
comment --url http://testrt.progeny.com/


I reran newaliases on my mail server and on the test rt system. I then
tested it by sending a mail to rt2@progeny.com which I hoped would get
piped into mailgate on the new system , but it didn’t work. I tried the
following from the command line:

cat “Message to go to RT” | /opt/rt3/bin/rt-mailgate --queue General
–action correspond --url http://testrt.progeny.com/

but this didn’t work either. Am I misunderstanding how the mailgate
works? Is there some glaring error in my logic here?

Vicki


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

RT Administrator and Developer training is coming to your town soon! (Boston, San Francisco, Austin, Sydney) Contact training@bestpractical.com for details.

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

The problem is with your test aliases on your mail server.

rt2: rt2@rt.progeny.com
rt2-comment: rt2-comment@rt.progeny.com

These aliases are sending your rt mail to your production rt server.

From what you sent, I’m gessing you should instead have:

rt2: rt2@testrt.progeny.com
rt2-comment: rt2-comment@testrt.progeny.com

You should can even avoid the mail server middleman and just email
rt2@testrt.progeny.com

jbw

I am trying to get the mailgate on my test rt system set up without
interfering with the production system (which has the front end on one
system and the database on another). Unfortunately, the system I
inherited does not do things exactly as in the README file. The portion
added to /etc/aliases for the production system looks like this:

[…]

cat “Message to go to RT” | /opt/rt3/bin/rt-mailgate --queue General
–action correspond --url http://testrt.progeny.com/

What message you get when you add --debug to it?

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"…there are two kinds of people: those who work and those who take the credit…try
to be in the first group;…less competition there." - Indira Gandhi

cat “Message to go to RT” | /opt/rt3/bin/rt-mailgate --queue General

–action correspond --url http://testrt.progeny.com/

What message you get when you add --debug to it?

I changed the rt to rttest as appropriate. But I still get no mail into the test rt setup. I added --debug to the command line attempt though and got this:

Connecting to http://rttest.progeny.com/REST/1.0/NoAuth/mail-gateway at /opt/rt3/bin/rt-mailgate line 99, <> chunk 1.
not ok - Ticket creation failed at /opt/rt3/bin/rt-mailgate line 108, <> chunk 1.

What is going on here? Is there some config thing that I have missed?

Vicki

The original message was received at Tue, 19 Apr 2005 15:51:51 -0500
from morimoto.progeny.com [192.168.1.53]

----- The following addresses had permanent fatal errors -----
"| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’ --action correspond --url http://rttest.progeny.com/"
(reason: Service unavailable)
(expanded from: sysadmin2@rttest.progeny.com)

----- Transcript of session follows -----
smrsh: “rt-mailgate” not available for sendmail programs (stat failed)
554 5.0.0 Service unavailable

I haven’t followed this thread, but it sounds like a typical sendmail
issue.

You will need to place a symlink to rt-mailgate in /etc/smrsh/. E.g.

ln -s /opt/rt3/bin/rt-mailgate /etc/smrsh/rt-mailgate

Sendmail tries to be very picky about the programs it will allow
itself to run for very good security reasons. Only programs that are
copied or symlinked to /etc/smrsh are runnable. Sendmail strips off the
leading path information to whatever programs are listed in your aliases
and replaces it with /etc/smrsh, so this kind of alias is acceptable:

rt: “|rt-mailgate --queue it-support --action correspond --debug --url
http://your.host.here/rt/

-brian

rt-users-bounces@lists.bestpractical.com wrote:

Brian W. Spolarich wrote:

I haven’t followed this thread, but it sounds like a typical sendmail
issue.

You will need to place a symlink to rt-mailgate in /etc/smrsh/. E.g.

ln -s /opt/rt3/bin/rt-mailgate /etc/smrsh/rt-mailgate

Sendmail tries to be very picky about the programs it will allow
itself to run for very good security reasons. Only programs that are
copied or symlinked to /etc/smrsh are runnable. Sendmail strips off the
leading path information to whatever programs are listed in your aliases
and replaces it with /etc/smrsh, so this kind of alias is acceptable:

rt: “|rt-mailgate --queue it-support --action correspond --debug --url
http://your.host.here/rt/

-brian

rt-users-bounces@lists.bestpractical.com wrote:

----- The following addresses had permanent fatal errors -----
"| /opt/rt3/bin/rt-mailgate --queue ‘System Administration’
–action correspond --url http://rttest.progeny.com/"
(reason: Service unavailable)
(expanded from: sysadmin2@rttest.progeny.com)

----- Transcript of session follows -----
smrsh: “rt-mailgate” not available for sendmail programs (stat
failed) 554 5.0.0 Service unavailable

That was it! Thanks.

Vicki