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:db...@both.org] 
Sent: Tuesday, September 5, 2017 2:12 PM
To: mimedefang@lists.roaringpenguin.com; Benoit Panizzon 
<benoit.paniz...@imp.ch>; MAYER Hans <hans.ma...@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

db...@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
*********************************************************


_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to