[exim] received header question

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Pius Winkler
Dátum:  
Címzett: Exim-users
Tárgy: [exim] received header question
Hi,

having some issues with the added received header lines.
The situation is that i added a virus filter on a second server, but the
mails get rerouted to the filterserver:

Router:
smtp_proxy:
driver = manualroute
condition = "${if or {{eq {$interface_port}{10026}} \\
{eq {\$received_protocol}{spam-scanned}} \\
}{0}{1}}"
transport = smtp_proxy
route_list = * 1.2.3.4::10025
self = send

Transport:
smtp_proxy:
driver = smtp
port = 10025
delay_after_cutoff = false
allow_localhost

So after the mail is received on port 25, it gets rerouted to the filter
server on port 10025 and the filter server sends it back the port 10026
where exim is listening (daemon_smtp_ports = 25 : 10026).
The mail gets received lines when it first arrives on port 25 and again
when it comes back from filtering and thats something i don't want, the
internal filtering should not appear in the mailheaders.
I'd like to remove the received lines which are added when the mail
arrives at port 10026. I thought it might be possible with ACLs but it
seems that there is no modifier to execute something like the following:

${sg{$h_received:}{\Nfrom.*1.2.3.4.*\n.*\n.*\n.*\n.*\n\N}{}}

I can't use "remove_header" with "Received" because that just deletes
any received line in the mail. I tried doing it, than use the sg with
add_header but the result isn't really what i expected (the added header
isn't in the right position).
Is there any way modifing a received line in place (without removing and
adding)? Is there maybe a way making received_header_text dynamic (empty
when mail gets received on port 10026)? Any other way i didn't think of yet?

Regards,

Pius Winkler