[Pkg-exim4-users] Is this at all possible?
Magnus Holmgren
holmgren at lysator.liu.se
Sat Jul 15 15:33:56 UTC 2006
On Saturday 15 July 2006 12:25, Neil Briscoe took the opportunity to write:
> A helpful response, thankyou.
>
> This is the router I've concocted on paper.
>
> smart_route:
> driver = manualroute
> transport = remote_smtp
> senders = +ems_domains
> route_list = !+local_domains post8a:post8b
This is prettier:
smart_route:
driver = manualroute
transport = remote_smtp
domains = !+local_domains
senders = +ems_domains
route_list = * post8a:post8b
But there are issues still.
1. senders needs an address list, not a domain list. You can use
condition = ${if match_domain {$sender_address_domain}{+ems_domains}}
instead of the senders condition.
2. Can users forward mail? In that case you might want to base the routing
decision on who forwarded it. One way is through $parent_domain.
3. Can users, by authenticated SMTP or otherwise, send mail with arbitrary
sender addresses? In that case you'll want to base the routing decision on
something other than $sender_address_domain. One way is through
$authenticated_id.
Assuming that usernames include the domain, that locally-submitted messages
can be trusted to have the correct sender address (if you have a webmail
system or similar that allows the users to use arbitrary sender addresses you
need something more) and that you don't receive mail with SMTP from
localhost, here is a suggestion:
condition = ${if match_domain
{${if !def:sender_host_address {$sender_address_domain}
{${if def:parent_domain {$parent_domain}
{${domain:$authenticated_id}}}}}}
{+ems_domains}}
A probably better and more readable solution would involve an ACL variable in
combination with $parent_domain.
--
Magnus Holmgren holmgren at lysator.liu.se
(No Cc of list mail needed, thanks)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20060715/2310e425/attachment.pgp
More information about the Pkg-exim4-users
mailing list