Hello,
is it possible to whitelist specific user-agent (x-mailer) in Rspamd?
Thank you.
The multimap module should help I am sure
Yes, it works! Thank you for navigating me!
Could you show us what you did, it could help someone else, or we could advice your more
Sure:
I’ve added this into /etc/rspamd/local.d/multimap.conf (actually, using the template system: /etc/e-smith/templates-custom/etc/rspamd/local.d/multimap.conf/10base):
# Whitelist user-agent AGENT_WHITELIST { type = "header"; header = "X-Mailer"; map = [ "${CONFDIR}/whitelist_agent.map", ]; prefilter = "true"; action = "accept"; regexp = "true"; symbol = "AGENT_WHITELIST"; }
then I created /etc/rspamd/whitelist_agent.map file with agents I wanted to be whitelisted listed:
#Whitelist-agent map
myagent1
myagent2
(I am just not sure how to implement this whitelist_agent.map file into a template system, because the way it works with e.g. whitelist_from.map is not working with this one (maybe because it is not included in /etc/e-smith/templates/… by default?) but I hope I will figure it out. Anyway, the /etc/rspamd/whitelist_agent.map remains there even after
signal-event nethserver-mail-filter-update
systemctl restart rspamd
)