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 %[email protected]
[email protected] localuser1
[email protected] localuser2
[email protected] 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
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
@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
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
That will reject mail for users that you haven't defined.
Wietse
It's not exactly a catchall.
@domain.nl %[email protected]
means that [email protected] is send to [email protected]
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