Questions... need Sieve primer

Jason Bailey, Sun Advocate Webmaster webmaster at sunad.com
Wed Mar 14 18:34:52 EST 2007


Roland Felnhofer wrote:
 > Hi Jason,
 >
 > is that what you want?
 >
 > # Mail rules to file Junk
 > require ["fileinto"];
 > if allof (header :contains  "X-Spam-Flag" "YES") {
 >     fileinto "INBOX.Junk";
 > }
 >
 > Best regards
 > Roland
 >
 > Jason Bailey, Sun Advocate Webmaster wrote:
 >> Hello all,
 >>
 >> I am familiar with what Sieve does, but have never used it. We now 
have a need, and I'm struggling to find info on sieve, particularly 
relating to Cyrus.
 >>
 >> I want a sieve script that moves all mail marked as junk by spam 
assassin (x-spam-flag) into the "Junk" folder (for only one of 4 domains 
we host).
 >>
 >> Is this possible, and if so, is there a good place to look for help? 
I know my Cyrus has sieve support and the directories are defined, but I 
don't know how to enable or install the script, and I have few questions 
on sieve scripting in general.
 >>
 >> Suggestions?
 >>


I think so, except I need it to only apply to one mail domain. In other 
words, if recipient is part of domain.com1, and X-Spam-Flag is set to 
YES, move it into the junk - otherwise do nothing. The reasoning is that 
the other domains we host are entirely POP3 based, and mail moved into 
junk folders on the server could be detrimental to their work flow.

I have been doing some reading in the mean time, and discovered 
sieveshell. Unfortunately, it doesn't allow me to login.

unable to connect to server at /usr/bin/sieveshell line 174, <STDIN>
line 1.

I checked the logs and it says:

Mar 14 17:08:16 fs2 sieve[2714]: executed
Mar 14 17:08:16 fs2 sieve[2714]: accepted connection
Mar 14 17:08:19 fs2 sieve[2714]: no secret in database
Mar 14 17:08:19 fs2 sieve[2714]: badlogin: localhost[127.0.0.1] CRAM-MD5 
authentication failure
Mar 14 17:08:22 fs2 sieve[2714]: badlogin: localhost[127.0.0.1] LOGIN 
authentication failure

Cyrus is set up to use /etc/sasldb2 for authentication. This is where 
I'm the most incapable when it comes to Cyrus. I'm lucky I even got the 
software to do what it does now.

In my imapd.conf, I have:

configdirectory: /var/lib/imap
partition-default: /var/spool/imap
sievedir: /var/lib/sieve
admins: cyrus
allowanonymouslogin: no
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
#sasl_pwcheck_method: saslauthd
lmtp_overquota_perm_failure: no
lmtp_downcase_rcpt: yes
virtdomains: userid
loginrealms: domain1.com domain2.com domain3.com
autocreatequota: 102400
quotawarnkb: 5120
unixhierarchysep: yes
altnamespace: yes
allowplaintext: yes
sasl_pwcheck_method: auxprop
sasl_mech_list: PLAIN LOGIN CRAM-MD5

saslauthd is set up to use pam and is running (the default config for 
the rpm). I have /etc/pam.d/imap and /etc/pam.d/sieve. But given I am 
using /etc/sasldb2, shouldn't it look there before defaulting to 
saslauthd in the first place?

I am running SLES 10 on x86_64 (EM64T)

Jason Bailey, Web/IT Administrator
Sun Advocate / Emery County Progress
webmaster at sunad.com / webmaster at ecprogress.com
(435) 637-0732 (ext 31)



More information about the Info-cyrus mailing list