Re: [Mimedefang] check header for X- entry
Am Mittwoch, den 05.10.2016, 20:22 +0200 schrieb Marcus Schopen: > Am Mittwoch, den 05.10.2016, 20:02 +0200 schrieb Marcus Schopen: > > Hi, > > > > I'd like to check the header for "X-Greylist" entry in filter_end and if > > it exists with an expected contend write a message to maillog > > (md_graphdefang_log). But I can't find a function for parsing headers. > > Do I have to parse the entire message? > > Found an old mail form 2006 on the list, which pushed me in this > direction: > > my $greylisthdr = $entity->head->get('X-Greylist'); > md_graphdefang_log("greylist", "$greylisthdr", ""); > > Problem is now, that I have two "X-Greylist" headers and I need the > second one. Above grabs the first one and then quits. Answering myself: my $greylisthdr = $entity->head->get('X-Greylist', 1); Ciao Marcus ___ 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
Re: [Mimedefang] check header for X- entry
Am Mittwoch, den 05.10.2016, 20:02 +0200 schrieb Marcus Schopen: > Hi, > > I'd like to check the header for "X-Greylist" entry in filter_end and if > it exists with an expected contend write a message to maillog > (md_graphdefang_log). But I can't find a function for parsing headers. > Do I have to parse the entire message? Found an old mail form 2006 on the list, which pushed me in this direction: my $greylisthdr = $entity->head->get('X-Greylist'); md_graphdefang_log("greylist", "$greylisthdr", ""); Problem is now, that I have two "X-Greylist" headers and I need the second one. Above grabs the first one and then quits. Ciao Marcus ___ 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
[Mimedefang] check header for X- entry
Hi, I'd like to check the header for "X-Greylist" entry in filter_end and if it exists with an expected contend write a message to maillog (md_graphdefang_log). But I can't find a function for parsing headers. Do I have to parse the entire message? Ciao Marcus ___ 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