I'm trying to send mails addressed to a subdomain/server sub1.abc.com of our domain abc.com. This domain is handled by a central postfix mail server configured by means of sql. Although the transport table has an entry to relay all mails for sub1.abc.com to that smtp address, main.cf holds a relay_domains entry for sub1.abc.com and dns knows sub1.abc.com and its smtp mx entry postfix keeps looping back to itself.

Edit: I tried the entries for transport, mydestination and relay_domains separately but the result was always the same.

Where can I set this routing entry?

  • attach the output of: 'postconf -n' – cstamas Jan 22 '10 at 21:18

You need to do the following:

Create a transport file and put something like this in it:

username@example.com relay:[subdomain.example.com]

Update main.cf and add:

transport_maps = hash:/etc/postfix/transport

By the way, this sounds more like an error in routing rather than a postfix error (but make sure you do not list your subdomain in mydestination in the main.cf file)

Be sure to use your own ip address and subdomain record.

  • I just tried this out without having relay_domains and it failed. – Patrick R Jan 22 '10 at 21:24
  • I see what jamespo is saying. He's correct. The relay in in the transport map. – Patrick R Jan 22 '10 at 21:33

you do not need the subdomain in relay_domains for a start if you have a transport entry for it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy