Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Have an SMTP server setup running in postfix, only for sending mails . Now the requirement is i want to relay mails for particular domain to end user through other SMTP , without disturbing default setup (i.e, without relaying)

Existing Setup

   Application -->  My SMTP  ---> End user

Required for particular domain to send mails

 Application ( ) --> My SMTP  --> SMTP of
share|improve this question

If you want to send to a server other than what say the MX records in DNS for a domain, you can add a line in /etc/postfix/transport:

Then run postmap /etc/postfix/transport.

If it isn't already, add transport_maps = hash:/etc/postfix/transport to /etc/postfix/ and run postfix reload.

share|improve this answer
Thankx Cakemox, but how can i confirm whether the mails from using my SMTP as origin and as RELAY .. any logs to identify – Sivaguru Nathan Apr 9 '11 at 17:00
Postfix uses the mail facility of syslog which usually goes to /var/log/mail.log – Cakemox Apr 9 '11 at 17:37
Whether the want to allow accept as relay in their server. Pls clarify – Sivaguru Nathan Apr 10 '11 at 4:53
Normally you just rely on DNS to determine the SMTP server for Is there a reason why you want to send it to if you're not sure they will accept email for Are you hoping to use as an open relay? – Cakemox Apr 10 '11 at 5:19
+1 for this answer. Additionally, you can specify via IP address by using smtp:[]. The [] suppresses MX lookups and forces the system to try to send to whatever destination you've specified. – Greeblesnort Apr 14 '11 at 19:50

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.