Results 1 to 5 of 5

Thread: How to get userbased smarthost running

  1. #1
    Join Date
    Jan 2018
    Posts
    2

    Question How to get userbased smarthost running

    Dear Community,

    I need to have a few da users sent their email not over the general smarthost but over different mail gateway.

    can we do this based on virtual domain?

    situation:
    external mailfilter sends mail to server for virtual domains
    External mailfilter is also smarthost for virtual domains

    this 2 specific virtual domains need to accept (authenticated) relay directly from user@virtualdomain and send the mail over different smarthost out..

    a part of the config I have now, but i'm missing something, since it's not working as expected..

    domainlist mx_domains = xyz.com:abc.com

    # This router routes to remote hosts over SMTP using a DNS lookup. Any domain
    # that resolves to an IP address on the loopback interface (127.0.0.0/8) is
    # treated as if it had no DNS entry.
    mx_email:
    driver = manualroute
    domains = ! +mx_domains
    ignore_target_hosts = 127.0.0.0/8
    condition = "${perl{check_limits}}"
    transport = auth_relay
    route_list = * vps.aisp.email::587
    # no_more

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,385
    Hello,

    In general, yes, it's possible. What is wrong with your solution?

  3. #3
    Join Date
    Jan 2018
    Posts
    2
    Quote Originally Posted by zEitEr View Post
    Hello,

    In general, yes, it's possible. What is wrong with your solution?
    It seems not to work and since exim is not my speciality I was wondering why it's not working..
    I'm afraid I'll have to try again and greb some logging.

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,385
    You posted code lines, which seem to be working fine if to put them into a correct place (I did not test them). We don't know how and where you added it, we don't know what error you got with it. And I even not sure whether or not you changed domain names to your real ones. So please do test the code and describe all the details:

    - what you did?
    - what you got?

  5. #5
    Join Date
    Oct 2006
    Posts
    10
    I have this working over here.
    Edit the following 3 files:

    /etc/exim.routers.pre.conf
    Code:
    mail_relay:
       driver = manualroute
       domains = ! +local_domains
       senders = *@[set you local sending domain here]
       ignore_target_hosts = 127.0.0.0/8
       condition = "${perl{check_limits}}"
       route_list = !+local_domains [define your smarthost]
       transport = auth_relay
    /etc/exim.transports.pre.conf
    Code:
    auth_relay:
      driver = smtp
      port = 587
      hosts_require_auth = <; $host_address
      hosts_require_tls = <; $host_address
    If you need authentication edit the following file and add the below content and customize it /etc/exim.authenticators.post.conf
    Code:
    auth_login:
      driver = plaintext
      public_name = LOGIN
      client_send = : [user@host] : [password]
      server_set_id = $1
    Keep in mind that you might not need authentication. and that some parts are specific for my own environment.
    I've used the info from https://www.transip.eu/knowledgebase...h-directadmin/ as a base for my changes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •