It goes on to say, however, that Â«Rspamd does not use this settingÂ».
That's a bummer, since Rspamd does have a concept of individual user profiles
(including per-user Bayesian databases), just like SpamAssassin.
It would therefore be nice if a future release of Exim would support
communicating the username to Rspamd directly, just like SpamAssassin does. The
way to do that, is to add the Â«Deliver-To: USERNAMEÂ» header to the Â«CHECK
RSPAMCÂ» request. This mimics the behaviour of command line checking with
Â«rspamc --deliver USERNAME [...]Â».
(Note that Â«Deliver-ToÂ» is not a MIME header to be added to the e-mail itself,
but a RSPAMC protocol header.)
Without the Deliver-To RSPAMC header added, Rspamd will attempt to figure out
which user profile to use by looking at other properties of the e-mail itself,
including Â«Delivered-ToÂ» and the envelope recipient. That's not ideal though,
as you'll end up with lots of "users" in the Bayesian database for various
mailing lists (which might add Â«Delivered-ToÂ»), and individual "users" for all
the various aliases that are routed to the same recipient.
That said, it appears that the first appearing Â«Delivered-ToÂ» header in the
e-mail itself has the highest priority of this heuristic. So it is possible to
work around this Exim limitation by doing something like this in the RCPT ACL
(can't be done in the DATA ACL as headers added there don't get passed to
Rspamd ref bug #846):