1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-14 10:52:49 +02:00
mailcow-dockerized/data/conf/rspamd/local.d/dkim.conf
2016-12-09 20:39:02 +01:00

20 lines
747 B
Plaintext

sign_condition =<<EOD
return function(task)
local from = task:get_from('smtp')
if from and from[1]['addr'] then
lastAtSymbol = from[1]['addr']:find("[^%@]+$")
local domain = from[1]['addr']:sub(lastAtSymbol, #from[1]['addr'])
local keyfile = io.open("/etc/rspamd/dkim/keys/" .. domain .. ".default")
if keyfile then
keyfile:close()
return {
key = "/etc/rspamd/dkim/keys/" .. domain .. ".default",
domain = domain,
selector = "default"
}
end
end
return false
end
EOD;