Last active
August 29, 2015 14:17
-
-
Save brablc/4494714130d9a9f40459 to your computer and use it in GitHub Desktop.
KeyTable.lua for opendkim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- If there is no "@dkim" it means we did not get X-DKIM-Sender header, but From instead. | |
if query == nil or string.find( query, "@dkim$" ) == nil then | |
query = "default=news.shoptet.cz@dkim" | |
end | |
signer = string.gsub( query, "@.*", "") | |
-- Before = | |
s = string.gsub( signer, "=.*", "") | |
-- After = | |
d = string.gsub( signer, ".*=", "") | |
-- Remove dots from selector | |
s = string.gsub( s, "%.", "_") | |
return d, s, "/etc/opendkim/shoptet.private" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment