Hello! Happy new year everyone.

Postfix version 2.10.2.

I have a canonical maps configuration:
recipient_canonical_maps = hash:/etc/postfix/rcptcanon
Which contains one entry:
@firstdomain.com @seconddomain.com

The firstdomain.com and seconddomain.com are both virtual mailbox domains.
The seconddomain.com has a single user, "test".

If I send an email to he...@seconddomain.com, I get the following which is 
exactly as one would expect with the default recipient checking:
220 server ESMTP Postfix
EHLO testing
250-server
...
MAIL FROM: f...@thirddomain.com
250 2.1.0 Ok
RCPT TO: he...@seconddomain.com
550 5.1.1 <he...@seconddomain.com>: Recipient address rejected: User unknown in 
virtual mailbox table
QUIT
221 2.0.0 Bye

However, if I send an email to he...@firstdomain.com, it sends successfully. A 
few minutes later I will then receive a bounce from the server:
220 server ESMTP Postfix
EHLO testing
250-server
...
MAIL FROM: f...@thirddomain.com
250 2.1.0 Ok
RCPT TO: he...@firstdomain.com
250 2.1.5 Ok
QUIT
221 2.0.0 Bye

It seems that if an entry is found in recipient_canonical_maps, postfix assumes 
the target address to exist. Is this intended behaviour?

Also, a secondary question I have regarding recipient_canonical_maps - is it 
possible to specify this under "-o" for smtpd, so it only performs the 
canonical on the way out/in? I can't see a way to do this.

Thanks,

Jason

Reply via email to