-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02-02-16 18:20, @lbutlr wrote: > So it seems that no one uses spamassassin -d to remove markup for > spam messages reclassified as ham? > > OK, I can work with that. > > The trouble with using formail/procmail is that the "mailbox > timestamp" for the message will change, but i’ll cobble together a > procmailrc to feed to formail and see how it all works. Also, since > amavisd runs spamassassin, there is the issue of keeping the mail > in the right user’s maildirs. > > find $H_PATH -type f -mtime -${AGED} | grep -v dovecot | \ xargs > /usr/local/bin/sa-learn --ham -u ${AMUSER} >/dev/null 2>&1 > > Is what runs currently > > find $H_PATH -type f -mtime -${AGED} | grep -v dovecot | \ xargs > /usr/local/bin/procmail -m /path/to/despammingrc > > should be a start, though how to manage multiple users… Well, we’ll > work on that. >
There is a different problem here: you shouldn't alter a message that is stored in IMAP. You should create a new message (with markup removed) in the same folder, and then delete the old one. This does mean that the MUA will have to download the message again. Which should happen anyway after you alter the message server-side, since otherwise the MUA shows the locally cached message (without altered headers) to the user. For details on what you can and cannot do, please seek for advice on the dovecot mailing list. IMHO, removing the markup is simply not a good idea: probably easier to use headers only (i.e. no subject tagging), and then use IMAP flags to highlight spam messages for the user. These can be unset later without 'nasty' tricks. Regards, Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWsS1nAAoJEJPfMZ19VO/1BaYQAN4xKvDhh6XBgywnt7LQCcVk tWKNeC5ECMNCYfk4RYAkEIwK3TtnDfA+c2PM6QIfES4r7op7YYSYc0c8stOOV8DR 3njgAJP7WLU5S/pKJzItZPUICQEj1OqsLiXVEWYYhR5uNHJA8JmCDlM0giZWX2xM 531Tn+6OeOpjHqgA2JOizdTb2IaWbAf8JAmXApq6ZtiFQ4tnR3N8q0H7ECRNTZEM ySJbjX4ZxLYGNGfOSsv8/l6/nN+pWJasNIG1GriRzbNIYlG5bxAggDC9vtmdycmq lL68Oo8D47+9b7W9p6GtwMK+qARk+bJmlCRJbhmDrrz9silPLT6/1WQruClDpJMa pEczH1F0jKesVABE9PbPq2YEELq7U5hi1+N4IBKzHbbYeIXboMnt/lEEk32cZOVD SbIKAh2pxzKh/qJMwWFg3Ap60PtSgYpkHX10HmDPqTTXGDiRgX98yHCaBjdZyMwF rRTMjDekadJBtBhuPbmgPN7GmACGv7pQcpLfy1NxwALtFEPzzkpwyyz1I6CKbsN/ 7O1SjJ38OXw5x9zxizFSoncfsmTpql+XPODeaVkMT8d8ldMj/XnnW5pgbSyyh3fQ +MoK39MuoJ7a32n5nkmil/uLG6zsnwU4DrGZ8Y3gIkSZWHvKni/jmrTVTvAM4lLu IpdKG1iKY7OnTYKwpCrr =fkvv -----END PGP SIGNATURE-----