[Mimedefang] filter for header line

Benoit Panizzon benoit.panizzon at imp.ch
Tue Sep 5 07:38:46 EDT 2017


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-
-- 
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________




More information about the MIMEDefang mailing list