On 31 Dec 2006, at 18:54, Victor Gras wrote: > John wrote: > >> So change the received_header_text in your exim.conf; see >> http://www.exim.org/exim-html-4.63/doc/html/spec_html/ >> ch14.html#id2597806 > > wow, you are right. It is so easy like adding: > > remote_smtp: > driver = smtp > headers_remove = Received > > and it works!. > > The second header with user IP it's absent but still the first header > can be received: > > X-Apparently-To: [EMAIL PROTECTED] via 123.12.12.12; Sun, 31 > Dec 2006 08:53:22 -0800 > X-Originating-IP: [70.55.125.5] > Authentication-Results: mta66.mail.mud.yahoo.com > from=myserver.net; domainkeys=neutral (no sig) > Received: from 70.55.125.5 (EHLO MAIL.MYSERVER.NET) (70.55.125.5) > by mta66.mail.mud.yahoo.com with SMTP; Sun, 31 Dec 2006 08:53:22 > -0800 > > the 70.55.125.5 is my server IP address, so it is exactly what I need. > > Now I'm trying to add a condition, so when $sender_helo_name = > "USER223" then headers will be removed and adding an special header. > On the contrary, all headers will be added. > > remote_smtp: > driver = smtp > headers_remove = Received > headers_add = ${if match{$sender_helo_name}{Received: /USER223/} > {X-special_header: 345gfd456hiouSDA}} > headers_add = ${if !~ {$sender_helo_name}{Received: /USER223/} > {Received: $headers_received}} > > > However it doesn't work :(
further to what I wrote before: 1) $headers_received? The specs tell me that this is $header_received: 2) you should follow John's advice and read that paragraph in the specs. Since received_header_text can be defined by you, just put your conditional in that expression. If you want to remove the added Received: header I suppose you can just define it to be empty. 3) You can add your X-special_header: at the DATA phase. Giuliano -- ## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
