Thanks, the patch does exactly what I intended.
However, I cannot get the ARC-Authentication-Header to change.
The best thing I was able to produce using the settings was to create a new Authentication-Results header that didn't have the smtp.auth field:
ARC-Authentication-Results: i=1; auth=pass smtp.auth=[...]
smtp.mailfrom=[...]
Authentication-Results: auth=pass smtp.mailfrom=[...]
That was using the following settings in local.d/milter_headers.conf:
use = ["x-spamd-bar", "authentication-results", "x-spam", "x-spamd-result", "x-rspamd-server", "x-rspamd-queue-id"];
authenticated_headers = ["authentication-results"];
routines {
authentication-results {
add_smtp_user = false;
}
}
If I change the hardcoded value in lualib/auth_results.lua to false, I am able to affect the ARC-Authentication-Results header.
It's pretty obvious I did something wrong with my settings, I don't know what though.
Thanks again,
Martin