Ansgar Wiechers schrieb:
$myhostname and localhost.$mydomain should go into $mydestination, not
into $relay_domains. You can forward all mail to valid local addresses
to your internal host via entries in $alias_maps.
I changed than, thank you!
Also, i moved "localhost" to $mydestination, which i hope is OK ...
relay_transport = smtp:[smtp.example.com]
mynetworks = [ip.ad.dr.es], ...
I don't think [a.b.c.d] is valid syntax for IPv4 addresses in
$mynetworks. Lose the square brackets.
Yes, this was a formatting mistake, i have regular IPs and networks in
that line.
Where /etc/postfix/mydomains lists all domains to be relayed
You may want to use a more "speaking" name for your relay domains (like,
/etc/postfix/relay_domains ;).
I need a file with the same content on Server B, where it is referred to
by $mydestination
I did not want to use different names for files with the same content ...
and the relay_transport is the IP of Server B:
In your config snippet from server A, the parameter $relay_transport
doesn't contain the IP address of server B, but the FQDN of server A.
Unless you mis-obfuscated the parameter value you need to correct that
line.
But why?!?
It seems to work with the FQDN in square brackets:
relay_transport = smtp:[mail.example.com]
Expected, since you configured $myhostname as a relay domain.
Yes, now it works better :)
Thank you again.
I would like to let already Server A bounce those mails!
# Server A
mydestination = $myhostname, localhost.$mydomain, localhost
relay_domains = /etc/postfix/relay_domains
alias_maps = hash:/etc/aliases
local_recipient_maps = $alias_maps
relay_recipient_maps = hash:/etc/postfix/relay_recipients
Der default, that seems to be quite similar already:
postconf | egrep "^(alias_maps|local_recipient_maps)"
alias_maps = hash:/etc/aliases
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
I can locally expand now, with your suggestion for $mydestination :)
<cough>awk -F: '$0 !~ /^(#|$)/ {print $1" OK"}' /etc/aliases</cough>
:)
The postconf man-page [1] isn't too clear about this, but I think you
need to specify full addresses (us...@example.com OK). I have a script
somewhere that will generate a list of valid recipients from various
(file-based) recipient and domain lists. If I manage to unearth it after
I get home tonight, I'll post it here.
Thanx, but i already created a script - and my users dont change often -
the file will stay stable for months or even years now :9
Thank you for your comments and additional help!