Rt-mailgate undefined server error for only one user

I’m having a sudden problem with rt-mailgate that is extremely
puzzling to me, and I’m hoping I can get some guidance as to where to
look to solve this problem.

I have mailgate set up on our local network so that rtq+programming-web@elmer.wgm
, for example, is configured to send the incoming e-mail as a new
ticket in the programming-web queue:

rtq: “|/usr/sbin/rt-mailgate --extension queue --action
correspond --url http://alpha/rt/ --debug”

(I added the --debug this morning hoping to get more information on
this problem)

I have a user whose messages to this address are returning the
following error in the maillog:

alpha postfix/local[1521]: EF498880DA: to=<rtq+programming-
web@elmer.wgm>, relay=local, delay=53746, delays=53563/0.08/0/183,
dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/
sbin/rt-mailgate: temp file is ‘/tmp/36HC1MaNJp’ /usr/sbin/rt-
mailgate: connecting to http://alpha/rt//REST/1.0/NoAuth/mail-gateway
An Error Occurred ================= 500 read timeout /usr/sbin/rt-
mailgate: undefined server error )

What happens is that a ticket is created but the message goes back
into the mail queue and tries again. This morning there were about 15
identical tickets and counting. The same thing happened yesterday.
It may also be limited to this single queue, as this user primarily
enters tickets via mailgate. The message appears to be submitted
three minutes before the error, so it clearly is timing out for some
reason, but I can’t figure out why.

Where it gets odd is, if I send a message to the queue using the same
to address (but my from address), it works fine:

alpha postfix/local[1641]: 9392A880DB: to=<rtq+programming-
web@elmer.wgm>, relay=local, delay=6.8, delays=0.43/0.09/0/6.3,
dsn=2.0.0, status=sent (delivered to command: /usr/sbin/rt-mailgate –
extension queue --action correspond --url http://alpha/rt/ --debug)

so it only appears to be this one user. I don’t see any errors in the
rt log, just that the ticket was successfully created. I have
$LogToFile set to ‘debug’. We both have the same permissions (and
“everyone” is able to create tickets. Of course, it’s not the ticket
creation that’s failing, obviously)

It’s possible it could be a mail agent difference I suppose, I’m using
Mac Mail and she is using Outlook.

Any ideas where I need to look to solve this?
Jon Baker
Information Technology
Willie George Ministries
1003 N 129th E Ave
Tulsa OK 74116
(918) 234-5656

I’ve narrowed it down to the Create Ticket command in Email.pm:

     my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
         Queue     => $SystemQueueObj->Id,
         Subject   => $Subject,
         Requestor => \@Requestors,
         Cc        => \@Cc,
         MIMEObj   => $Message
     );

If I comment out the MIMEObj line then the function returns without
issue. I’m thinking it is something wrong with my MIME parser, but I
don’t know the best way to go about fixing it - is there a perl module
that I should re-install?

If I set the timeout to 600 then it does seem to go through sometimes

  • but I know that letting it take 10 minutes implies there’s a deeper
    problem somewhere, I’m hoping someone can point me in the right
    direction to get this solved.

We updated to FC11 from FC10 on Friday, if that matters, although I
have a separate system that is also running RT that I’m able to send
the same message into without issue (I have successfully caught the
raw message and am able to attempt to send it through rt-mailgate via
the command line)
Jon Baker
Information Technology
Willie George Ministries
1003 N 129th E Ave
Tulsa OK 74116
(918) 234-5656

I’ve narrowed it down to the Create Ticket command in Email.pm:

    my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
        Queue     => $SystemQueueObj->Id,
        Subject   => $Subject,
        Requestor => \@Requestors,
        Cc        => \@Cc,
        MIMEObj   => $Message
    );

If I comment out the MIMEObj line then the function returns without
issue. I’m thinking it is something wrong with my MIME parser, but I
don’t know the best way to go about fixing it - is there a perl module
that I should re-install?

If you want to check your module versions, you can use make testdeps
from an RT tarball

If I set the timeout to 600 then it does seem to go through sometimes

  • but I know that letting it take 10 minutes implies there’s a deeper
    problem somewhere, I’m hoping someone can point me in the right
    direction to get this solved.

This sounds like you either have a very large attachment or very
complex message, but without seeing the contents of the message
its hard to guess.

We updated to FC11 from FC10 on Friday, if that matters, although I
have a separate system that is also running RT that I’m able to send
the same message into without issue (I have successfully caught the
raw message and am able to attempt to send it through rt-mailgate via
the command line)

I would look at the dep checking mentioned above first, as FC probably
messed with your perl and module versions

-kevin

Looks like this may indeed be a bug with MySQL 5.1:

http://bugs.mysql.com/bug.php?id=45559
Jon Baker
Information Technology
Willie George Ministries
1003 N 129th E Ave
Tulsa OK 74116
(918) 234-5656