Dasza Seyda: > Let's suppose that system-generated mails all will have > @system.example.com domain. > > If I send this system-generated mail: > > user$ echo test | mail -s test myacco...@yahoo.tld > > I would like to have it delivered directly, without any relays (as it > will come as u...@system.example.com).
Don't specify relayhost in main.cf. > However, if external users connect to send mail through this Postfix > server, they need to be relayed through a different host. This requires Postfix version 2.6 or later. Use sender_dependent_relayhost_maps. Return DUNNO for u...@system.example.com, and mail.isp.net for everyone else. /etc/postfix/main.cf: relayhost = sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost static:mail.isp.net /etc/postfix/relayhost: @system.example.com DUNNO http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps Wietse