Hi Andreas, > The milter API knows two ways to add header: > 1) https://www.milter.org/developers/api/smfi_addheader > 2) https://www.milter.org/developers/api/smfi_insheader > > insheader allow to specify a position. Position 0 is special: "Topmost". > I found that many milter use position 1, other use 0. > > With milters calling insheader and hdridx=1 I never saw the problem you > described.
the problem came up with amavis, because I have this in the config:
$allowed_added_header_fields{lc('Received')} = 0;
$allowed_added_header_fields{lc('X-Virus-Scanned')} = 0;
$allowed_added_header_fields{lc('X-Spam-Flag')} = 0;
$allowed_added_header_fields{lc('X-Spam-Score')} = 0;
$allowed_added_header_fields{lc('X-DSPAM-Result')} = 1;
$allowed_added_header_fields{lc('X-DSPAM-Confidence')} = 1;
$allowed_added_header_fields{lc('X-DSPAM-Probability')} = 1;
$remove_existing_x_scanned_headers = 1;
$remove_existing_spam_headers = 1;
$allow_fixing_improper_header_folding = 1;
$allow_fixing_long_header_lines = 1;
With these flags, amavis only inserts the X-Spam-Status after it finishes. If a
milter does not show the first header, amavis gets lost… That was the reason I
came here :-)
As a workaround, I have enabled X-Spam-Flag and X-Spam-Score. The first gets
lost again, but I don’t care (at the moment).
PM @Andreas: Feel free to call me. Milter has to do with OpenDKIM ;-)
Kind regards
-Christian Rößner
--
[*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
signature.asc
Description: Message signed with OpenPGP using GPGMail
