Re: [exim] Local and remote names in same domain

Góra strony
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
Dla: exim-users
Temat: Re: [exim] Local and remote names in same domain
On 18/05/2020 15:59, Mike Clarke via Exim-users wrote:
> In addition to my normal email address, I collect mail for an address at
> another domain which for the purpose of this post I'll call
> other.mike@???. I have the following router defined for this
> domain in the Exim configuration file
>
> my.example.com:
>    driver = redirect
>    domains = my.example.com
>    local_parts = other.mike
>    data = mike

>
> This works fine and email for other.mike@??? is routed locally to
> my mailbox. The problem arises when I receive an email addressed to multiple
> users at the other domain, e.g. To: other.mike@???,
> fred@???'.


Unless you have done something very odd indeed, the To: header
is irrelevant. What matters is the list of envelope recipients.


> How do I configure Exim to only send outgoing emails if they originated
> locally


Your Exim configuration should reject (envelope) recipients that are
not handled by your system. Specifically, those that are not on "your"
domain and not ones you have an agreement to do forwarding for.
This is the "don't be an open relay" rule.

Traditionally, you do checks on envelope recipients in your recipient
ACL, having first permitted anything from "local and known" sources
(eg. the loopback IP, and any client systems you happen to smarthost
for).
--
Cheers,
Jeremy