Malcolm Locke wrote:
On Wed, Mar 14, 2007 at 05:34:52PM -0600, Jason Bailey, Sun Advocate Webmaster wrote:
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.
Sieve is applied per mailbox, not across the whole server. To upload
and enable the sieve script 'mysieve' for mailbox 'joebloggs':
$ sieveshell -a joebloggs -u joebloggs cyrusserver
# Enter joebloggs IMAP / POP password
> put mysieve
> activate mysieve
> list
mysieve <- active script
You will have to tune the contents of 'mysieve' to your needs, if you
google 'spamassassin sieve' you should find plenty of examples.
Malc
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@xxxxxxxxx / webmaster@xxxxxxxxxxxxxx
(435) 637-0732 (ext 31)
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Okay... sieve is per mailbox. That actually works out to my benefit.
So how do I get sieveshell to let me login? The authentication aspects
of Cyrus are my weakest spot... I don't know what I'm doing. All I know
is that it won't let me login. Documentation is spotty at best. What now?
The imaptest works, logins directly through cyrus (or cyradm, for that
matter) work fine. But sieveshell doesn't.
Ideas?
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html