DevHeads.net

When is .forward handled?

I was recently surprised to see .forward file in user's home dir being
honoured in a context where mail is set to be delivered via LMTP to
dovecot for final delivery. A response I got on the dovecot list implied
that the MTA is responsible for this.

Does Postfix handle .forward just before it hands the message off using
LMTP? How does this work? I wouldn't have expected this unless Postfix
was doing the actual delivery, though it's not unwelcome - it's a mildly
helpful feature but I want to understand how it works.

Comments

Re: When is .forward handled?

By Wietse Venema at 12/05/2016 - 20:27

See <a href="http://www.postfix.org/ADDRESS_REWRITING_README.html" title="http://www.postfix.org/ADDRESS_REWRITING_README.html">http://www.postfix.org/ADDRESS_REWRITING_README.html</a>

Wietse

Re: When is .forward handled?

By mrobti at 12/05/2016 - 20:33

On 2016-12-05 16:27, <a href="mailto: ... at porcupine dot org"> ... at porcupine dot org</a> wrote:
This says .forward is only used by local(8). So in my case, dovecot LMTP
seems to be responsible for this?

Re: When is .forward handled?

By Peter at 12/05/2016 - 20:45

On 06/12/16 13:33, MRob wrote:
Correct.

No, local(8) is. Delivery of *all* mail to recipient domains listed in
the local address class is done by local(8). The mailbox_transport and
mailbox_transport_maps settings are handled by local(8):

mailbox_transport (empty)
Optional message delivery transport that the
_local(8)_delivery_agent_ should use ...

Peter

Re: When is .forward handled?

By Wietse Venema at 12/05/2016 - 20:45

That is correct. Only the local(8) program has the privileghes that
allow it to grope around in user home directories.

Nope. that program has no concept of UNIX home directories.

However, you may have configured mailbox_transport, in which
case local(8) delegates mailbox delivery after doing all the
local(8) things first.

Wietse

Re: When is .forward handled?

By mrobti at 12/05/2016 - 21:55

On 2016-12-05 16:45, <a href="mailto: ... at porcupine dot org"> ... at porcupine dot org</a> wrote:
A-ha, thank you!