Support of "\"-like aliases feature?

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

Support of "\"-like aliases feature?

Jeremiah Rothschild
Recently I rolled out a transition from sendmail to postfix. I've been very
happy with the changes except for one feature, which was supported by
sendmail but I'm not sure what to do about it in postfix.

This is the use of a backslash before a username in the aliases file. A
backslash inhibits further alias expanding. I have found it useful in
certain cases to stop mail loops.

Is there an equivalent feature supported by postfix?

Thanks in advance,

j
Reply | Threaded
Open this post in threaded view
|

Re: Support of "\"-like aliases feature?

Viktor Dukhovni
On Wed, Jan 30, 2019 at 05:18:19PM -0800, Jeremiah Rothschild wrote:

> Recently I rolled out a transition from sendmail to postfix. I've been very
> happy with the changes except for one feature, which was supported by
> sendmail but I'm not sure what to do about it in postfix.
>
> This is the use of a backslash before a username in the aliases file. A
> backslash inhibits further alias expanding. I have found it useful in
> certain cases to stop mail loops.
>
> Is there an equivalent feature supported by postfix?

IIRC Postfix will automatically do loop elimination, provided that
$myorigin is one of the domains listed in $mydestination.

However, with Postfix you're far better off implementing the vast
majority of address -> address mappings as virtual aliases, which
work much more efficiently, and definitely have loop elimination.

    virtual:
        [hidden email]  [hidden email], [hidden email]

Use local aliases(5) *only* when they offer something that virtual(5)
aliases do not.  That is, special non-rfc822 recipients, such as:

        foo-owner: foo-request
        foo: :include:/some-list
        bar: /some/file/nobody/owns
        baz: "|some-pipe nobody runs"

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Support of "\"-like aliases feature?

Wietse Venema
In reply to this post by Jeremiah Rothschild
Jeremiah Rothschild:
> Recently I rolled out a transition from sendmail to postfix. I've been very
> happy with the changes except for one feature, which was supported by
> sendmail but I'm not sure what to do about it in postfix.
>
> This is the use of a backslash before a username in the aliases file. A
> backslash inhibits further alias expanding. I have found it useful in
> certain cases to stop mail loops.
>
> Is there an equivalent feature supported by postfix?

Sorry. Local(8) is a Sendmail compatibility feature, and it jumps
many hoops, but I do not expect that it will ever be 100% compatible.

        Wietse