Exim configuration confusion.

Hancock, Scott HancockS at MORGANCO.COM
Wed Nov 27 19:44:03 GMT 2002


Hello all,  

I'll get right to it because this is a long one.  Count 5 paragraphs after this one, if you want to cut this short.

The goal:  Use Exim and mailscanner for a mail hub for two untrusted W2k domains with two different internet domains. @domA.com and @domB.com.  

The extra bit of complexity is only certain users from @domB.com should be allowed to send and receive mail to / from the internet but all @domB.com user should be able to send email to @domA.com.  @domA.com users are unrestricted.

Reference: O'Reilly Exim book page 326-331.  Specifically figure 13-1. Or online at www.exim.org 3.2.x spec Heading 46.4 Control of relaying. 

I understand this figure as it pertains to one Exim mailing process. but experimentation has not yielded expected results with the two Exim processes used with mailscanner.  Further, I've not verified my setup against one Exim process but I think that is the next step.

I expect to employ the options sender_address_relay, and maybe sender_address_relay_hosts.  But the sender in the second exim process seems to be the mailscanner process.  I'm hoping the original sender is maintained in the header "post mailscanner" and the problem is user error on my part.

I'd like to know where to use sender_address_relay option as it applies to exim and mailscanner.  I've tried both config files with no luck.  

Any insight would be appreciated.  I've tried searching Exim specific resources but thought the mailscanner piece was non-standard enough to post here first.  Below is reference from www.exim.org.

I'm running:
Debian: testing
Mailscanner 3.24.1
Exim 3.36

Thanks in advance.  I'll be back on Wednesday next week.

-Scott Hancock


In addition to the tests on the host, if sender_address_relay is set, the sender's address from the MAIL command must match one of its patterns to allow outgoing relaying to an arbitrary domain. Also, if there are any rewriting rules with the `X' flag set, such an address is rewritten using those rules, and the result (if different) must verify successfully. See section 34.9 for an example of how this can be used. 

Normally, therefore, both the host and the sender must be acceptable before an outgoing relay is allowed to proceed. However, if relay_match_host_or_sender is set, an address is accepted for outgoing relaying if either the host or the sender is acceptable. Of course, sender addresses can easily be forged, but the sender check does mean you can prevent some kinds of unwanted mail from going through your host. 

All three options, relay_domains, host_accept_relay, and host_auth_accept_relay, are unset by default, which means that no relaying of any kind is enabled. This does not prevent a local user from setting up forwarding to some external system, but it does prevent the `percent hack' from relaying to arbitrary domains even when percent_hack_domains is set. 

As all the relay checking is done at RCPT time on incoming messages, the directors and routers are not involved. Depending on the configuration of these drivers, an address that appears to be remote to the relay checking code (that is, its domain does not match local_domains) may nevertheless end up being delivered locally, and similarly an apparently local address may end up being delivered to some other host. 




More information about the MailScanner mailing list