[rt-users] Bounce detection

Bruce Campbell bruce_campbell at ripe.net
Thu Mar 13 02:36:29 EST 2003


On Thu, 13 Mar 2003, Stewart James wrote:

> In short the files I modified were Interface/Email.pm Action/SendEmail.pm
> and rt-mailgate.
>
> Interface/Email.pm seemed to be used when an error occured and we needed
> to say go away. so I set a -f postmaster at mydomain.com so that all messages
> from errors could bounce to me.

You don't want to hard-code addresses inside the library files.  Please
consider using $RT::OwnerEmail (set in the RT2 configuration file
etc/config.pm, and can be added to the RT3 config files for the same
effect)

> Action/SendEmail.pm seemed to be called for generation of other messages
> so this is hacked to set a return path of bounce+ticket-#@mydomain.com

Again, try to avoid hard-coding site-specific information into your
library files, and grab them from the configuration file.

> rt-mailgate had a few lines added to figure out which ticket a bounce was
> from.
>
> finally I added a line to my sendmail aliases:
> bounce+*: "|/usr/lib/request-tracker/rt-mailgate --queue sysgroup --action
> comment"

There was a similar hack to do just this some time ago, which included the
relevant sendmail magic to supply the appropriate recipient address in the
command line option ( its more reliable if you are passed the address
through a --flag, rather than trying to figure it out by looking for a
'To' line in the message, which may not match ).

> I am hoping that others see my abouve hacks as viable in a production box,
> but more importantly, if there is a reason for the above to not work - I
> have only spent 2 hours with the RT code so my assumptions on how RT works
> may very well be up the duff!

'By George, I think you've got it' ;)

> > Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B             Operations/Security




More information about the rt-users mailing list