testing dovecot LMTP with postfix/spamassassin
Marek Kozlowski
m.kozlowski at mini.pw.edu.pl
Sat Mar 16 16:49:36 EET 2019
:-)
My postfix configuration is quite complex with a lot of special cases
and rules. However I'd like to make an anti-spam configuration as simple
and lightweight as possible (KISS).
/etc/postfix/master.cf
------------------------------------------------------------------------
smtp inet n - n - - smtpd
-o content_filter=spamassassin
spamassassin unix - n n - - pipe
user=nobody argv=/usr/bin/vendor_perl/spamc -e /usr/sbin/sendmail -oi
-f ${sender} ${recipient}
------------------------------------------------------------------------
then the simplest sieve rule I can think of:
------------------------------------------------------------------------
require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Spam";
}
------------------------------------------------------------------------
I'd like to make this rule active for only local deliveries via dovecot
LMTP with sieve plugin and setting postfix `mailbox_transport' to
dovecot LMTP.
I believe it is so simple it should work (am I wrong?). But...
It would be more convenient to do some tests before applying changes to
a production environment config. The problem is: I have no separate
testing environment with my strange configuration I'm able to test a
spamassassin score for an e-mail manually. How about dovecot LMTP? Can I
test local mail delivery by dovecot LMTP manually? I mean: to simulate
"I'm the Postfix" and produce for some testing e-mail the same effect as
postfix granting it via `local_transport' to dovecot?
Best regards,
Marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3914 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190316/e60702bf/attachment.p7s>
More information about the dovecot
mailing list