Richard,

> Sometimes the arriving messages from our ISP have multiple X-Spam-Flag
> lines from multiple MTA's it has been rerouted through. [...]
> I have looked at the sub get_header_field.
> If i want to select the first X-Spam-Flag. (top one - last MTA)
> I use : get_header_field_body('X-Spam-Flag',0)

Yes, the get_header_field_body('X-Spam-Flag',0) would provide
the topmost header field X-Spam-Flag.

> But what if I don't specify the : '0'
> If i understand the sub get_header_field, it uses default the 0 ?

No, if the index is not specified it defaults to undef, which for
this subroutine is made equivalent to -1, i.e. the most bottom
header field. I chose this default because it is consistent
with how DKIM verification algorithm searches for header
fields: bottom-up.

> So default it uses the first X-Spam-Flag line it finds from the top to
> bottom ? Am i correct ?

Explicitly specify a 0 if you want the topmost header field.

  Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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/

Reply via email to