[Dovecot] How to deal with mail to unknown virtual recipients?

Andreas Ntaflos daff at pseudoterminal.org
Fri Apr 18 19:00:36 EEST 2008


On Thursday 17 April 2008 23:50:40 mouss wrote:
> > But today I received spam mail (which was correctly identified as such by
> > amavisd-new) for "info at example.org" and "sales at example.org", two
> > recipient addresses that do not exist. According to [1] "it's left up to
> > the non-Postfix delivery agent to reject non-existent recipients from
> > local submission or from local alias expansion."
>
> note that this is about local submission and local alias expansion. it
> is not about mail received from outside.
>
> > How to deal with such a situation?
>
> this is postfix issue. postfix will reject mail to invalid local and
> virtual users unless you rebak recipient validation. a common error is
> to use wildcard virtual aliases or wildcard canonical mapping.

Thank you for your reply! Reading through it and re-reading the Postfix 
documentation gave me the clue I needed. 

Unfortunately I forgot to mention that I didn't have a virtual_mailbox_maps 
directive defined in Postfix's main.cf, so Postfix couldn't know anything 
about which virtual recipients were valid and which weren't. Since that 
particular map was optional and everything worked fine during my tests (which 
didn't include sending mail to an invalid virtual recipient, shame on me) I 
quickly forgot about it.

Naturally that was the root of problem I was facing.

Defining a virtual_mailbox_maps file with all valid virtual users solves the 
problem in principle, however now I need to maintain two files with valid 
virtual users for valid virtual domains: the passwd-file for Dovecot 
(/etc/dovecot/passwd) plus the vmailbox file for Postfix 
(hash:/etc/postfix/vmailbox).

I suppose this is unavoidable when using flat files and would be better solved 
using a real database backend, but it makes me wonder if there really isn't 
anything Dovecot could do about this?

Seeing as Dovecot recognises when a virtual recipient is invalid, couldn't it 
somehow put the to-be-rejected mail back to Postfix (or whichever MTA)? Or 
should it just drop it? I don't know what the SMTP (whichevery protocol is to 
be followed here) says about this, so I pose the question again: 

Is there anything Dovecot itself can do to reject or handle mail to invalid 
virtual users? Or does this situation *have* to be dealt with earlier, by the 
MTA?

Andreas
-- 
Andreas "daff" Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://dovecot.org/pipermail/dovecot/attachments/20080418/0a5a2ac4/attachment.bin 


More information about the dovecot mailing list