PDA

View Full Version : Cyrus Sieve (issue/problem/bug?)


Rolled_Gold
2004-08-05, 08:07 PM CDT
Fedora Core 2 and all the default rpms....

Half way through replacing a proprietary email server and I've run into a bit of a bug I think. One of the great things about Cyrus Imap is sieve. I've got the squirrelmail pluggin avelsieve up and running so users can setup thier own server side rules.

They all work great except for vacation notices. So I setup websieve thinking it's possibly a problem with avelsieve. They both show the same problem. Both never send the vacation message apon recieving mail. The sieve scripts look to be in good order.

Is FC 2's build of cyrus sieve buggy? Anyone else have a working sieve vacation notice up and running?

blammo
2004-08-05, 08:40 PM CDT
I just did a test of this and it shot off the vacation replies without a problem. I got Cyrus paired with Sendmail with pretty much the default setup. I'm using websieve to write the rules. What happens when this happens? Anything in the logs? Are you using Postfix?

Rolled_Gold
2004-08-06, 08:15 AM CDT
Using sendmail. Nothing shows up in maillog, messages, or http/error_log (creation of the sieve rules). Could you post your working vacation sieve script? (in /var/lib/imap/sieve). This is odd because I see this problem on my test server as well as my soon to be production system.

I have done some tweaking to the cyrus config and installed mimedefang/SA/ClamAV on sendmail but I can't imagine I've done anything too crazy to just break vacation notifications while the rest of sieve works.

As I understand it the proccess lmtpd is the one that actually sends the vacation notice. It never logs anything about being unable to send the vacation notices.

blammo
2004-08-06, 08:33 AM CDT
# Mail rules for user joe
# Created by Websieve version 0.63a
require ["fileinto","vacation"];

if allof (header :contains "subject" "mailtest") {
redirect "user@domain.com";
}

else {
keep;
}


vacation :days 1 :addresses ["user@domain1.net", "user@domain2.com"] text:
Autogenerated Message:
On vacation for the next week
.
;


Here's the script as generated by websieve. I've got pretty much the same setup as you with ClamAV and SA, but not mimedefang. I've done nothing extensive with this setup on FC2.

xploraiswakco
2004-08-16, 07:01 PM CDT
I'm having the same problem, and have confirmed that sieve scripts are otherwise working, just not the vacation section.

Rolled_Gold
2004-08-27, 12:09 PM CDT
Are you using avelsieve to generate the scripts as well?

xploraiswakco
2004-09-01, 11:51 PM CDT
yes.

I have also tried manually setting up the sieve vacation script from the command line, still no help. :(

xploraiswakco
2004-09-02, 01:16 AM CDT
ok, got mine working, only real change done, was where the MAILER line for cyrus was in the sendmail.mc file was, made sure it was absolutely LAST, and now the vacation script is working.

(this is the ONLY change i have done, and I only did that to start attempting to re-enable procmail for using another vacation method outside of cyrus.)

Rolled_Gold
2004-09-07, 12:59 PM CDT
It would appear that sendmail is not properly formating the mail as it hands it off to lmtpd. I had to edit my .mc with the following to get vacation messages to work...

ifdef(`CYRUS_MAILER_ARGS',,
`define(`CYRUS_MAILER_ARGS', `deliver -e -f $f -m $h -- $u')')

blammo
2004-09-07, 06:55 PM CDT
These are the only three lines I put in my sendmail.mc and sieve vacations worked right from the get go. This is a stock FC2 install. I'm not a sendmail whiz by any means, but can you or anyone else shed some light on what I put in my .mc and the totally different lines you put in yours? I guess the point is moot because it's now working for you, but I'd still like to know!

define(`confLOCAL_MAILER',`cyrusv2')dnl
define(`CYRUSV2_MAILER_ARGS',`FILE /var/lib/imap/socket/lmtp')dnl
MAILER(cyrusv2)dnl

Rolled_Gold
2004-09-08, 12:46 PM CDT
This shows once again there are always atleast 2 ways to do the same thing in Unix. Either you specify version two of cyrus or you have to define how sendmail presents mail to cyrus.

Both work .. however yours is imho more eloquent.

I tested your .mc config on my side and it works aswell. So either your .mc should look like this...

MAILER(cyrus)dnl
define(`confLOCAL_MAILER',`cyrus')dnl
ifdef(`CYRUS_MAILER_ARGS',,
`define(`CYRUS_MAILER_ARGS', `deliver -e -f $f -m $h -- $u')')

or like this...

define(`confLOCAL_MAILER',`cyrusv2')dnl
define(`CYRUSV2_MAILER_ARGS',`FILE /var/lib/imap/socket/lmtp')dnl
MAILER(cyrusv2)dnl

DeathRipple
2005-03-28, 09:02 AM CST
guys, I know it's been a while, but I have the same stupid problem...fc2, sendmail with cyrus, sealed mailboxex, no user can log in. I've red all that is to be about sieve and how can I insert a script with a vacation message...no luck....can please someone tell me the steps to finally get some results? (my .mc file will be posted, if needed)

blammo
2005-03-28, 11:58 AM CST
To insert sieve scripts, you would use sieveshell. It should be installed by default with Cyrus. Just type "sieveshell localhost" and enter your password. After that type "help" and it should give information on how to put, delete, activate, deactivate scripts, etc. There's a couple of web interfaces for sieve that make all this easy for the user, i.e., websieve, avelsieve (squirrelmail plugin).

DeathRipple
2005-03-28, 10:21 PM CST
done that. I'm familiar with sieveshell. I'm using the sievshell localhost command as root. I've managed to put a script with no problems, activated it. nothing happens. I've told you already, I cannot log in as an user, since I'm not allowed to do so. problem is that the script seems to work, but only for root account, and that's stupid....so, once again, if you can fill me with some more details about this problem, I'm only ears. bottom line is, how can I make a script to work for one user, but not root? I mean, the man wants to go on vacation, I write a script to automatically answer all incoming mail for his emaill address.

blammo
2005-03-29, 08:10 AM CST
Yea, I dunno then. If I'm root I can put a script for another user by running:
sieveshell -u username localhost
Also make sure the user has been added to the saslpasswd database:
saslpasswd -c username
Other than that, it beats the hell out of me.

DeathRipple
2005-03-29, 10:22 PM CST
hehe....it gets even more complicated....auth of the users is beeing done via a RADIUS server located on a win2003 SBS machine with Active Directory service. hell, what I've tried is to simply copy the bytecode file from /var/lib/imap/sieve/r/root dir to /var/lib/imap/sieve/u/user_name. the result is that I don't recieve anymore the following message on /var/log/maillog:

ns lmtpunix[29986]: IOERROR: fstating sieve script /var/lib/imap/sieve/u/user_name/defaultbc: No such file or directory

so, does this mean that the file gets actually to be executed? if it does, how can I debug it, since I didn't manage to send any vacation message