cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
549 stars 150 forks source link

problems with sieve_fileinto #564

Closed brong closed 14 years ago

brong commented 21 years ago

From: Carl P. Corliss Bugzilla-Id: 2072 Version: 2.2.x Owner: Ken Murchison

brong commented 21 years ago

From: Carl P. Corliss

Using the newest cvs version now and I'm still getting sieve runtime errors:

Jun 12 20:07:12 shiva lmtpunix[17613]: sieve runtime error for
rabbitt@nioka.org id <20030613020636.94EAD1FE42@mail.nioka.org>: Fileinto:
Mailbox does not exist

I'm using altnamespace == yes and virtual domain support is on

my mailboxes look like so:

user/rabbitt user/rabbitt/Projects user/rabbitt/Projects/Xaraya user/rabbitt/Projects/Xaraya/BK-Notices user/rabbitt/Projects/Xaraya/BlockLayout user/rabbitt/Projects/Xaraya/Bugzilla user/rabbitt/Projects/Xaraya/Developer user/rabbitt/Projects/Xaraya/Knowledge-Base user/rabbitt/Projects/Xaraya/PubDev user/rabbitt/Projects/Xaraya/Root user/rabbitt/Projects/Xaraya/Testing

(that's a list of the pertinent mailboxes from cyradm)

my script is:


require "fileinto";

if header :contains "To" ["xaraya_bk-notices@lists.xaraya.com"] { fileinto "Projects/Xaraya/BK-Notices"; } if header :contains "To" ["xaraya_blocklayout@lists.xaraya.com"] { fileinto "Projects/Xaraya/BlockLayout"; } if header :contains "From" "xaraya-bugzilla-daemon@xaraya.com" { fileinto "Projects/Xaraya/BugZilla"; } if header :contains "To" ["xaraya_developer@lists.xaraya.com"] { fileinto "Projects/Xaraya/Developer"; } if header :contains "To" ["xaraya_knowledge-base@lists.xaraya.com"] { fileinto "Projects/Xaraya/Knowledge-Base"; } if header :contains "To" ["xaraya_public-dev@lists.xaraya.com"] { fileinto "Projects/Xaraya/PubDev"; } if header :contains "To" ["xaraya_root@lists.xaraya.com"] { fileinto "Projects/Xaraya/Root"; } if header :contains "To" ["xaraya_test@lists.xaraya.com"] { fileinto "Projects/Xaraya/Testing"; }

brong commented 21 years ago

From: Carl P. Corliss

after applying the patch you gave me, I am receiving this in my logs:

Jun 13 04:41:05 shiva imap[18198]: command received: Login rabbitt@nioka.org Jun 13 04:41:21 shiva lmtpunix[18216]: user: rabbitt@nioka.org mailboxname: Projects/Xaraya/PubDev Jun 13 04:41:21 shiva lmtpunix[18216]: namebuf: user.rabbitt.Projects.Xaraya.PubDev Jun 13 04:41:21 shiva lmtpunix[18216]: duplicate_check: <bcc7jh$oap$1@newton.xaraya.com> user.rabbitt.Projects.Xaraya.PubDev 0 Jun 13 04:41:21 shiva lmtpunix[18216]: sieve runtime error for rabbitt@nioka.org id <bcc7jh$oap$1@newton.xaraya.com>: Fileinto: Mailbox does not exist Jun 13 04:41:21 shiva lmtpunix[18216]: user: rabbitt@nioka.org mailboxname: INBOX Jun 13 04:41:21 shiva lmtpunix[18216]: namebuf: user.rabbitt Jun 13 04:41:21 shiva lmtpunix[18216]: duplicate_check: <bcc7jh$oap$1@newton.xaraya.com> user.rabbitt 1055499167

brong commented 21 years ago

From: Ken Murchison

What is defaultdomain set to, if anything?

brong commented 21 years ago

From: Carl P. Corliss

right now I'm doing the testing on my box which has two domains (which don't resolve to my box anymore because I recently moved and I don't have the nice static IP that I used to have). Anyway, the domain I use as default:

defaultdomain: nioka.org

brong commented 21 years ago

From: Ken Murchison

It appears to be creating the correct mailboxname. What is your setting for hashimapspool, and did you enable fulldirhash at compile time? In fact, the output of cyradm 'ver' might be helpful.

brong commented 21 years ago

From: Carl P. Corliss

hashimapspool is using the default value (false I believe) and, on my home box (gentoo linux), I'm not using fulldirhash but on xaraya.com (redhat 8) I am. however, the problem is the same on both.

On my box (the one I did the cvs update from) I can't use cyradm now (will file this as a bug report later) - nor can I do cleartext logins to imap (even with tls/ssl) nor use the LOGIN method with tls/ssl without getting the sasl error: 'can't request info until later in exchange' (SASL_NOTDONE). Btw, I forgot to mention that I am using 'saslauthd' for sasl_pwcheck_method. Everything is contained within a mysql db.

However, on xaraya.com, cyradm version produces the following output:

name : Cyrus IMAPD version : v2.2.0-ALPHA-Invoca-RPM-2.2.0-2 2003/03/19 19:00:40 vendor : Project Cyrus support-url: http://asg.web.cmu.edu/cyrus os : Linux os-version : 2.4.18-27.7.x environment: Built w/Cyrus SASL 2.1.10 Running w/Cyrus SASL 2.1.10 Sleepycat Software: Berkeley DB 4.0.14: (November 18, 2001) OpenSSL 0.9.6b [engine] 9 Jul 2001 CMU Sieve 2.2 TCP Wrappers mmap = shared lock = fcntl nonblock = fcntl auth = unix idle = idled dirhash = full mboxlist.db = skiplist subs.db = flat seen.db = skiplist duplicate.db = skiplist tls.db = skiplist netnews.db = berkeley

note: I know I probably shouldn't be using skiplist for the duplicate db but, db4 was giving way to many problems and I needed cyrus working, so I'm using skiplist for now until I figure out the db4 problems.

hope this helps....

brong commented 21 years ago

From: Ken Murchison

You probably want to do a clean rebuild after you a CVS update. Otherwise you can have wacky things happen due to the numerous changes in the code that may have occurred.

brong commented 21 years ago

From: Carl P. Corliss

yeah, on my home (gentoo linux) box, I created some temporary ebuilds that do clean builds. They grab the cyrus-imapd-2.2.0-ALPHA tar ball, untar it, run cvs updated -P on it, delete the configure / Makefile if they exist and run 'sh SMakefile', then it runs the ./configure with the options I specified and then builds the package and reinstalls it.

brong commented 21 years ago

From: Ken Murchison

Do you have unixhierarchysep enabled? I assume that you do, since you're using '/' in your mailbox names.

brong commented 21 years ago

From: Carl P. Corliss

sorry, forgot to mention that. Yep, unixhierarchysep is turned on. Haven't slept yet so my mind isn't using a full deck right now...

brong commented 21 years ago

From: Carl P. Corliss

I'm sorry, actually I have hashimapspool turned on (set to 'yes')... I think it's time to get some sleep...

actually, here's my imapd.conf file:


postmaster: postmaster servername: mail.nioka.org

virtdomains: yes defaultdomain: nioka.org

use / instead of .

unixhierarchysep: yes

allow personal folders to reside on the

same level as the user's inbox folder

altnamespace: yes sharedprefix: share userprefix: user-share

allow the 'newnews' command in nntp

allownewnews: no

Don't forget to use chattr +S (if you are using ext[23])

when you change these directories (read the docs).

configdirectory: /var/imap partition-default: /var/spool/imap sievedir: /var/imap/sieve

tls_ca_file: /var/imap/server.pem tls_cert_file: /var/imap/server.pem tls_key_file: /var/imap/server.pem

Don't use an everyday user as admin.

admins: cyrus

hashimapspool: yes allowanonymouslogin: yes allowplaintext: yes

Use this if sieve-scripts could be in ~user/.sieve.

sieveuserhomedir: no

number of allowed scripts per user and max size (in KB) of scripts

sieve_maxscriptsize: 32 sieve_maxscripts: 5

sievenotifier: log mailnotifier: log

Use saslauthd if you want to use pam for imap.

But be warned: login with DIGEST-MD5 or CRAM-MD5

is not possible using pam.

sasl_pwcheck_method: saslauthd sasl_mech_list: PLAIN

sendmail binary

sendmail: /usr/sbin/sendmail

default quota amount

autocreatequota: 10000

brong commented 21 years ago

From: Ken Murchison

I think I found the problem. Either grab the latest lmtpd.c from CVS or apply this patch: http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/lmtpd.c.diff?r1=1.99.2.32&amp;r2=1.99.2.33&amp;f=u

brong commented 21 years ago

From: Carl P. Corliss

works now!! :)