Support for relay per domain in Exim?

Aar

Verified User
Joined
Feb 10, 2005
Messages
209
Location
Netherlands
Maybe this is a nice feature request, or maybe someone knows a good solution?

I have a number of sites running on my server, and I want to have the outgoing SMTP in Exim relayed via my provider TransIP. According to them this is possible via this extension (not tested yet):

/etc/exim.authenticators.post.conf
Code:
auth_login:
  driver = plaintext
  public_name = LOGIN
  client_send = : JohnDoe: S3cr3t
  server_set_id = $1

/etc/exim.routers.pre.conf
Code:
transip_email:
  driver = manualroute
  domains = !+local_domains
  ignore_target_hosts = 127.0.0.0/8
  condition = "${perl{check_limits}}"
  transport = auth_relay
  route_list = * vps.transip.email::587
  no_more

/etc/exim.transports.pre.conf
Code:
auth_relay:
  driver = smtp
  port = 587
  hosts_require_auth = <; $host_address
  hosts_require_tls = <; $host_address

Now in exim.routers.pre.conf I can use this for a single domain:
Code:
  domains = example.com
  condition = ${if eq{$sender_address_domain}{example.com}{yes}{no}}

But now I wondered if there is a possibility in DirectAdmin to add multiple domains without hardcoding? It would be easy if you could indicate per domain in the mail settings whether relaying should be done.

Is this possible? Or should I submit a feature request in the Upvoting place on the site?
 
I also used this service from that provider.

My /etc/exim.routers.pre.conf looks like this:
Code:
transip_email:
  driver = manualroute
  domains = ! +local_domains
  condition = ${lookup{$sender_address_domain}lsearch{/etc/exim_smarthosts}{true}{false}}
  ignore_target_hosts = 127.0.0.0/8
  transport = auth_relay
  route_list = * vps.transip.email::587
  no_more

Then in the file /etc/exim_smarthosts define per line each domain you want to use the SMTP-relayserver .
 
Back
Top