mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
smtpsrv: Implement a post-DATA hook
This patch implements a post-DATA hook, which is run after receiving the data but before sending a reply. It can be used to implement content filtering when receiving email, for example for passing the email through an anti-spam or an anti-virus.
This commit is contained in:
@@ -62,6 +62,7 @@ func main() {
|
||||
s := smtpsrv.NewServer()
|
||||
s.Hostname = conf.Hostname
|
||||
s.MaxDataSize = conf.MaxDataSizeMb * 1024 * 1024
|
||||
s.PostDataHook = "hooks/post-data"
|
||||
|
||||
s.SetAliasesConfig(conf.SuffixSeparators, conf.DropCharacters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user