Dan Mahoney:
> Hey there all,
> 
> 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.

Envelope or header?

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

Postfix rewrites headers while mail is written to the queue file,
AFTER that, the first Milter gets an opportunity to see message content
and optionally make changes, then the second milter, and so on.
Things would get complicated otherwise.

What you could do is

- Implement the header rewrite with a Milter that follws the DKIM
militer. Not much fun there.

- Run multiple Postfix instances, or implement CONTENT_FILTER_README
with Postfix talking over SMTP to itself without going through an
actual content filter. Do the DKIM check in Postfix before the
fake content filter, and do the header rewriting in Postfix after
the fake content filter.

        Wietse

Reply via email to