procmail
[Top] [All Lists]

Re: Adding custom mail headers via a filter?

2002-10-15 06:41:50
At 16:43 2002-10-15 +0700, Robert Nicholson wrote:
sub reason {
        my $reason = $_[0];

        print $Headers;
        print "\n";
        print "X-Challenge-Reason: $reason\n";
        print "\n";
        print $Body;
}

Uh, where are the $Headers and $Body variables being defined? Why are you addding a newline after the headers? This obviously isn't the entire "filter".

I think what might be confusing the issue is I'm guessing that procmail doesn't
consider ? syntax ie.

#let filtmail do the rest
:0 HB
* ? $HOME/.filtmail/filtmail
$MAILDIR/copy

a "filter"

Correct - THAT IS NOT A FILTER. Where is the 'f' flag? Where is the *PIPE* to the filter?

:0f
| $HOME/.filtmail/filtmail

THAT will filter.

Will procmail let me change the content of a message that's sent through the * ? syntax?

That isn't a filter - that's piping the message to the program for evaluation - procmail ONLY pays attention to the return value - it doesn't replace the message text.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail