From f2820a509d91061b65fa32ec4e647cbd29760195 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 19 Jun 2022 19:55:38 -0400 Subject: Change to filter style from pipe. --- README | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'README') diff --git a/README b/README index 256e536..f7dc217 100644 --- a/README +++ b/README @@ -76,8 +76,9 @@ total messages from this sender, and there are 19 remaining). * INSTALLATION 1) See INSTALL to install the library and spamcat executable. 2) Once the spamcat executable is installed you'll need to add it to - your procmail, sieve, or some other similar device that takes an - email on standard input and expects local delivery. + your procmail, sieve, or some other similar device that writes + email to standard input and receives the transformed email on + standard output. 3) You will also need to create a config file for spamcat (see config/spamcat.conf for an example) somewhere that can be read by spamcat. @@ -89,35 +90,35 @@ total messages from this sender, and there are 19 remaining). *** main.cf Postfix needs to know that the spam domain should be handled locally. -#+BEGIN_COMMENT -virtual_mailbox_domains = spamcat.domain somewhere.else -#+END_COMMENT +#+begin_example + Virtual_mailbox_domains = spamcat.domain somewhere.else +#+end_example *** virtual aliases table Make sure postfix can route the spam domain to the user who should receive it. -#+BEGIN_COMMENT -@spamcat.domain hidden-address@somewhere.else -#+END_COMMENT +#+begin_example + @spamcat.domain hidden-address@somewhere.else +#+end_example ** Dovecot/Sieve The sieve file for the user which receives mail for the spam domain should pipe the email into spamcat, which will handle final delivery for the spam domain. -#+BEGIN_COMMENT -require ["fileinto", "envelope", "vnd.dovecot.pipe"]; +#+begin_example + require ["fileinto", "envelope", "vnd.dovecot.filter"]; + + if address :contains "to" "@spamcat.domain" { + filter "spamcat" ["-c", "/path/to/spamcat.conf"]; + } +#+end_example -if address :contains "to" "@spamcat.domain" { - pipe :try "spamcat" ["-c", "/path/to/spamcat.conf"]; - fileinto "Junk"; -} -#+END_COMMENT ** DNS The MX record for your spam domain should point to the MTA that hosts spamcat. -#+BEGIN_COMMENT -spamcat.domain MX 10 yourmta.domain. -#+END_COMMENT +#+begin_example + spamcat.domain MX 10 yourmta.domain. +#+end_example -- cgit v1.2.3