Skip to main content

Smart Host to Selected Domains

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! I don't believe there is going to be an easier method than the things that have already been posted on the forum in the past. cPanel doesn't natively support this type of mail handling, so any work to get this configuration applied will involve advanced editing of the Exim configuration and router systems.
    0
  • tufancap
    super, wouldn't anyone write an example here?
    0
  • cPRex Jurassic Moderator
    Since this isn't something that is included with the product by default, I don't have any official documentation. Were you able to search for other examples like this?
    0
  • tufancap
    I have read all of these topics. There is no answer I'm looking for. for example here you can send emails from 1 domain with smart host. I wish we could add domains with commas here.
    Section: PREROUTERS
    send_via_dmail: driver = manualroute domains = ! +local_domains condition = "${if eq {$sender_address_domain}{mydomain.com}{true}{false}}" ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 headers_add = "${perl{mailtrapheaders}}" transport = dmail_smtp route_list = * outbound.dmail.com
    {mydomain.com, domain2.com, domain3.} For example, is something like this possible? comma doesnt work, tried it. Is there a command that works?
    0
  • cPRex Jurassic Moderator
    Unfortunately it isn't as simple as one command as there will need to be custom work performed to get that configured.
    0
  • tufancap
    well then. Can anyone give other information about the subject I am looking for.
    0
  • tufancap
    Solution Specify only certain domains (of the sender email address) to send through the smarthost Easy Settings Replace the underlined text with your own settings Exim Configuration Manager + Advanced editor
    @AUTH@ company_login: driver = plaintext public_name = LOGIN client_send = : MY-USERNAME : MY-PASS
    @ROUTERSTART@ send_via_company: driver = manualroute domains = ! +local_domains transport = company_smtp route_data = ${lookup{$sender_address_domain}lsearch*{/etc/exim/authorized_senders.txt}}
    @TRANSPORTSTART@ company_smtp: driver = smtp port = 25 hosts = company.mail.com hosts_require_auth = company.mail.com
    create a file /etc/exim/authorized_senders.txt. Add domain names in below format into that file:
    domain1.com: company.mail.com domain2.com: company.mail.com
    Exim Restart If you still don't understand, write it here. I will try to help.
    0

Please sign in to leave a comment.