Wietse Venema schreef op 8-1-2014 20:20:
R. Berger:
hi,
I have the following problem coming from sendmail:
This is how it is set up in virtusertable:
@domain.nl %1...@otherdomain.nl
us...@domain.nl localuser1
us...@domain.nl localuser2
us...@domain.nl localuser3
If you can explain what the above means for Sendmail, then someone
can try to show how to do the same in Postfix.
I suspect that you want to use Postfix virtual_alias_maps instead
of canonical_maps.
If the equivalent is this (in terms of hash: files):
/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual ...
/etc/postfix/virtual
us...@domain.nl localus...@example.com
us...@domain.nl localus...@example.com
us...@domain.nl localus...@example.com
@domain.nl @otherdomain.nl
Then you are accepting mail with non-existent recipient addresses
and forwarding it to otherdomain.nl. That is bad. Such mail will
bounce and you become a backscatter source.
Instead, use this:
/etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual ...
virtual_alias_domains = otherdomain.nl ...
/etc/postfix/virtual
us...@domain.nl localus...@example.com
us...@domain.nl localus...@example.com
us...@domain.nl localus...@example.com
That will reject mail for users that you haven't defined.
Wietse
It's not exactly a catchall.
@domain.nl %1...@otherdomain.nl
means that somen...@domain.nl is send to somen...@otherdomain.nl
So if there is no catchall for otherdomain.nl there is no catchall for
domain.nl
both domains are local btw.
So basically you have 3 local users which are directly connected to
domain.nl and the rest has to be forwarded to another domain if the
username in front of the @ exists.
I am using postfixadmin and the local users are working.
But how do I forward all the other mail? I understand I can do that for
a complete domain using canonical_maps option but does it work together
with local virtual users?
Thanks,
Roger