Re: Rewrite subject for unauth messages only

2021-11-06 Thread Viktor Dukhovni
> On 6 Nov 2021, at 5:33 pm, Gionatan Danti wrote: > >> I think that the default setting: >>nested_header_checks = $header_checks >> is unfortunate, perhaps we should change it to empty at compatibility >> level >= 3.7. > > On current test setup, I do not define nested_headers_check at all.

Re: Rewrite subject for unauth messages only

2021-11-06 Thread Gionatan Danti
Il 2021-11-06 19:04 Viktor Dukhovni ha scritto: Though I don't recommend complex all-in-one configurations, you use the "-o cleanup_service_name" option to configure separate cleanup(8) services for separate smtpd(8) instances: Yes, in my initial testing, I was missing -o cleanup_service_name

Re: Rewrite subject for unauth messages only

2021-11-06 Thread Viktor Dukhovni
On Sat, Nov 06, 2021 at 06:51:03PM +0100, Gionatan Danti wrote: > But I was also interested in a single server solution, not least to > better understand postfix itself. Though I don't recommend complex all-in-one configurations, you use the "-o cleanup_service_name" option to configure separate

Re: Rewrite subject for unauth messages only

2021-11-06 Thread Gionatan Danti
Il 2021-11-06 16:47 Viktor Dukhovni ha scritto: On Thu, Nov 04, 2021 at 10:51:06PM +0100, Gionatan Danti wrote: I was tasked to mark all messages coming from unauthenticated clients (ie: incoming emails) with a specific subject line. Best practice when requirements get complicated is to divid

Re: Rewrite subject for unauth messages only

2021-11-06 Thread Viktor Dukhovni
On Thu, Nov 04, 2021 at 10:51:06PM +0100, Gionatan Danti wrote: > I was tasked to mark all messages coming from unauthenticated clients > (ie: incoming emails) with a specific subject line. Best practice when requirements get complicated is to divide and conquer. Use a separate dedicated machin

Re: Rewrite subject for unauth messages only

2021-11-05 Thread Gionatan Danti
Il 2021-11-05 11:37 Dominic Raferd ha scritto: I think you need to ensure that the rule runs only for Subject: headers, escape square brackets in the if clause, and cover the possibility of no space after 'Subject:' (note: all untested): if /^Subject:/i if !/^Subject: \[EXTERNAL\]/i /^Subject: ?

Re: Rewrite subject for unauth messages only

2021-11-05 Thread Dominic Raferd
On 05/11/2021 10:20, Gionatan Danti wrote: Il 2021-11-05 09:36 Dominic Raferd ha scritto: Why permit auth connections on port 25? Restrict them to 587 and/or 465 then you can specify subject rewriting for (all) mails arriving via port 25.  (And you can use postscreen on port 25.) Yeah, it would

Re: Rewrite subject for unauth messages only

2021-11-05 Thread Gionatan Danti
Il 2021-11-05 09:36 Dominic Raferd ha scritto: Why permit auth connections on port 25? Restrict them to 587 and/or 465 then you can specify subject rewriting for (all) mails arriving via port 25.  (And you can use postscreen on port 25.) Yeah, it would be a very clean solution. However, we have

Re: Rewrite subject for unauth messages only

2021-11-05 Thread Dominic Raferd
On 04/11/2021 21:51, Gionatan Danti wrote: Dear all, I was tasked to mark all messages coming from unauthenticated clients (ie: incoming emails) with a specific subject line. While subject rewrite is trivial per-se (via header_checks), I am having big issues rewriting only selected messages. I f