[rt-users] How I setup procmail+fetchmail for RT

Duncan McEwan duncan at mcs.vuw.ac.nz
Tue Jan 6 17:14:10 EST 2009


> I thought I would share with others how I setup procmail to filter out
> emails on my RT 3.6.5 system.

We also use procmail to filter out email before it reaches mailgate,
although we run it directly from sendmail's alias file rather that needing
to use fetchmail.

> ...
> 
> :O
> * ^TO.*rt at mydomain.com
> |/usr/sbin/rt-mailgate --queue "CustomerSupport" --action correspond
> --url http://my-rt-url.com/
> ...

The other thing we do slightly differently is that we invoke the rt-mailgate
from our procmail file as follows:

:0
EXITCODE=|/usr/pkg/bin/rt-mailgate --queue bugs --action correspond --url http://my-rt-url/; echo $?

The reason we did it this way was that we found procmail wasn't passing back
the exit code of the rt-mailgate to sendmail.  So if our rt server was down
and rt-mailgate returned a temporary failure sendmail wouldn't see this and
the email would be dropped.

I'm not sure whether you could have a similar problem with fetchmail.

Also, this was with whatever version of procmail we were running at the time
we started doing this.  It's quite possible that its no longer required, but
I've never found the time to look at it again.  Though given that the version
we're running is v3.22, which seems to be the latest, but which is quite old,
I suspect that nothing will have changed...

Duncan







More information about the rt-users mailing list