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 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

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 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

Rewrite subject for unauth messages only

2021-11-04 Thread Gionatan Danti
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 fully understand that header_checks only