Mark,
On Thu, 17 Jan 2008 21:22:46 +0100, Mark Martinec <[EMAIL PROTECTED]> wrote: > Does the message when it reaches amavisd already contain a Received > header field inserted by your Exim? If so, it can be used in place > of your X-My-ClientAddr, and provides a standards-based solution. Yes, as detailed in the docs on the amavisd-new website, Exim processes the message, hands off to amavisd-new on the local machine, which the re-injects the message back into Exim to be sent on to its destination. You therefore end up with an initial header being added by Exim which looks a bit like this: ---- snip ---- Received: from [190.67.164.205] (helo=estacion03) by my-amavis-server.local with smtp (Exim 4.63) (envelope-from <[EMAIL PROTECTED]>) id 1JH0Cw-0007yR-1j for [EMAIL PROTECTED]; Mon, 21 Jan 2008 17:13:14 +0000 ---- snip ---- I did consider trying to read the IP from the headers but decided that it was probably easier to insert a custom header and get the info from there - being that the headers are parsed out by the existing code. > The amavisd 2.6.0 brings a more realiable and flexible parser > of Received header fields, so the following patch to 2.6.0-pre3 > puts it to good use when XFORWARD information is not available, > obtaining the IP address from the top (or the second) Received field. > (it also fixes a bug in sub get_header_field_body) Excellent! This is even better than my solution. Is this going to be included into the 2.6.0 release? If so then I'll wait for the stable release and upgrade then. Many thanks for this! Richard ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/
