diff options
author | Brian Cully <bjc@kublai.com> | 2022-06-19 19:55:38 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-06-19 19:56:37 -0400 |
commit | f2820a509d91061b65fa32ec4e647cbd29760195 (patch) | |
tree | 7685f169b96a6b279c910e0021ca38538a124f9b /README | |
parent | e8235e7264e467f6dd64587fbd26faad2f74cbbc (diff) | |
download | spamcat-f2820a509d91061b65fa32ec4e647cbd29760195.tar.gz spamcat-f2820a509d91061b65fa32ec4e647cbd29760195.zip |
Change to filter style from pipe.
Diffstat (limited to 'README')
-rw-r--r-- | README | 37 |
1 files changed, 19 insertions, 18 deletions
@@ -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 |