LMTP and undeliverable addresses

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LMTP and undeliverable addresses

Nick-5
This isn't causing me any problem (that I can tell) so I ask out of
curiosity, about postfix 3.4.7 on debian stable...

My main.cf sets local delivery to go to dovecot,

   local_transport = lmtp:unix:private/dovecot-lmtp

In obedience to LOCAL_RECIPIENT_README it also sets
local_recipient_maps to "specify a database that lists all the known
user names or addresses",

   local_recipient_maps = $real_recipients, $virtual_alias_maps

where 'real_recipients' are the local unix accounts that can receive
mail.  These settings are working, postfix delivers mail into dovecot
whether addressed to real account names or to virtual aliases.

If the recipient is bogus, postfix rejects the mail like so,

   550 5.1.1 <[hidden email]>: Recipient address
     rejected: undeliverable address: host
     mail.acrasis.net[private/dovecot-lmtp] said: 550 5.1.1
     <[hidden email]> User doesn't exist:
     [hidden email] (in reply to RCPT TO command)

This is dovecot, not postfix, giving the verdict on the validity of
'bogus-recipient', yes?  If postfix has "a database that lists all the
known user names or addresses", why does postfix consult dovecot?

Thanks,
--
Nick
Reply | Threaded
Open this post in threaded view
|

Re: LMTP and undeliverable addresses

Wietse Venema
Nick:

> This isn't causing me any problem (that I can tell) so I ask out of
> curiosity, about postfix 3.4.7 on debian stable...
>
> My main.cf sets local delivery to go to dovecot,
>
>    local_transport = lmtp:unix:private/dovecot-lmtp
>
> In obedience to LOCAL_RECIPIENT_README it also sets
> local_recipient_maps to "specify a database that lists all the known
> user names or addresses",
>
>    local_recipient_maps = $real_recipients, $virtual_alias_maps
>
> where 'real_recipients' are the local unix accounts that can receive
> mail.  These settings are working, postfix delivers mail into dovecot
> whether addressed to real account names or to virtual aliases.
>
> If the recipient is bogus, postfix rejects the mail like so,
>
>    550 5.1.1 <[hidden email]>: Recipient address
>      rejected: undeliverable address: host
>      mail.acrasis.net[private/dovecot-lmtp] said: 550 5.1.1
>      <[hidden email]> User doesn't exist:
>      [hidden email] (in reply to RCPT TO command)

You have additional configuration beyond what you described above,
namely, something that invokes reject_unverified_recipient.

> This is dovecot, not postfix, giving the verdict on the validity of
> 'bogus-recipient', yes?  If postfix has "a database that lists all the
> known user names or addresses", why does postfix consult dovecot?

Because you configured Postfix to invoke reject_unverified_recipient.

As always, an examination of "postconf -n" output can clarify
surprises.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: LMTP and undeliverable addresses

Nick-5
On 2020-01-29 18:38 GMT, Wietse Venema wrote:
> Nick:
> >    local_transport = lmtp:unix:private/dovecot-lmtp
> >    local_recipient_maps = $real_recipients, $virtual_alias_maps

> >    550 5.1.1 <[hidden email]>: Recipient address
> >      rejected: undeliverable address: host
> >      mail.acrasis.net[private/dovecot-lmtp] said: 550 5.1.1
> >      <[hidden email]> User doesn't exist:
> >      [hidden email] (in reply to RCPT TO command)
>
> You have additional configuration beyond what you described above,
> namely, something that invokes reject_unverified_recipient.

Yes, in smtpd_recipient_restrictions.

> > This is dovecot, not postfix, giving the verdict on the validity of
> > 'bogus-recipient', yes?  If postfix has "a database that lists all the
> > known user names or addresses", why does postfix consult dovecot?
>
> Because you configured Postfix to invoke reject_unverified_recipient.

On removing reject_unverified_recipient, the rejection changes to

  550 5.1.1 <[hidden email]>: Recipient address
    rejected: User uknown

which I prefer, not that it's vital to me.  I confess I'm none too
clear now on the purpose of reject_unverified_recipient.  Is there any
reason I should keep it?

Thanks,
--
Nick
Reply | Threaded
Open this post in threaded view
|

Re: LMTP and undeliverable addresses

Viktor Dukhovni
In reply to this post by Nick-5
On Wed, Jan 29, 2020 at 06:23:37PM +0000, Nick wrote:

>    local_recipient_maps = $real_recipients, $virtual_alias_maps

By the way, you DO NOT need to list $virtual_alias_maps in
local_recipient_maps.  Postfix will automatically check
$virtual_alias_maps, you're just doing it twice.

--
    Viktor.