Multiple SMTP Smarthosts for each domain

Discussion in 'General' started by pebkac, Oct 16, 2012.

  1. pebkac

    pebkac Member HowtoForge Supporter

    Hey folks,

    I need to configure my smarthost relay to send to certain smarthost based upon domain. Right now I have one for all domains on the server. I would like to have two domains use the current setup and 1 domain send out using a different smart host.

  2. pebkac

    pebkac Member HowtoForge Supporter

  3. pititis

    pititis Member

    You can define your transports under email->email routing

  4. pebkac

    pebkac Member HowtoForge Supporter

    i have since figured that out. however it is still sending from itself and not the smarthost. I restared postfix to no avail. any ideas?
  5. pititis

    pititis Member

    Yes, you have to create a Relay recipient for each route too.

    Email-> Relay Recipients
  6. pebkac

    pebkac Member HowtoForge Supporter

    Thanks for the replies. I'm so confused now though. Here is my exact scenario:

    I have an external SPAM/Continuity/Encryption service I am testing. I have set my MX records for this domain to point to the service provider. In ISPconfig I have a domain set for the domain and have two email accounts. I then added a new email transport for the domain and in the destination added the mail server the provider gave me (this in hopes that all outgoing mail for this domain gets sent through the providers' mail server). I then added a relay recipient of @domain. Now when I send a message through the account it would not go through my service provider, it would just send it directly from the ISPConfig server, which is not my desired result. The mail goes through fine. I looked in the logs and noticed this entry "Oct 19 09:33:03 abda postfix/trivial-rewrite[17652]: warning: do not list domain in BOTH virtual_mailbox_domains and relay_domains". So I did some searching on the forums and found that I should remove that domain from domains. I did that but it then deletes the mail accounts and when I try to send a mail of course it does not go through.

    Can someone tell me the correct way to get the ISPConfig server to send out to this other server so that I can use their services.



Share This Page