[Mimedefang] When do added headers become visible?

Mike Batchelor mikebat at tmcs.net
Fri Jun 18 15:00:14 EDT 2004


I'm trying to add a X-Is-A-Bounce: 1 header to emails with a null sender, 
so that a custom SpamAssassin rule can use that header to help decide 
whether the message is a bounce or not.  In filter_begin, I add the header 
if $Sender is the null sender <>, and in filter_end I call SpamAssassin. 
However, the custom header does not appear to be present, even when the 
sender is null, because SpamAssassin does not trip the rule to detect it. 
If I add the header myself in the SMTP data segment, the SpamAssassin rule 
fires.

I've also tried adding 'HX-Mail-From: <$g>' to my sendmail.cf, so that 
Sendmail will add the X-Mail-From: <> header when the sender is null, but a 
SpamAssassin rule to catch this also fails to match anything when the 
sender is null.

header LOCAL_NULLSENDER X-Mail-From =~ /^<>$/
describe LOCAL_NULLSENDER It's the null sender
score LOCAL_NULLSENDER 0.01

So it looks like sendmail adds its headers just before handing off to the 
relay mailer, but what about Mimedefang?  Is there any way I can add a 
custom header in case of the null sender, prior to calling Mimedefang or 
SpamAssassin?   When do those added headers show up?

---
"The avalanche has already begun. It is too late for the pebbles to vote."
 -- Kosh



More information about the MIMEDefang mailing list