Q: rt-mailgate: "exited with EX_TEMPFAIL"

Greetings,

I am running RT 3.4.5 on FreeBSD and am having a sendmail or rt-mailgate 

problem. No mail manages to go in or come out of rt (although the web
interface works just fine otherwise).

I can telnet to sendmail and run the usual tests, and I can send a 

message to sendmail from a client, which receives the report that the email was
sent without errors. The maillog, however, is filled with EX_TEMPFAIL messages
from the mail failing to be accepted by rt-mailgate:

sm-mta[663]: l1H3MNqa000662: to=“|/usr/libexec/sm.bin/rt-mailgate --queue unassigned --action
correspond --url https://removed.for.privacy”,
ctladdr=help@removed.for.privacy (26/0), delay=00:01:16, xdelay=00:01:16,
mailer=prog, pri=30717, dsn=4.0.0, stat=Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL

I have tried changing the mail/aliases file for sendmail to route messages to
rt-mailgate directly (not through smrsh) and the error is virtually the same.
(yes, I ran newaliases after changing the aliases file)

If I envoke rt-mailgate directly, it generates no errors and listens politely
while I dump in well formatted mail, but nothing seems to come from this.
(Perhaps I am missing some needed option).

I have turned on debugging in RT, but have not seen any enlightening messages
that could point me in the right direction.

Does anyone have some pointers or a debugging procedure that could help me track
this down?

Thanks,

John H. Nyhuis
IT Manager
Dept. of Pediatrics
HS RR541C, Box 356320
University of Washington
Desk: (206)-685-3884
jnyhuis@u.washington.edu

Note that rt-mailgate uses LWP to make a web connection.
It inserts the mail through the web, not directly into the database.
Be sure your RT web server is configured to allow connections
from the machine running rt-mailgate. Also, I noticed your
url had ‘https’. Dont’ know if there could be issues there.

Anyway, I’m guessing you won’t see any RT error messages
because the process is stopping at the web server, not making
it into RT.

I’d start by adding ‘–debug’ to the rt-mailgate command line,
and run it by hand.

bobg

Well, following this lead, I rebuilt LWP and all the other perl modules,
and ensured that LWP was compiled with SSL support. Also added --debug to the
aliases file so every time sendmail passes a message to rt-mailgate, it should
give me useful logs, but still no luck. Apache is not logging anything exciting
either. Thanks for trying to help.

Thanks,

John H. Nyhuis
IT Manager
Dept. of Pediatrics
HS RR541C, Box 356320
University of Washington
Desk: (206)-685-3884
jnyhuis@u.washington.eduOn Sat, 17 Feb 2007, Bob Goldstein wrote:

Note that rt-mailgate uses LWP to make a web connection.
It inserts the mail through the web, not directly into the database.
Be sure your RT web server is configured to allow connections
from the machine running rt-mailgate. Also, I noticed your
url had ‘https’. Dont’ know if there could be issues there.

Anyway, I’m guessing you won’t see any RT error messages
because the process is stopping at the web server, not making
it into RT.

I’d start by adding ‘–debug’ to the rt-mailgate command line,
and run it by hand.

bobg

Greetings,

I am running RT 3.4.5 on FreeBSD and am having a sendmail or rt-mailgat
e
problem. No mail manages to go in or come out of rt (although the web
interface works just fine otherwise).

I can telnet to sendmail and run the usual tests, and I can send a
message to sendmail from a client, which receives the report that the email wa
s
sent without errors. The maillog, however, is filled with EX_TEMPFAIL message
s
from the mail failing to be accepted by rt-mailgate:

sm-mta[663]: l1H3MNqa000662: to=“|/usr/libexec/sm.bin/rt-mailgate --queue unas
signed --action
correspond --url https://removed.for.privacy”,
ctladdr=help@removed.for.privacy (26/0), delay=00:01:16, xdelay=00:01:16,
mailer=prog, pri=30717, dsn=4.0.0, stat=Deferred: prog mailer (/bin/sh) exited
with EX_TEMPFAIL

I have tried changing the mail/aliases file for sendmail to route messages to
rt-mailgate directly (not through smrsh) and the error is virtually the same.
(yes, I ran newaliases after changing the aliases file)

If I envoke rt-mailgate directly, it generates no errors and listens politely
while I dump in well formatted mail, but nothing seems to come from this.
(Perhaps I am missing some needed option).

I have turned on debugging in RT, but have not seen any enlightening messages
that could point me in the right direction.

Does anyone have some pointers or a debugging procedure that could help me tra
ck
this down?

Thanks,

John H. Nyhuis
IT Manager
Dept. of Pediatrics
HS RR541C, Box 356320
University of Washington
Desk: (206)-685-3884
jnyhuis@u.washington.edu


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Hi, I am encountering the same issue but don’t see a solution here. I am RT 4.4.4.

Please let me know if anyone has any pointers.

thank you

You can try from the command line what happens and what is the outcome. Bother with the mail system after this works. Try something like this:

/opt/rt4/bin/rt-mailgate --queue 'queue-name' --action correspond --debug --url http://localhost < mail.txt

Mail.txt is the saved mail body with headers. This should tell you what’s wrong. Maybe you find some clue in /var/log/apache2 files or in /opt/rt4/var/log/rt.log if you have configured RT logging to a file. Something like this in RT_SiteConfig.pm:

Set($LogToFile , 'debug'); #debug is very noisy
Set($LogDir, '/opt/rt4/var/log/');
Set($LogToFileNamed , "rt.log"); #log to rt.log
2 Likes

Petr,

THANK YOU so much!

I’ve been getting this error for maybe 10 years now, and I hadn’t thought to try doing the input redirection from a file. When I did, I got this:

HTTP request failed: 413 Request Entity Too Large. Your webserver logs may have more information or there may be a network problem.

I haven’t put 2 and 2 together; I see the 413s in there now! After this, it was just a matter of updating the web server config so that its maximum file size matched my RT configuration and I’m set.

1 Like