On Tuesday, November 29, 2011 at 02:28:29 UTC, seandarcy2@gmail.com confabulated:
I can't get sieve to put virus files in the SPAM folder.
dovecot -n # 2.0.16: /etc/dovecot/dovecot.conf # OS: Linux 2.6.38.8-32.fc15.i686.PAE i686 Fedora release 15 (Lovelock) auth_debug_passwords = yes info_log_path = /var/log/dovecot-info.log log_path = /var/log/dovecot.log mail_access_groups = mail mail_home = /home/vmail/%d/%n mail_location = maildir:~/mail mail_privileged_group = mail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date mbox_write_locks = fcntl passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users driver = passwd-file } plugin { antispam_backend = dspam-exec antispam_dspam_args = --deliver;--user;%u antispam_dspam_binary = /usr/bin/dspam antispam_signature = X-DSPAM-Signature antispam_signature_missing = error antispam_spam = Spam antispam_trash = trash;Trash;Deleted Items; Deleted Messages sieve = /home/vmail/%d/%n/dovecot.sieve.script sieve_dir = /home/vmail/%d/%n/dovecot.sieve/ sieve_global_dir = /var/lib/dovecot/sieve/global/ sieve_global_path = /var/lib/dovecot/sieve/default.sieve } service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } service lmtp { inet_listener lmtp { address = 127.0.0.1 port = 24 } user = vmail } ssl_cert =
cat /var/lib/dovecot/sieve/default.sieve require "fileinto"; if header :contains "X-DSPAM-Result" "Virus" { fileinto "SPAM"; }
if header :contains "X-DSPAM-Result" "Spam" { fileinto "SPAM"; }
and there is a folder SPAM:
cat mail/subscriptions Sent Trash Drafts SPAM
yet :
Content-Type: multipart/alternative; boundary=14dae9399d3b9b67cc04b2d60790 X-DSPAM-Result: Virus X-DSPAM-Processed: Mon Nov 28 21:03:47 2011 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 1.0000 X-DSPAM-Signature: 4ed43d8341479178914901
--14dae9399d3b9b67cc04b2d60790 Content-Type: text/plain; charset=ISO-8859-1
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
does not end up into SPAM, or anyplace else, including inbox.
How do I make this work?
What gets logged? If sieve has an issue storing something, it is logged.
If you don't have the autocreate plugin loaded, the directories have to be created some other way. Does SPAM exist as a directory?
Have you compiled the global sieve file using sievec?
Does the particular mail account have sieve rules? Global rules are not executed if there are account rules. If that is the case, check out the sieve_before and sieve_after parameters.
-- There are 10 kinds of people in the world... Those who understand binary, and those who don't.