On 7/25/06, Adam Gibson <[EMAIL PROTECTED]> wrote: > Tuan Van wrote: > > Adam Gibson wrote: > > > >> Is it possible for amavisd-milter to add the headers to the top of the > >> headers that are already there instead of putting them at the bottom? > >> Some header signing techniques like dkim break if headers are modified > >> at the bottom. > >> > >> I wonder if this is a milter api limit. > > > > I think amavisd-new is the one that adds X-* headers. From > > amavisd-new-2.4.2/RELEASE_NOTES: > > ... > > INCOMPATIBLE CHANGES SINCE 2.3.3: > > ... > > - inserted header fields like X-Amavis-* and X-Spam-* are now _prepended_ to > > mail header instead of being appended, and occupy position just above the > > inserted Received header field; this pairing with Received makes it easier > > to identify which MTA/content filter inserted them, makes it consistent > > with position of Resent-* header fields as required by RFC 2822, and > > avoids the possibility of breaking DomainKeys and similar mail signing > > schemes. > > SpamAssassin implemented the same change with 3.1.0. > > To achieve former behaviour, specify: $append_header_fields_to_bottom=1; > > ... > > > > > That is only for the non-milter mode of amavisd-new from my > understanding. For the milter mode of amavisd-new it is the milter > (amavisd-new in this case) that actually inserts the headers. If you > use the amavisd-milter and check your headers after an upgrade of > amavisd-new to 2.4.2 you will see that the headers are still appended > after all the others.
http://www.ijs.si/software/amavisd/README.protocol.txt says: addheader=hdr_head hdr_body ... Libmilter does not allow to specify if the new header field should be inserted to the top or to the bottom of the mail header, it is assumed the header field will be appended at the end. and the comment in sendmail sources for header.c/addheader() which is called from smfi_addheader says: ADDHEADER -- add a header entry to the end of the queue. but addheader() adds the header BEFORE first occurence of the header with the same name. I have checked sendmail sources from version 8.9.0 to 8.13. and this behavior has remained unchanged. There is a problem when amavisd-new adds some header and then deletes the same header. It occurres when amavisd-new adds new X-Amavis-* and X-Spam-* headers and then deletes old X-Amavis-* and X-Spam-* headers. Quick fix for this bug can be found at http://sourceforge.net/mailarchive/forum.php?thread_id=23449209&forum_id=45237 But this patch adds new headers to the end of all headers which isn't a good idea. I have sent this mail to amavis-user list too, because we need to change amavisd-new functionality to make the AM.PDP command addheader to take into account that smfi_addheader adds new header to the top. Another possibility is to use the smfi_insheader which was introduced in sendmail 8.13. P. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
