The issue of multiple copies which Duncan mentions below can lead to
problems when rt-mailgate fails if preventative measures are not
taken.

When procmail is configured to set EXITCODE to the rt-mailgate
return code as specified below and rt-mailgate fails, procmail decides
that recipe has failed and continues to try subsequent recipes in the
file. If none succeeds, it will default to the DEFAULT action which,
unless explicitly configured otherwise, is to put the message in the
user's spool file. After delivering the message to the spool file,
procmail exits and returns the value of EXITCODE to sendmail, causing
sendmail to requeue the message.

If RT is down for some time, a copy of the message is deposited in
the spool file on each retry. If there are many messages, it can
add up to a lot of disk space.

One solution to this problem is to set DEFAULT to /dev/null, i.e.,

DEFAULT=/dev/null

prior to the execution of the rt-mailgate recipes.

Gary

Duncan McEwan <[EMAIL PROTECTED]> wrote:
We also use procmail here (to filter spam out of our RT queues).  We
recently noticed that the default behaviour of procmail is to fail
silently (ie: return a status of 0) even if the rt-mailgate invocation
fails.  This meant that if for some reason our RT server was temporarily
unavailable any incomming email sent to it by rt-mailgate would be
lost (not get created as a ticket and no bounce back to the sender) :-(

So we changed our procmail recipes from

  :0
  |/usr/pkg/bin/rt-mailgate --queue bugs --action correspond --url ...

to

  :0
  EXITCODE=|/usr/pkg/bin/rt-mailgate --queue bugs ... ; echo $?

This causes procmail to return rt-mailgate's return code (ie: EX_TEMPFAIL)
back to sendmail.

We did just encounter one situation where the same ticket got injected
into an RT queue multiple times because it stayed in our sendmail queue
even though RT had successfully created the ticket.  We assume there
must be some situation where rt-mailgate can return EX_TEMPFAIL even
though it the ticket has been created.  Although this is a little annoying
we figured it wasn't as bad as losing tickets.  If it happens again we
will investigate in more detail.


--
Gary Hall [EMAIL PROTECTED]   | Voice (604) 291-5925
Faculty of Applied Sciences | Fax   (604) 291-5404
Simon Fraser University     |
Burnaby, B.C.  V5A 1S6      |
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Reply via email to