This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/oschwald/maxminddb-golang" | |
) | |
func main() { |
This file contains hidden or 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
-- /etc/rspamd/rspamd.local.lua | |
local lua_maps = require 'lua_maps' | |
local rspamd_util = require 'rspamd_util' | |
local mail_to_allowed_user_map = rspamd_config:add_map{ | |
type = "map", | |
url = '/etc/rspamd/mail_to_allowed_user.map', | |
} |
This file contains hidden or 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
-- /etc/rspamd/rspamd.local.lua | |
local lua_maps = require 'lua_maps' | |
local rspamd_util = require 'rspamd_util' | |
local dn_to_email_map = rspamd_config:add_map{ | |
type = "map", | |
url = '/etc/rspamd/restricted_dn.map', | |
--[[#example map content: | |
"Foo Bar" [email protected] |
This file contains hidden or 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
-- rspamadm lua -s load.lua -a message.eml | |
rspamd_task = require 'rspamd_task' | |
ok, task = rspamd_task.load_from_file(arg[1]) | |
assert(ok) | |
assert(task:process_message()) |