On 07.10.22 13:20, Dan Mahoney wrote:
We have a couple of recipient canonical maps that do things like transform
firstname_lastname into username (i.e. dan_mahoney --> dmahoney), also
handle things like mapping people's former names into current names.
This is useful where a user wants to have one canonical spamassassin
settings folder, which spamass-milter gets by looking at the left hand
side of the address. So we clearly want spamass-milter to run after this
rewriting happens.
spamass-milter supports executing "sendmail -bv" which, with original
"sendmail" program expands given recipient to real username, usable for
spamc/spamd
spamass-milter man page:
-x Pass the recipient address through sendmail -bv, which will per‐
form virtusertable and alias expansion. The resulting username
is then passed to spamc. Requires the -u flag. The spamass-mil‐
ter configuration process does its best to find sendmail, but it
is possible to override this compiled-in setting via the
sendmail's sendail man page:
-bv Verify names only - do not try to collect or deliver a message.
Verify mode is normally used for validating users or mailing
lists.
it works like this:
# sendmail -bv postgres
postgres... deliverable: mailer local, user postgres
# sendmail -bv fantomas
postgres... deliverable: mailer local, user postgres
# sendmail -bv mailtest
uucp... deliverable: mailer local, user uucp
proxy... deliverable: mailer local, user proxy
unfortunately, this does not work with postfix sendmail which has different
functionality:
postfix' sendmail page:
-bv Do not collect or deliver a message. Instead, send an email re‐
port after verifying each recipient address. This is useful for
testing address rewriting and routing configurations.
This feature is available in Postfix version 2.1 and later.
however, spamass-milter supports specifying path to the "sendmail" binary:
spamass-milter man page:
-S /path/to/sendmail
This option is used in conjunction with the -x option to specify
a path to sendmail if the default compiled in choice is not sat‐
isfactory.
writing program/script that would be able to process postfix'
virtual_alias_maps or alias_maps and expand the name would be alternative
approach to your problem.
On the other side...we want our DKIM checks to run BEFORE this thing,
since otherwise, the DKIM signatures on the to: line will not match.
Is there a way to tell specific milters where in this chain to fire?
--
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.
We are but packets in the Internet of life (userfriendly.org)