From 7fe09df1b4dd90bfe6f180b2bfaff2ae9c012c0c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 26 Dec 2014 06:29:35 +0000 Subject: [PATCH] Add documentation for data_post and data_post_headers --- docs/hooks.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/hooks.md b/docs/hooks.md index 0c74c29..cb435d3 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -339,10 +339,35 @@ Arguments: __FIXME:__ check arguments +## hook\_data\_post\_headers + +The `data_post_headers` is called after the client sent the final `.\r\n` +of a message. This is meant for plugins that modify headers before the message +is processed by `data_post` phase below. + +Allowed return codes are + +- DENY + + Return a hard failure code + +- DENYSOFT + + Return a soft failure code + +- DENY\_DISCONNECT / DENYSOFT\_DISCONNECT + + as above but with disconnect + +Example plugin is `dkim`, `domainkeys`, `dmarc`. + ## hook\_data\_post -The `data_post` hook is called after the client sent the final `.\r\n` -of a message, before the mail is sent to the queue. +The `data_post` hook is called after all headers has been added in +`data_post_headers` above. This is meant for plugins that expects complete +messages, such as content analyzing spam filters. Plugins can still add +headers in this hook, however it is recommended only informational headers +are added here. Allowed return codes are @@ -372,7 +397,7 @@ Arguments: my ($self, $transaction) = @_; -Example plugins: `spamassassin`, `virus/clamdscan` +Example plugins: `spamassassin`, `virus/clamdscan`, `dspam` ## hook\_queue\_pre