Am 06.05.22 um 11:04 schrieb Víctor Rubiella Monfort:
Thanks for the proposals, the main problem is accounts names and domains could be totally different. I'm reconsidering this approach to add only selected accounts to able to cross domains, simplifing automation and increasing security. Although it requires more config for client.

if you have multiple sets of accounts and multiple sets of domains, you will have to explicitly list all combinations or try to simplify them with regexp/PCRE maps. what Wietse proposed was to use regular expressions to simplity those lists, if it's possible at all.

V?ctor Rubiella Monfort:
I'm working on a map for restrict MAIL_FROM declared on mail based on
sasl user authenticated.

For example if we want that all accounts for domain @domain1.com can
define MAIL_FROM @domain1.com and @domain2.com accounts:

@domain1.comaccou...@domain1.com accou...@domain2.com accou...@domain2.com accou...@domain2.com @domain2.comaccou...@domain1.com accou...@domain2.com accou...@domain2.com accou...@domain2.com

El 5/5/22 a las 15:23, Wietse Venema escribió:
Perhaps you can use reject_sender_login_mismatch with

main.cf:
    smtpd_sender_login_maps = pcre:$config_directory/sender-login.pcre

sender-login.pcre
    /^(.+)@domain1\.example$/   $1@domain1.example $1@domain2.example
    /^(.+)@domain2\.example$/   $1@domain1.example $1@domain2.example

Assuming that the usernames are the same in different domains.

        Wietse

On 06.05.22 11:59, Robert Schetterer wrote:
perhaps this older milter "may" help too

https://github.com/croessner/vrfydmn

This one makes sure the header From: is the same as (envelope) mail from: either by rejecting when it's not, or resetting the From: header to contents of envelope from: (putting original From: to Reply-To:).

I plan to use this in the next step of my mail improvements.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I intend to live forever - so far so good.

Reply via email to