Hello

From The Book of Postfix:

"If you do not set myorigin manually, it will default to myhostname, which 
comes in handy if you run various hosts whose root messages should be delivered 
to one role account at a central server. This way you will always know the 
hostname the message came from; a cron job sent as root, for example, would be 
modified by postfix to be send as r...@$hostname, which in our case would be 
root@ mail.example.com."

What I'm trying to achieve is exactly that. I want that this message:

echo "root alias set" | /usr/sbin/sendmail -f root root

sent from host.example.com be sent to the central mail server at 
mx1.example.com and delivered to root.

I have the following settings:
myorigin = host.example.com
mydestination = 
# relay to mx
relayhost = example.com
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled

Due to the relayhost config, the message from above gets sent to my mail server 
at mx1.example.org, but then my mail server wants to send that message back to 
host.example.org:

Jun 14 21:33:54 mx1 postfix/smtp[6111]: 62CA44A2CE: to=<r...@host.example.com>, 
relay=none, delay=581, delays=581/0.01/0/0, dsn=4.4.1, status=deferred (connect 
to host.example.com[xxx.xxx.xxx.xxx]:25: Connection refused)

How can I configure Postfix to deliver that message locally without having to 
list all my hosts explicitly?

Regards
Matias

Reply via email to