On Wed, 20 Jul 2022, Alex wrote:
Hi,
I have a number of rules that match on the To field, but what to do if the To
field is missing?
Received: from test.com (wsip-72-214-24-18.sd.sd.cox.net [72.214.24.18])
by mail01.example.com (Postfix) with SMTP id 12425B9B
for <j...@gooddom.com>; Fri, 15 Jul 2022 18:50:34 -0400 (EDT)
I realize I can match on the Received header here, but that would require
creating an additional rule for each corresponding To rule. Perhaps
there's a way to combine them, or a tag that can be used for both?
Depending on your MTA and the message, that 'for <j...@gooddom.com>' element may
be completely missing (for example if there's multiple recipients of a message).
Can you configure your "glue" to synthesize an addtional header from the
envelope-to address of the message? Envelope recipient addrs must always exist,
it's just a question of what you need to do to get it visable to SA.
Look at the "envelope_sender_header" entry in the SA docs, apply the same
concept to the envelope recipient data.
In the milter I use, I create both envelope-From & envelope-To headers.
I'm also aware of using ALL, but I think that may be too broad and may catch
instances that shouldn't be. Can someone explain how this rule
works and if something similar would apply to my situation?
header __HDRS_MISSP ALL:raw =~
/^(?:Subject|From|To|Reply-To):\S/ism
That rule just says: look at all the raw header data and match if there's none
of Subject, From, To, Reply-To entries.
IE a really malformed message.
Dave
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center, 103 S Capitol St.
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{