I would like to be able to tell Exim (e.g. in the DATA ACL) that this
message is being received in submission mode and should have the usual
fix-ups -- adding missing headers etc. It's very hard to implement the
correct logic for From: and Sender: in an ACL. Local submission has the
local_from_check logic, which clearly needs adjusting for submission over
the network -- e.g. using $authenticated_id for the check (which would
also work for local submissions).
I'd like to replace all of
# If a message came from an authorized sender, do some header fix-ups
warn message = Message-ID: <E${message_id}@${primary_hostname}>
condition = $acl_m0
condition = ${if !def:h_Message-ID: {true} {false} }
warn message = Date: $tod_full
condition = $acl_m0
condition = ${if !def:h_Date: {true} {false} }
# XXX: We should remove an existing Sender: header in this case.
warn message = Sender: ${authenticated_id}@${extract \
{domain}{PARAM} {$value} {$qualify_domain} }
condition = ${if def:authenticated_id {true} {false} }
condition = ${if !def:h_Sender: {true} {false} }
warn message = From: ${authenticated_id}@${extract \
{domain}{PARAM} {$value} {$qualify_domain} }
condition = ${if def:authenticated_id {true} {false} }
condition = ${if !def:h_From: {true} {false} }
with something like
accept condition = $acl_m0
control = sumbission
($acl_m0 means the sender is authorized, either by IP address, SMTP AUTH,
or TLS certificate)
--
Tony Finch <dot@???>
http://dotat.at/