[Mimedefang] FW: filter for header line

MAYER Hans Hans.Mayer at iiasa.ac.at
Tue Sep 5 09:07:57 EDT 2017


Dear All, 

Many thanks for the replies to all of you. 
Now I have something to try. 

> ... Are you not using SpamAssassin? 

Yes, I am doing. 
But how can I generate an action in MD for example "action_discard()" ? 


Kind regards
Hans



-----Original Message-----
From: David Both [mailto:dboth at both.org] 
Sent: Tuesday, September 5, 2017 2:12 PM
To: mimedefang at lists.roaringpenguin.com; Benoit Panizzon <benoit.panizzon at imp.ch>; MAYER Hans <Hans.Mayer at iiasa.ac.at>
Subject: Re: [Mimedefang] filter for header line

I am curious. Why not just add a rule to /etc/mail/spamassassin/local.cf to match the desired header. Are you not using SpamAssassin?


On 09/05/2017 07:38 AM, Benoit Panizzon wrote:
> Dear Hans
>
>> I am looking for a possibility to filter for an existing header line.
>> I found a lot of examples where $Subject, $Sender and others can be
>> used. But I need the possibility to find a certain header line, for
>> example  X-Someinfo: Can someone point me to some examples.
>> I was searching at Google but obviously with the wrong keywords.
> I fear you have to do this the hard way by reading the HEADERS file
> from the spool directory:
>
> in filter_end, because this is the place where you get the content...
>
> if (open(HDRCHECK, "<./HEADERS")) {
> 	while(<HDRCHECK>) {
> 		if ($_ =~ /^X-Someinfo:[\t ]+(.*?)/ {
> 			$SomeinfoValue = $1;
> 		}
> 	}
> }
>
> -Benoît Panizzon-

-- 


*********************************************************
David P. Both, RHCE
Millennium Technology Consulting LLC
Raleigh, NC, USA
919-389-8678

dboth at millennium-technology.com

www.millennium-technology.com
www.Linux-Databook.info - Home of the DataBook for Linux
DataBook is a Registered Trademark of David Both
*********************************************************





More information about the MIMEDefang mailing list