Currently I have a /etc/postfix/virtual
file that has entries like:
[email protected] [email protected]
I want to be able to forward [email protected]
to [email protected]
How do I do this?
EDIT: I did set
propagate_unmatched_extensions = canonical, virtual
and
recipient_delimeter = +
but still keep getting Recipient address rejected: User unknown in local recipient table;
EDIT II: I made the changes suggested in @Schot's updated answer with some progress;
Now I get Recipient address rejected: User unknown in virtual alias table;
when sending to [email protected]
Sending to [email protected] worked both before and after them modifications
EDIT III:
Postfix is version 2.3.3 - I do not have separate mail.warn
or mail.err
logs - just the /var/log/maillog
. Here is the full (anonymized) snippet:
EDIT IV: Updated to postfix 2.3.19 with no luck.
EDIT V:
Doing postconf -n
showed that recipient_delimiter
was misspelled in the main.cf
as well as above and the delimiter was not processed at all.
Your current entries are OK, you should look at the propagate_unmatched_extensions configuration parameter. Check that it includes
virtual
.About you regex not working, see the man page for virtual(8):
Update
I have tested your configuration and it works for me. Maybe one of the following is the problem:
mydestination
? If it is, remove it.virtual_alias_domains
? If not, add it.Side note: Does sending mail to [email protected] (without a +delimiter) work?
It's
recipient_delimiter
notrecipient_delimEter
$number substitutions are not allowed in the virtual file as a security precaution. http://www.postfix.org/PCRE_README.html