[rt-users] Custom Header for loop prevention

Mike Patterson mikep at uclink.berkeley.edu
Fri Oct 17 11:42:48 EDT 2003


>
>
> From: Phil Homewood <pdh at snapgear.com>
>
snip

>Abusing the loop prevention header for this would probably
>work, but it's really not how it's supposed to work. 
>
True, but the loop prevention header is already black and blue from our 
non-standards compliant mailclients :-) .
Do you know what value the header would recognize to not send mail?

>A better (?) "fix" might be to educate
>RT::Interface::Email::CheckForAutoGenerated() to check
>the Subject header.
>  
>
1) Ok, so I added the Vacation Test info to this page
/path-to-rt3/lib/RT/Interface/Email.pm

# {{{ sub CheckForAutoGenerated
sub CheckForAutoGenerated {
    my $head = shift;

    my $Precedence = $head->get("Precedence") || "" ;
    my $VacTest = $head->get("Subject") || "" ;
    if (($Precedence =~ /^(bulk|junk)/i) OR ($VacTest =~ /(Out of 
Office|vacation)/i)){
        return (1);
    }
    else {
        return (0);
    }     
}

2) I stopped and then started apache

3) Result, I send a test message (Subject: test) all mail doesn't seem 
to get in to create any tickets. 
/var/log/maillog

Oct 17 08:03:02 myserver sm-mta[5888]: h9HF2xOA005887: 
to="|/usr/local/rt3/bin/rt-mailgate --queue general --action correspond 
--url http://myserver.myorg.com/rt3/", ctladdr=<rt at myservermyorg.com> 
(26/0), delay=00:00:03, xdelay=00:00:02, mailer=prog, pri=30707, 
dsn=4.0.0, stat=Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL

4) When I undo my changes and stop and start the server again, then the 
mail gets through as normal. 
My Perl knowledge is obviously limited.  Do I need to register the 
module again somehow?
This same result seems to happen everytime I try an experiment on these 
modules.




More information about the rt-users mailing list