On Wed, Jan 15, 2025 at 03:47:19AM +0100, Vincent Lefevre via Postfix-users 
wrote:

> As documented in https://www.postfix.org/VIRTUAL_README.html
> section "Mail forwarding domains", to forward mail to another user,
> I have in the /etc/postfix/main.cf file (something set up in 2009):
> 
> virtual_alias_domains = vinc17.org
> virtual_alias_maps = hash:/etc/postfix/virtual
> 
> and in the /etc/postfix/virtual file, something like:
> 
> na...@vinc17.org name2@somewhere
>
> (where "somewhere" is orange.fr).

This works well for aliasing names in domains you control to one or more
underlying recipient names, *also* in domains *you control*.

It has long ago ceased to be a viable approach for redirecting mail to
domains you don't control.

> 2024-12-18T18:15:25.205389+01:00 joooj postfix/smtp[444194]: C8A103D3: 
> to=<name2@somewhere>, orig_to=<na...@vinc17.org>, 
> relay=smtp-in2.orange.fr[80.12.24.83]:25, delay=4.5, 
> delays=0.25/0.09/3.1/1.1, dsn=5.2.0, status=bounced (host 
> smtp-in2.orange.fr[80.12.24.83] said: 501 5.2.0 NxdotzYeoM5hi Mail rejete. 
> Mail rejected. SPF check failed. OFR004_519 [519] (in reply to end of DATA 
> command))

As expected.  This fails SPF, ... and may aslo fail anti-spoofing if
the message originated from the ultimate destination domain.

Forwarding to remote domains is better not done at all, but if it must
be done, it should use aliases(5) with an owner-alias, to effect a
change in the envelope sender address.

    owner-local-name: responsible-contact@local.example
    local-name: remote-name@remote.example

A virtual(5) rewrite, can be added if the original domain is not a
"local" domain (see ADDRESS_CLASS_README).

    virtual:
        virtual-name@virtual.example    local-name@local.example

    main.cf:
        mydestination = local.example

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to