Sieve junks mail script creating links

@lbutlr kremels at kreme.com
Wed Feb 19 03:58:07 EET 2020


My Junk mailbox is still filling up with hard linked emails. There are some junk mails with over 3000 hard linked files and over half a million files in the .Junk/cur folder.

I had a handy script to remove them all by doing a find for inodes and sorting the list by age and keeping the olds hard link and removing all the others, but I now can’t find it :/ so I have just taken to periodically nuking the entire folder, but I’d like to fix this.

*everything is current on FreeBSD 12.1-RELEASE

=> dovecot.conf
imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve

=> /usr/lib/dovecot/sieve/report-spam.sieve:
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];

if environment :matches "imap.user" "*" {
  set "username" "${1}";
}

pipe :copy "sa-learn-spam.sh" [ "${username}" ];


=> /usr/lib/dovecot/sieve/sa-learn-spam.sh:
#!/bin/sh
exec /usr/local/bin/sa-learn -u ${1} —spam


-- 
When the stars threw down their spears And watered heaven with their
	tears, Did He smile his work to see? Did He who made the Lamb
	make thee?




More information about the dovecot mailing list