1
votes

My mail server only has one email account and will be using other server on the internet as relay host. The problem is that i need the local server with the same domain name as the remote(relay server). When i send an email to other email account with the same domain name the postfix validate it an returned error 550 because the recipient account doesn't exist on local server but it does in the remote (relay server).

It is possible to force to relay and send the email to the relay serve even thought the recipient account doesn't exist locally?

Regards, Carlos

1

1 Answers

0
votes

add in main.cf

header_checks = regexp:/etc/postfix/header_checks

and in /etc/postfix/header_checks ==>

/^[tT]o:.*@domain.com.*/ FILTER smtp:remote.smtp.arelay.com 
/^[tT]o:.*[email protected].*/ FILTER smtp:local.smpt.arelay.com 

then run the following commands:

postmap hash:/etc/postfix/header_checks
postfix reload

PS: You must adapt this to your environement