Hi,
i have a problem with one server to filter the mail with sieve to the
right directories. I setup confixx, cyrus-imap, procmail and spamd on a
debian system. i use cyrus 2.2.13. The Mails are scanned by spamd very
well and after that cyrdeliver put the mails in the right folder. This
works fine. I have to use procmail cause spamd fetches the preferences (
spam level ) out of a mysql database from confixx. But sieve will not
work, thats my great problem. Her i post some logs and confs:
postfix
main.cf:
mailbox_command = procmail -a "$EXTENSION"
master.cf:
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -r ${sender} -m
${extension} ${user}
procmail unix - n n - - pipe
flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user}
EXTENSION=${extension} /etc/procmailrc
procmailrc:
DROPPRIVS=yes
LOGFILE=/var/log/procmail.log
VERBOSE=ON
SHELL=/bin/sh
DELIVERMAIL="/usr/sbin/cyrdeliver"
#IMAP="/usr/sbin/cyrdeliver -a $USER -m INBOX $USER"
IMAP="$DELIVERMAIL -a $LOGNAME -m user.$LOGNAME"
:0fw
* < 256000
| /usr/bin/spamc -f
:0 H
* ! ^From[ ]
* ^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e 's/^rom /From /'
}
:0fw
| formail -f -I "From "
:0w
| $IMAP
imapd.conf:
configdirectory: /var/lib/cyrus
partition-default: /var/spool/cyrus/mail
admins: root cyrus
sasl_pwcheck_method: saslauthd
sasl_auto_transition: no
sasl_mech_list: plain login
srvtab: /var/imap/srvtab
allowanonymouslogin: no
allowplaintext: yes
lmtpsocket: /var/run/cyrus/socket/lmtp
idlesocket: /var/run/cyrus/socket/idle
notifysocket: /var/run/cyrus/socket/notify
sieveusehomedir: false
sievedir: /var/spool/sieve
here is a log on a server where sieve works:
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: duplicate_check:
<44A29700.6040301@xxxxxxxxxx> example.com!user.foo 0
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: mystore: starting txn 2147503790
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: mystore: committing txn
2147503790
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: duplicate_mark:
<44A29700.6040301@xxxxxxxxxx> example.com!user.foo 1151506197 2037
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: mystore: starting txn 2147503791
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: mystore: committing txn
2147503791
Jun 28 16:49:57 srv1 cyrus/lmtpunix[21970]: duplicate_mark:
<44A29700.6040301@xxxxxxxxxx> .foo+@xxxxxxxxxxxxxxxxxx 1151506197 0
here is a log on the server where sieve doesnt work ! You will see the missing sieve in the last line
Jun 28 17:24:55 srv4 cyrus/lmtpunix[30283]: duplicate_check:
<44A29F35.3070907@xxxxxxxxxx> user.web3p1 0
Jun 28 17:24:55 srv4 cyrus/lmtpunix[30283]: duplicate_check:
<44A29F35.3070907@xxxxxxxxxx> user.web3p1 0
Jun 28 17:24:55 srv4 cyrus/lmtpunix[30283]: mystore: starting txn 2147484169
Jun 28 17:24:55 srv4 cyrus/lmtpunix[30283]: mystore: committing txn
2147484169
Jun 28 17:24:55 srv4 cyrus/lmtpunix[30283]: duplicate_mark:
<44A29F35.3070907@xxxxxxxxxx> user.web3p1 1151508295 0
sieveshell is working:
srv4:~# sivtest -a web3p1 localhost
S: "IMPLEMENTATION" "Cyrus timsieved v2.2.13-Debian-2.2.13-2bpo1"
S: "SASL" "LOGIN PLAIN"
S: "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
S: OK
C: AUTHENTICATE "LOGIN"
S: {12}
S: VXNlcm5hbWU6
Please enter your password:
{8+}
C: d2ViM3Ax
S: {12}
S: UGFzc3dvcmQ6
{8+}
C: MjQwMjQ5
S: OK
Authenticated.
Security strength factor: 0
web3p1 is the confixx user who gets still his mails, thats not the problem but without filtering.
sivtest -u web3p1 localhost doesnt work.
i tested to make a script with sieveshell:
srv4:~# sieveshell --auth=web3p1 localhost
connecting to localhost
Please enter your password:
..........
the sieve script was saved on /var/spool/sieve/w/web3p1 with all files and i think with cyrus rights.
Thats is bit different to the mails, they were stored on : /var/spool/cyrus/mail/users/web3p1
I created the the sieve filter with squirrelmail avelsieve, too. They were stored on the same place.
But the mail filter isnt working. Whats my problem. I have tried a lot, but now i am without latin .....
With my constellation i had to use:
mailbox_command = procmail -a "$EXTENSION"
but with this i had to make 751 on on /var/run/cyrus/socket /owner cyrus//group mail but everytime a started cyrus-imap again the rights are changed to 750 and then "cyrus/lmtpunix -> lmtp denied"
if i chaange main.cf (postfix) to:
mailbox_command = procmail
-> there is no lmtp problem. Ithink its the problem with the user web3p1 but i have to do this cause of procmail spamd and the confixx spamd local.cf for every user.
But for now :) sieve is my big problem. What to do ?
Greetings Holm
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html