Trualias: tcp_virtual_server doesn't require patching local(8)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trualias: tcp_virtual_server doesn't require patching local(8)

Fred Morris

Hello,

I've implemented tcp_virtual_server.py which can be utilized with virtual_alias_maps in main.cf, eliminating the need for patching local(8) which is required with tcp_table_server.py/alias_maps.

  • No need to patch local(8)
  • No need to specify virtual_alias_domains (mixes and matches local addresses and aliases).

The only difference I've noticed in the delivered mail is that the Delivered-To: header no longer contains the alias; so as a consequence any filtering during delivery will need to reference the X-Original-To: header.

TruAlias on GitHub: https://github.com/m3047/trualias

Regards...

--

Fred Morris


Reply | Threaded
Open this post in threaded view
|

Re: Trualias: tcp_virtual_server doesn't require patching local(8)

Wietse Venema
Please correct the following misinformation:

    Postfix has some issues with milters. For starters, although
    the milter protocol supports rejecting recipients during SMTP
    RCPT, it doesn't support rewriting them until EOB (end of
    message).

This is is not a Postfix limitation, it is a Milter protocol limitation.

Below are links to the official documentation which says that
add_rcpt/del_rcpt/etc. may be called only from the EOM callback.

https://web.archive.org/web/20100713211121/https://www.milter.org/developers/api/smfi_addrcpt
https://web.archive.org/web/20100713212400/https://www.milter.org/developers/api/smfi_delrcpt

There is enough wrong information, please do not add to it.

        Wietse

Fred Morris:

> Hello,
>
> I've implemented tcp_virtual_server.py which can be utilized with
> virtual_alias_maps in main.cf, eliminating the need for patching
> local(8) which is required with tcp_table_server.py/alias_maps.
>
>   * No need to patch local(8)
>   * No need to specify virtual_alias_domains (mixes and matches local
>     addresses and aliases).
>
> The only difference I've noticed in the delivered mail is that the
> Delivered-To: header no longer contains the alias; so as a consequence
> any filtering during delivery will need to reference the X-Original-To:
> header.
>
> TruAlias on GitHub: https://github.com/m3047/trualias
>
> Regards...
>
> --
>
> Fred Morris
>
>
        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Trualias: tcp_virtual_server doesn't require patching local(8)

Fred Morris
We're friends, right? Regardless, I appreciate your reading the
documentation.

On Fri, 16 Oct 2020, Wietse Venema wrote:
> Please correct the following misinformation:
>
> [...]
>
> This is is not a Postfix limitation, it is a Milter protocol limitation.

Enough information is exchanged during option negotiation to fast-forward
a milter which only rewrites recipients based on RCPT TO to EOB
immediately, and pass those rewrites on to other chained milters. I wrote
about this here at the time I implemented milters and you told me to go
away.

Most milter executor implementations behave this way so you have herd
immunity, sure. This is not the only limitation with using milters with
Postfix for this use case (which is the context).

There is no mailing list for Trualias, although I'll answer emails within
reason; however the proper thing to do would be to open an issue. Maybe
some suggested language addressing the assocated issues
(local_recipient_maps), you know, the specifics of the use case.

Conversely http://www.postfix.org/LOCAL_RECIPIENT_README.html doesn't
mention that it doesn't apply to milter recipient rewrites.

Thanks again for reading the documentation...

--

Fred Morris