Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
attach the output of: 'postconf -n' –  cstamas Jan 22 '10 at 21:18
add comment

2 Answers 2

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.