April 21, 2006

 Allowing relay on a domain level

Question:

We run the @Mail mailserver for our main domain, however we have about 100 customer domains we want to allow access via the SMTP server to relay.

These 100 extra domains are external to @Mail, however these customers should have access to send messages via the SMTP server based on their domain-name ( not IP address, since they are dynamic )

How to enable this under @Mail?

Answer:

By editing the Exim configure file:

/usr/local/atmail/mailserver/configure

Define a new list of domains that are permitted to relay:

Locate:

hostlist relay_from_hosts = localhost:mysql;MYSQL_RELAY

Append below:

addresslist allowed_domains = company.com:isp.net

Seperate new domains by a : , this will make a list of domains allowed to relay.

Next, locate in the ACL for relay:

accept  authenticated = *

Append below:

accept senders = +allowed_domains

This will accept relay if the sender domain via SMTP ( using the "mail from" command , e.g the sender of the message )

Next restart the @Mail services: /etc/init.d/atmailserver restart

Users can now relay via the SMTP server if their local domain matches - Note this is not the best security model, and should also be used if their IP matches your IP-ranges.


Filed under: Exim — Ben Duncan @ 10:50 am