Re: Please help: Can auth but can't select

2005-06-07 Thread Nick Fisher
Hi Philip
Thanks for the mail. One of my raid arrays was indeed
having a problem but was used for nothing more than
mp3 storage. I totaly discounted the idea that it
might be responcable for Cyrus's problems but it
was. If I bring the server up without that array
mounted Cyrus works like it's old self again. 
Frankly I'm supprised that Cyrus had such a problem
when none of the other apps on the server even seemed
to notice. Thanks again for the push in the right
direction.

  Nick

--- Philip Edelbrock <[EMAIL PROTECTED]> wrote:

> 
> Hi, I'm mostly a lurker and just receintly set up a
> cyrus-imapd server.
> 
> But, a few basic suggestions come to mind: Check
> your harddrive(s) to 
> make sure they aren't failing (check dmesg, run
> 'smartctl -a hdx', 
> etc.).  When disks fail, they tend to get really,
> really slow.
> 
> Check to make sure you drives aren't full ('df').
> 
> Lastly, you might check to see if there's a specific
> process slowing 
> things down (netstat, top, etc.).
> 
> Good luck!
> 
> 
> Phil
> 
> Nick Fisher wrote:
> > Hello!
> > My Cyrus imapd installation suddenly slowed to a
> crawl
> > and stopped yesterday. As of now I can
> authenticate
> > (very quick and responsive) but I cannot do
> anything
> > after that. Very occasionally I can do a select
> and
> > retrieve a message but it take a *VERY* LONG time.
> I
> > have tested this with multiple clients and it's
> > without a doubt a server problem.
> > This is totally out of character for my Cyrus
> install,
> > it's always been very fast and stable. Nothing
> much
> > has changed on the server recently. Yesterday when
> > this problem started I had a problem with a bunch
> of
> > unkillable processes (mostly rsync). I ended up
> having
> > to power cycle the machine and everything is back
> to
> > normal except Cyrus.
> > I have combed through the Cyrus logs but I can't
> find
> > any errors, Cyrus appears to be perfectly happy.
> > 
> > I am running Cyrus 2.2.12 on a gentoo system.
> > I have no idea where to start troubleshooting this
> > problem, mostly because I can’t figure out what it
> is.
> > Any advice, pointers or links would be most
> > appreciated. If there are any logs or additional
> > information that would help, I’m happy to supply
> them.
> > 
> > Many thanks
> > 
> >   Nick
> > 
> > 
> > 
> > 
> >
>
___
> 
> > How much free photo storage do you get? Store your
> holiday 
> > snaps for FREE with Yahoo! Photos
> http://uk.photos.yahoo.com
> > ---
> > 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
> > 
> 






___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com
---
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


Please help: Can auth but can't select

2005-06-07 Thread Nick Fisher
Hello!
My Cyrus imapd installation suddenly slowed to a crawl
and stopped yesterday. As of now I can authenticate
(very quick and responsive) but I cannot do anything
after that. Very occasionally I can do a select and
retrieve a message but it take a *VERY* LONG time. I
have tested this with multiple clients and it's
without a doubt a server problem.
This is totally out of character for my Cyrus install,
it's always been very fast and stable. Nothing much
has changed on the server recently. Yesterday when
this problem started I had a problem with a bunch of
unkillable processes (mostly rsync). I ended up having
to power cycle the machine and everything is back to
normal except Cyrus.
I have combed through the Cyrus logs but I can't find
any errors, Cyrus appears to be perfectly happy.

I am running Cyrus 2.2.12 on a gentoo system.
I have no idea where to start troubleshooting this
problem, mostly because I can’t figure out what it is.
Any advice, pointers or links would be most
appreciated. If there are any logs or additional
information that would help, I’m happy to supply them.

Many thanks

  Nick




___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
---
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


(SOLUTION) What happened to my db/ ?

2004-01-22 Thread Nick Fisher
I'm still unsure as to what caused this problem. The idea of the DBs being
different was a good one but I could never proove it. Both systems DB
enviroments claimed to be 4.0.14 and everything in cyrus it's self claimed
to be using DB3. I could find no difference between the installs.

At the end of the day I decided to rebuild my mailboxs.db and delete
everything else database related in /var/imap apart from the user folder.
I used ctl_mboxlist to dump to a text file and then (after the deleting)
rebuild from the text file.

Everything works **perfectly** now.

Thanks to all for the help and perticulary 'Joe Hrbek' who helped me alot
off list and 'Ken Murchison' who always seems to give me that final push
when I need it ;)

  Nick

>> Hello All,
>>   I recently moved my cyrus-imapd install from one machine to annother.
>> The move went *quite* well, I had both servers stoped and rsynced the
>> live server's data (/var/imap, /var/spool/imap) over to the new server.
>>
>> Everything was fine untill I started playing with SSL, at that point I
>> started having problems getting cyrus running after a restart.
>>
>> Here is what I was seeing in my logs:
>> """
>> Jan  8 17:27:11 [tls_prune] DBERROR db4: operation not permitted during
>> recovery.
>> Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
>> Invalid argument
>> Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
>> cyrusdb error
>> """
>>
>> Somewhere I found a post from someone having the same problem. They said
>> that they could get cyrus working again by removing all the files in
>> /var/imap/db. So I did that. Now I can start cyrus and read my mail
>> *PHEW*. However I now have a new raft of errors showing up in syslog.
>> Everytime I start cyrus I get this:
>> """
>> Jan  8 18:01:42 [master] setrlimit: Unable to set file descriptors limit
>> to -1: Operation not permitted
>> Jan  8 18:01:42 [master] retrying with 1024 (current max)
>> Jan  8 18:01:42 [master] process started
>> Jan  8 18:01:42 [ctl_cyrusdb] recovering cyrus databases
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: DB_ENV->log_flush: LSN past
>> current end-of-log
>> - Last output repeated twice -
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: Recovery function for LSN 1
>> 182
>> failed
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: dbenv->open '/var/imap/db'
>> failed:
>> Invalid argument
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: init /var/imap/db: cyrusdb error
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: environment not yet opened
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
>> Invalid argument
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
>> cyrusdb error
>> Jan  8 18:01:42 [master] process 4105 exited, status 75_
>> Jan  8 18:01:42 [master] ready for work
>> Jan  8 18:01:42 [tls_prune] tls_prune: purged 0 out of 0 entries
>> Jan  8 18:01:42 [ctl_cyrusdb] checkpointing cyrus databases
>> Jan  8 18:01:42 [ctl_deliver] duplicate_prune: pruning back 3 days
>> Jan  8 18:01:42 [ctl_deliver] duplicate_prune: purged 2 out of 742
>> entries
>> Jan  8 18:01:42 [ctl_cyrusdb] done checkpointing cyrus databases
>> """
>>
>> I don't *think* it's a permissions problem...
>> """
>> usr # ls -la /var/imap/db/.
>> total 12952
>> drwxr-xr-x2 cyrusmail 4096 Jan  8 21:15 .
>> drwxr-xr-x   14 cyrusmail 4096 Jan  9 16:45 ..
>> -rw-r--r--1 cyrusmail0 Sep 23 13:31 .keep
>> -rw---1 cyrusmail 8192 Jan  8 21:15 __db.001
>> -rw---1 cyrusmail   270336 Jan  8 21:15 __db.002
>> -rw---1 cyrusmail98304 Jan  8 21:15 __db.003
>> -rw---1 cyrusmail 18063360 Jan  8 21:15 __db.004
>> -rw---1 cyrusmail32768 Jan  8 21:15 __db.005
>> -rw---1 cyrusmail   286763 Jan  9 17:10 log.01
>> """
>>
>> I'm using EXT3 so I don't think it's anything to do with the "chattr +S"
>> stuff.
>>
>> I tryed recompiling cyrus it didn't help.
>>
>> The idea of cyrus dying fills me with dread. Someone please help me out
>> here what is going on and how do I stop it? If someone can give me a
>> bit of a shove in the right direction it would be MOST helpfull.
>> links... generall information even mild abuse, all gratefully
>> accepted.
>
> Hi,
>
> Please search the list archives. IIRC there have been two problems which
> could create messages like yours. One problem is with NPTL on newer RedHat
> Linux and AMD and some other CPU's. The other problem is IIRC something
> with the latest greatest DB4 release. Search for 'DB_ENV' and
> 'dbenv->open', I'm quite sure you'll find out what's wrong.
>
> Simon
>
>>
>> Many thanks
>>
>>   Nick
>>
>
>
>
>



Question on the exact nature of the DBs

2004-01-20 Thread Nick Fisher
Hello all...
  In my quest to sort out the DB errors (see the 'What happened to my db/
?' thread) I've been having a bit of trouble figuring out exactally what
all the DBs are. I was hoping that someone who could look at what I've
got so far and give me a headsup on any errors and answer a few
(hopefully) quick questions.

1) duplicates
Configured with: --with-duplicate-db=DB
Location: /var/imap/deliver.db
Description: Specifies which database backend to use for the duplicate
delivery database.

2) mboxlist
Configured with: --with-mboxlist-db=DB
Location: /var/imap/mailbox.db
Description: Specifies which database backend to use for the mailbox list.
(More here:
http://asg.web.cmu.edu/cyrus/download/imapd/overview.html#recoverymbox)

3) tls db
Configured with: --with-tls-db=DB
Location: /var/imap/tls_sessions.db
Description: Specifies which database backend to use for the TLS cache.

4) seen db
Configured with: --with-seen-db=DB
Location: /var/imap/user/u/user-name.seen
Description: Specifies which database backend to use for the seen state.

5) subscriptions db
Configured with: --with-subs-db=DB
Location: /var/imap/user/u/user-name.sub
Description: Specifies which database backend to use for the subscriptions
list.

Now there are two lots of data that do not appear to be covered in the
above list, db/ and the mailbox/cyrus.(header|index|cache|seen).

What is db/? I can't figure out what exactally it does or what you use to
configure it at compile time. I guess it's part of mailboxs.db in some way
but I would love a better answer

The mailbox/cyrus.* files are fairly well explained here:
http://asg.web.cmu.edu/cyrus/download/imapd/overview.html#recoverymboxdir
But I can't figure out what there format is or how it's configured. is
it native to cyrus?

Why is the reconstruct command in the doc
(http://asg.web.cmu.edu/cyrus/download/imapd/overview.html#recoverymbox)
marked as 'NOTE: CURRENTLY UNAVAILABLE'? What versions does that apply to?

And my final question is about the seen dbs. Each user has their own seen
db and a cyrus.seen in every mailbox. Are the cyrus.seen files just a
backup to reconstruct the /var/imap/user/u/user-name.seen?

Many thanks for the help already given and hopefully for the answers
coming ;)

  Nick


Re: What happened to my db/ ?

2004-01-14 Thread Nick Fisher
 Hello All,
   I recently moved my cyrus-imapd install from one machine to
 annother.
 The move went *quite* well, I had both servers stoped and rsynced the
 live server's data (/var/imap, /var/spool/imap) over to the new
 server.

 Everything was fine untill I started playing with SSL, at that point I
 started having problems getting cyrus running after a restart.

 Here is what I was seeing in my logs:
 """
 Jan  8 17:27:11 [tls_prune] DBERROR db4: operation not permitted
 during
 recovery.
 Jan  8 17:27:11 [tls_prune] DBERROR: opening
 /var/imap/tls_sessions.db:
 Invalid argument
 Jan  8 17:27:11 [tls_prune] DBERROR: opening
 /var/imap/tls_sessions.db:
 cyrusdb error
 """

 Somewhere I found a post from someone having the same problem. They
 said
 that they could get cyrus working again by removing all the files in
 /var/imap/db. So I did that. Now I can start cyrus and read my mail
 *PHEW*. However I now have a new raft of errors showing up in syslog.
 Everytime I start cyrus I get this:
 """
 Jan  8 18:01:42 [master] setrlimit: Unable to set file descriptors
 limit
 to -1: Operation not permitted
 Jan  8 18:01:42 [master] retrying with 1024 (current max)
 Jan  8 18:01:42 [master] process started
 Jan  8 18:01:42 [ctl_cyrusdb] recovering cyrus databases
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: DB_ENV->log_flush: LSN past
 current end-of-log
 - Last output repeated twice -
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: Recovery function for LSN 1
 182
 failed
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: dbenv->open '/var/imap/db'
 failed:
 Invalid argument
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: init /var/imap/db: cyrusdb
 error
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: environment not yet opened
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
 Invalid argument
 Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
 cyrusdb error
 Jan  8 18:01:42 [master] process 4105 exited, status 75_
 Jan  8 18:01:42 [master] ready for work
 Jan  8 18:01:42 [tls_prune] tls_prune: purged 0 out of 0 entries
 Jan  8 18:01:42 [ctl_cyrusdb] checkpointing cyrus databases
 Jan  8 18:01:42 [ctl_deliver] duplicate_prune: pruning back 3 days
 Jan  8 18:01:42 [ctl_deliver] duplicate_prune: purged 2 out of 742
 entries
 Jan  8 18:01:42 [ctl_cyrusdb] done checkpointing cyrus databases
 """

 I don't *think* it's a permissions problem...
 """
 usr # ls -la /var/imap/db/.
 total 12952
 drwxr-xr-x2 cyrusmail 4096 Jan  8 21:15 .
 drwxr-xr-x   14 cyrusmail 4096 Jan  9 16:45 ..
 -rw-r--r--1 cyrusmail0 Sep 23 13:31 .keep
 -rw---1 cyrusmail 8192 Jan  8 21:15 __db.001
 -rw---1 cyrusmail   270336 Jan  8 21:15 __db.002
 -rw---1 cyrusmail98304 Jan  8 21:15 __db.003
 -rw---1 cyrusmail 18063360 Jan  8 21:15 __db.004
 -rw---1 cyrusmail32768 Jan  8 21:15 __db.005
 -rw---1 cyrusmail   286763 Jan  9 17:10 log.01
 """

 I'm using EXT3 so I don't think it's anything to do with the "chattr
 +S"
 stuff.

 I tryed recompiling cyrus it didn't help.

 The idea of cyrus dying fills me with dread. Someone please help me
 out
 here what is going on and how do I stop it? If someone can give me
 a
 bit of a shove in the right direction it would be MOST helpfull.
 links... generall information even mild abuse, all gratefully
 accepted.
>>>
>>> Please search the list archives.
>> I have... I used parts of the error message as keywords and didn't come
>> up
>> with much that appeared to be relevent. If you can suggest better
>> keywords
>> I will happily try again.
>>
>>> IIRC there have been two problems which
>>> could create messages like yours. One problem is with NPTL on newer
>>> RedHat
>>> Linux and AMD and some other CPU's.
>> I found some posts on this and did some reading. At first I got a bit
>> excited becuase I have just changed from a PIII to a Athalon. Now I
>> don't
>> think that this is the problem. I compiled from source (I use Gentoo) so
>> '--enable-posixmutexes' shouldn't be set. I also just tryed recompiling
>> db4 with '--disable-posixmutexes'. AFAIK I didn't have to recompile
>> cyrus
>> after (please correct me if I'm wrong here). After a restart of cyrus
>> I'm
>> still getting the same messages.
>>
>>> The other problem is IIRC something
>>> with the latest greatest DB4 release. Search for 'DB_ENV' and
>>> 'dbenv->open', I'm quite sure you'll find out what's wrong.
>> I can't find the second issue you reffer to.  When I search on those two
>> terms alon

Re: What happened to my db/ ?

2004-01-13 Thread Nick Fisher
>> Hello All,
>>   I recently moved my cyrus-imapd install from one machine to annother.
>> The move went *quite* well, I had both servers stoped and rsynced the
>> live server's data (/var/imap, /var/spool/imap) over to the new server.
>>
>> Everything was fine untill I started playing with SSL, at that point I
>> started having problems getting cyrus running after a restart.
>>
>> Here is what I was seeing in my logs:
>> """
>> Jan  8 17:27:11 [tls_prune] DBERROR db4: operation not permitted during
>> recovery.
>> Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
>> Invalid argument
>> Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
>> cyrusdb error
>> """
>>
>> Somewhere I found a post from someone having the same problem. They said
>> that they could get cyrus working again by removing all the files in
>> /var/imap/db. So I did that. Now I can start cyrus and read my mail
>> *PHEW*. However I now have a new raft of errors showing up in syslog.
>> Everytime I start cyrus I get this:
>> """
>> Jan  8 18:01:42 [master] setrlimit: Unable to set file descriptors limit
>> to -1: Operation not permitted
>> Jan  8 18:01:42 [master] retrying with 1024 (current max)
>> Jan  8 18:01:42 [master] process started
>> Jan  8 18:01:42 [ctl_cyrusdb] recovering cyrus databases
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: DB_ENV->log_flush: LSN past
>> current end-of-log
>> - Last output repeated twice -
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: Recovery function for LSN 1
>> 182
>> failed
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: dbenv->open '/var/imap/db'
>> failed:
>> Invalid argument
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: init /var/imap/db: cyrusdb error
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: environment not yet opened
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
>> Invalid argument
>> Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
>> cyrusdb error
>> Jan  8 18:01:42 [master] process 4105 exited, status 75_
>> Jan  8 18:01:42 [master] ready for work
>> Jan  8 18:01:42 [tls_prune] tls_prune: purged 0 out of 0 entries
>> Jan  8 18:01:42 [ctl_cyrusdb] checkpointing cyrus databases
>> Jan  8 18:01:42 [ctl_deliver] duplicate_prune: pruning back 3 days
>> Jan  8 18:01:42 [ctl_deliver] duplicate_prune: purged 2 out of 742
>> entries
>> Jan  8 18:01:42 [ctl_cyrusdb] done checkpointing cyrus databases
>> """
>>
>> I don't *think* it's a permissions problem...
>> """
>> usr # ls -la /var/imap/db/.
>> total 12952
>> drwxr-xr-x2 cyrusmail 4096 Jan  8 21:15 .
>> drwxr-xr-x   14 cyrusmail 4096 Jan  9 16:45 ..
>> -rw-r--r--1 cyrusmail0 Sep 23 13:31 .keep
>> -rw---1 cyrusmail 8192 Jan  8 21:15 __db.001
>> -rw---1 cyrusmail   270336 Jan  8 21:15 __db.002
>> -rw---1 cyrusmail98304 Jan  8 21:15 __db.003
>> -rw---1 cyrusmail 18063360 Jan  8 21:15 __db.004
>> -rw---1 cyrusmail32768 Jan  8 21:15 __db.005
>> -rw---1 cyrusmail   286763 Jan  9 17:10 log.01
>> """
>>
>> I'm using EXT3 so I don't think it's anything to do with the "chattr +S"
>> stuff.
>>
>> I tryed recompiling cyrus it didn't help.
>>
>> The idea of cyrus dying fills me with dread. Someone please help me out
>> here what is going on and how do I stop it? If someone can give me a
>> bit of a shove in the right direction it would be MOST helpfull.
>> links... generall information even mild abuse, all gratefully
>> accepted.
>
> Please search the list archives.
I have... I used parts of the error message as keywords and didn't come up
with much that appeared to be relevent. If you can suggest better keywords
I will happily try again.

> IIRC there have been two problems which
> could create messages like yours. One problem is with NPTL on newer RedHat
> Linux and AMD and some other CPU's.
I found some posts on this and did some reading. At first I got a bit
excited becuase I have just changed from a PIII to a Athalon. Now I don't
think that this is the problem. I compiled from source (I use Gentoo) so
'--enable-posixmutexes' shouldn't be set. I also just tryed recompiling
db4 with '--disable-posixmutexes'. AFAIK I didn't have to recompile cyrus
after (please correct me if I'm wrong here). After a restart of cyrus I'm
still getting the same messages.

> The other problem is IIRC something
> with the latest greatest DB4 release. Search for 'DB_ENV' and
> 'dbenv->open', I'm quite sure you'll find out what's wrong.
I can't find the second issue you reffer to.  When I search on those two
terms alone I get a snow of documentation and when I add keywords like
'bug' or 'cyrus' I only find the NTPL problems.

It occured to me after I posted this that I didn't give any versions of
what I'm using
The system is running Gentoo and I'm using the packages marked as stable
in the portage

Re: Cyrus and Postfix question

2004-01-11 Thread Nick Fisher
> Nick Fisher wrote:
>>> >> In my case I wrote a wrapper around deliver that filters the mail
>>> >> through SpamAssassin.
>>>
>>>Which would be better done using something like spampd or amavisd-new
>>>and/or using Postfix advanced content filtering of course...
>>>
>>
>> Actually I know what I'm doing and I'm quite happy with it. I do use
>> spamd
>> (the wraper implements spamc) and because postfix is trying to deliver
>> it
>> to a perticular user, I can easily implement per-user settings (-u on
>> spamc). It's also a bonus doing this at the delivery agent because I
>> don't
>> have worry about not checking out bound mail (As I would have to if I
>> did
>> this with a cf). Frankly any extra overhead due to it being pipe rather
>> than lmtp is dwarfed by SpamAssassin. It's quick n' easy, for me it's
>> the
>> perfect solution ;)
> And if one is happy and things are working one should stick with it of
> course. :)
Well it keeps to my two most basic rules with config:

1) Keep it simple
2) If it ain't broke, don't fix it

> I was just trying to point out that if you're handling a fairly large
> amount of e-mail and from Postfix are calling wrapper+spamc+running
> spamd+deliver chances are you wouldn't be that happy. ;)
Well as I said in the original post, I'm really a tourist on this list...
my cyrus install only has to deal with 5-10 accounts. I personally have
never had any problems with deliver but you and others come out quite
heavily against it. So as a matter of intrest what would you recomend to
replace my current script setup? I say script setup because I don't want
to run multiple instances of postfix on that machine so in essance I
can't really use the content filters. I also want to have per user
configs. I had a bit of a look around and found things like spampd
(http://www.wdg.us/Content/rd/mta/spampd/spampd.html) but they don't
appear to do per user settings (Kendrick Vargas mentioned hacking it but
that's a seperate issue). Is there anything around you know of that's a
drop in replacement?

  Nick


Re: Cyrus and Postfix question

2004-01-09 Thread Nick Fisher
>  >> In my case I wrote a wrapper around deliver that filters the mail
>  >> through SpamAssassin.
>
> Which would be better done using something like spampd or amavisd-new
> and/or using Postfix advanced content filtering of course...
>
Actually I know what I'm doing and I'm quite happy with it. I do use spamd
(the wraper implements spamc) and because postfix is trying to deliver it
to a perticular user, I can easily implement per-user settings (-u on
spamc). It's also a bonus doing this at the delivery agent because I don't
have worry about not checking out bound mail (As I would have to if I did
this with a cf). Frankly any extra overhead due to it being pipe rather
than lmtp is dwarfed by SpamAssassin. It's quick n' easy, for me it's the
perfect solution ;)

  Nick


Re: Cyrus and Postfix question

2004-01-09 Thread Nick Fisher
> Hello everyone.
>
> Wanted to get some feedback from people running cyrus and postfix.
I'm a bit of a tourist on this list but I've been using both happily for a
few years now.

> I've been able to get the two to work together, but I had a question on
> the
> following. (Note, I read the LMTP_README provided with postfix to find
> more
> info)
>
> I noticed that you can have two different options setup in postfix; LMTP
> over UNIX domain sockets or LMTP over TCP.
>
> I was curiouus if there is a better way to go, or is it dependent upon
> what
> your setup is?
Frankly I would stay away from LMTP over TCP unless you really want
annother port to firewall on you machine. I always try and keep it simple.

> For instance, in my main.cf I have:
>
> mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
>
> Which works, but so does:
>
> mailbox_transport = cyrus
>
> What's the difference? Is one better than the other? I'm looking more for
> stability than anything else.
I would say used the second option. That uses the cyrus setting from
postfix's master.cf. Doing that gives good readability (for when you come
back to this in a few years wondering what you did) and a bit more
controll. By using the master.cf entry you can set delivery options and
the like. Though the cyrus entry in postfix's master.cf uses cyrus's
'deliver' app and not LMTP.

In my case I wrote a wrapper around deliver that filters the mail through
SpamAssassin.

> I'm trying to find out more information for postfix.
You know that this is the cyrus list right ;)

> Seeing that it may
> not
> do what I want, sendmail may be the other option,
Eeek! If you don't find postfix to your liking then check out qmail or
exim. I played with sendmail once.. ONCE. That was enough.

  Nick


What happened to my db/ ?

2004-01-09 Thread Nick Fisher
Hello All,
  I recently moved my cyrus-imapd install from one machine to annother.
The move went *quite* well, I had both servers stoped and rsynced the
live server's data (/var/imap, /var/spool/imap) over to the new server.

Everything was fine untill I started playing with SSL, at that point I
started having problems getting cyrus running after a restart.

Here is what I was seeing in my logs:
"""
Jan  8 17:27:11 [tls_prune] DBERROR db4: operation not permitted during
recovery.
Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
Invalid argument
Jan  8 17:27:11 [tls_prune] DBERROR: opening /var/imap/tls_sessions.db:
cyrusdb error
"""

Somewhere I found a post from someone having the same problem. They said
that they could get cyrus working again by removing all the files in
/var/imap/db. So I did that. Now I can start cyrus and read my mail
*PHEW*. However I now have a new raft of errors showing up in syslog.
Everytime I start cyrus I get this:
"""
Jan  8 18:01:42 [master] setrlimit: Unable to set file descriptors limit
to -1: Operation not permitted
Jan  8 18:01:42 [master] retrying with 1024 (current max)
Jan  8 18:01:42 [master] process started
Jan  8 18:01:42 [ctl_cyrusdb] recovering cyrus databases
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: DB_ENV->log_flush: LSN past
current end-of-log
- Last output repeated twice -
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: Recovery function for LSN 1 182
failed
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: dbenv->open '/var/imap/db' failed:
Invalid argument
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: init /var/imap/db: cyrusdb error
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR db4: environment not yet opened
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
Invalid argument
Jan  8 18:01:42 [ctl_cyrusdb] DBERROR: opening /var/imap/mailboxes.db:
cyrusdb error
Jan  8 18:01:42 [master] process 4105 exited, status 75_
Jan  8 18:01:42 [master] ready for work
Jan  8 18:01:42 [tls_prune] tls_prune: purged 0 out of 0 entries
Jan  8 18:01:42 [ctl_cyrusdb] checkpointing cyrus databases
Jan  8 18:01:42 [ctl_deliver] duplicate_prune: pruning back 3 days
Jan  8 18:01:42 [ctl_deliver] duplicate_prune: purged 2 out of 742 entries
Jan  8 18:01:42 [ctl_cyrusdb] done checkpointing cyrus databases
"""

I don't *think* it's a permissions problem...
"""
usr # ls -la /var/imap/db/.
total 12952
drwxr-xr-x2 cyrusmail 4096 Jan  8 21:15 .
drwxr-xr-x   14 cyrusmail 4096 Jan  9 16:45 ..
-rw-r--r--1 cyrusmail0 Sep 23 13:31 .keep
-rw---1 cyrusmail 8192 Jan  8 21:15 __db.001
-rw---1 cyrusmail   270336 Jan  8 21:15 __db.002
-rw---1 cyrusmail98304 Jan  8 21:15 __db.003
-rw---1 cyrusmail 18063360 Jan  8 21:15 __db.004
-rw---1 cyrusmail32768 Jan  8 21:15 __db.005
-rw---1 cyrusmail   286763 Jan  9 17:10 log.01
"""

I'm using EXT3 so I don't think it's anything to do with the "chattr +S"
stuff.

I tryed recompiling cyrus it didn't help.

The idea of cyrus dying fills me with dread. Someone please help me out
here what is going on and how do I stop it? If someone can give me a
bit of a shove in the right direction it would be MOST helpfull.
links... generall information even mild abuse, all gratefully
accepted.

Many thanks

  Nick


Sieveshell problems....

2003-03-12 Thread Nick Fisher
Hi,
  Like the subject says I'm having problems with sieveshell. This isn't 
the first time I've had trouble with sieveshell but I can't find the 
problem here. I've tryed googling and searching the archives but I'm 
stumped.
Anyhow, I run the following command and get the following result..

# sieveshell -u test -a test localhost
connecting to localhost
Please enter your password:
Please enter your password:
unable to connect to server at /usr/bin/sieveshell line 174,  line 
2.


I think timsieved is working Ok. I have cyrus configured to use LOGIN and 
PLAIN right now to try and tease it into working. Cyrus auths fine with 
either of them.

"IMPLEMENTATION" "Cyrus timsieved v2.1.11"
"SASL" "LOGIN PLAIN"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress 
relational regex"
"STARTTLS"
OK


Previously I had a funny problem where one of the libs was missing but I 
don't think that's the case now.

# ls /usr/lib/sasl2/
libanonymous.la liblogin.la libplain.la
libanonymous.so liblogin.so libplain.so
libanonymous.so.2   liblogin.so.2   libplain.so.2
libanonymous.so.2.0.10  liblogin.so.2.0.10  libplain.so.2.0.10
libcrammd5.la   libmysql.la libsasldb.la
libcrammd5.so   libmysql.so libsasldb.so
libcrammd5.so.2 libmysql.so.2   libsasldb.so.2
libcrammd5.so.2.0.10libmysql.so.2.0.10  libsasldb.so.2.0.10
libdigestmd5.la libotp.la   mux
libdigestmd5.so libotp.so   mux.accept
libdigestmd5.so.2   libotp.so.2 mux.pid
libdigestmd5.so.2.0.10  libotp.so.2.0.10


Any advice or hairbrained ideas welcome.

  Nick




Re: Sieve isn't sieving for me - things to check

2002-11-14 Thread Nick Fisher
I'm still learning at this myself but I found that you had to supply a
full path to the mail box rather than a relative one.
Rather than
'INBOX/Woof'
I have to specify
'user/myusername/Woof'

Note that I'm using the '/' as a delimiter rather than the '.'. That's an
option somewhere in the setup.

Basicly the INBOX is specifyed by the full folder path, I found mine by
playing around in cyradm and listing mailboxs.

Hope that helps ;)

  Nick

-Original Message-
From: "David C. Tuttle" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 14 Nov 2002 11:27:57 -0800 (PST)
Subject: Re: Sieve isn't sieving for me - things to check

> The link from /usr/lib/sasl2 to /usr/local/lib/sasl2 did indeed work.
> Now sieveshell works and I can upload a sieve script.  But it still
> isn't sieving.
> 
>PROMPT# sieveshell --user=sstest --authname=sstest localhost
>connecting to localhost
>Please enter your password:
>> put /root/sievescript testscript
>> activate testscript
>> list
>testscript  <- active script
>sievescript
>> quit
> 
>/usr/sieve/s/sstest# ls -l
>total 16
>lrwxrwxrwx 1 cyrus mail   17 Nov 14 10:57 default ->
> testscript.script
>-rw--- 1 cyrus mail 8453 Nov 14 10:44 sievescript.script
>-rw--- 1 cyrus mail  208 Nov 14 11:16 testscript.script
> 
> The contents of /root/sievescript are:
> 
>require "fileinto";
>if header :contains "From" "[EMAIL PROTECTED]" {
>   fileinto "INBOX.WOOF";
>}
>elsif header :contains "Subject" "WOOFWOOF" {
>   fileinto "INBOX.WOOF";
>}
>else {
>   fileinto "INBOX";
>}
> 
> I sent a message from me with the subject "WOOFWOOF" (both rules
> should fire) and the message isn't being sieved into WOOF.  I see
> 
>Return-Path: <[EMAIL PROTECTED]>
>Received: from imap.silicondefense.com ([unix socket])
>by imap.silicondefense.com (Cyrus v2.1.9) with LMTP;
>Thu, 14 Nov 2002 10:57:51 -0800
>X-Sieve: CMU Sieve 2.2
>Return-Path: <[EMAIL PROTECTED]>
> 
> in the headers.  I'm still stumped.
> 
> --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> David C. Tuttle  [EMAIL PROTECTED]
> Product Engineer/System Administrator   (707) 445-4355 x21
> Silicon Defense   513 2nd St, Eureka, CA 95501
> --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> 
> On Wed, 13 Nov 2002, Nick Fisher wrote:
> 
> > 1) Check the location of the sasl2 libs
> > The default location is /usr/lib/sasl2 but apparently sometimes you
> need
> > to link that dir to /usr/lib/local/sasl2.
> 
> 
> 





Re: Sieve isn't sieving for me - things to check

2002-11-13 Thread Nick Fisher
I went through the same thing..
There were 4 basic things to check

1) Check the location of the sasl2 libs
The default location is /usr/lib/sasl2 but apparently sometimes you need
to link that dir to /usr/lib/local/sasl2. Get and use strace to check this.

2) Incorrect permissions on the sasl2 dir

3) sasl_minimumlayer should be set low
Apparently you should set this var to 0

4) Make sure the plain lib is THERE
(This is the one that got me)
In the sasl2 dir there should be libplain.so.

I'm no expert but these were the main points that every one mentioned.
Also if your using pam with plain make sure that pam has a sieve entry.

  Nick

-Original Message-
From: "David C. Tuttle" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Wed, 13 Nov 2002 12:22:08 -0800 (PST)
Subject: Sieve isn't sieving for me

> I'm sure I'm missing something, but I can't find it in the docs,
> FAQs or info-cyrus archive...
> 
> I've got a user who wants to run sieve.  So I upgraded Cyrus IMAP
> to 2.1.9, and I enabled sieve by leaving out "--disable-sieve" in the
> configure step and kept all the other options I used for 2.1.5:
> 
> # ./configure  --with-sasl=/usr/local/lib
>   --with-openssl=/usr/local/ssl --disable-otp --without-gssapi
>   --without-krb --with-auth=unix
> 
> I manually placed a sieve script for a test account "sstest" in
> /usr/sieve/s/sstest/myscript.script:
> 
> -rw-r--r-- 1 cyrus mail 105 Nov 13 12:10 myscript.script
> 
>   require "fileinto";
>   if header :contains "From" "[EMAIL PROTECTED]" {
>   fileinto "INBOX.FROM-DAVID";
>   }
> 
> I stopped and restarted cyrus, to no effect.
> 
> I had no luck getting sieveshell to run (it SegFaults), so I thought I
> could I could just place the sieve script manually.  Is this wrong?
> 
> timsieved runs OK, I can "telnet localhost sieve" and get a response,
> but no AUTHENTICATE commands will work, and no mechanisms are listed:
> 
>   # telnet localhost sieve
>   Trying 127.0.0.1...
>   Connected to localhost.
>   Escape character is '^]'.
>   "IMPLEMENTATION" "Cyrus timsieved v1.1.0"
>   "SIEVE" "fileinto reject envelope vacation imapflags notify
>   subaddress relational regex"
>   OK
> 
> /etc/imapd.conf says:
> 
> sasl_pwcheck_method:saslauthd
> sasl_mech_list: PLAIN
> lmtpsocket: /home/cyrus/socket/lmtp
> tls_sieve_cert_file:disabled
> tls_sieve_key_file: disabled
> sievedir:   /usr/sieve
> 
> 
> /etc/cyrus.conf says in its SERVICES section:
> 
> SERVICES {
>   # add or remove based on preferences
> #  imap  cmd="imapd" listen="imap" prefork=0
>   imaps cmd="imapd -s" listen="imaps" prefork=0 maxchild=8
> #  pop3 cmd="pop3d" listen="pop3" prefork=0
>   pop3s cmd="pop3d -s" listen="pop3s" prefork=0
>   sieve cmd="timsieved" listen="sieve" prefork=0
> 
>   # at least one LMTP is required for delivery
> #  lmtp cmd="lmtpd" listen="lmtp" prefork=0
>   lmtpunix  cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
> }
> 
> Any and all advice would be greatly appreciated.
> 
> --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> David C. Tuttle  [EMAIL PROTECTED]
> Product Engineer/System Administrator   (707) 445-4355 x21
> Silicon Defense   513 2nd St, Eureka, CA 95501
> --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> 
> 
> 





Re: timsieved isn't listing any auth methods [Solution]

2002-11-04 Thread Nick Fisher
Hi,
  It turns out that I didn't have libplain.so in the /usr/libs/sasl2 dir.
I never did figure out why, when I recompiled sasl it appeared. I'm now
happily sorting mail :)

  Nick

-Original Message-----
From: "Nick Fisher" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 31 Oct 2002 19:01:18 -0500
Subject: timsieved isn't listing any auth methods

> Hi People,
>   I can't get timsieve to list it's one auth method... PLAIN and thus
> can't get sieveshell to work. This is the second set of posts I've made
> so
> if this seems a little familiar that's because it is ;)
> I've been working on and off on this bug for about two months now :(
> 
> The problem is that timsieved isn't listing it's auth method and I
> don't
> know why. I'm using PLAIN as my auth method becuase I'm using pam_mysql
> to
> authenticate against a MySQL DB. I know that Plain is insecure but I
> have
> a firewall. I have tryed a number of things mostly revolving around the
> sasl2 plugins and none have helped in the least. I am intrested in ANY
> wild ideas that anyone might have about what to try next but please
> read
> the stuff below detailing what I have already tryed.
> 
> I would also be most intrested to know if anyone managed to get PLAIN
> auth
> against PAM to work with timsieve...
> Or if anyone has timsieve working with *just* the PLAIN auth method.
> 
> The one idea I still have is that timsieve isn't reading it's config
> data
> from /etc/imapd.conf. I have no clue as to how to check if this is a
> problem any ideas most welcome.
> 
> Many thanks.
> 
>   Nick
> 
> 
> 
> 
> >>>>>>> Things I have already tryed <<<<<<<<<<<<
> 
> 
> libs in the workng place or libs with the wrong permissions.
> I was advised to use strace on timsieved and see if there were any file
> calls that couldn't be completed. I could not find any. The permissions
> on
> my sasl2 libs are all o+rx. The strace is attached, if your good at
> reading them please give it a once over (I'm not so good).
> 
> No sieve entry in /etc/pam.d. I created a sieve file in that dir with
> the
> correct (I think) details for how to auth against the db.
> 
> sasl_minimum_layer... On the advice of a list member I added this var
> to
> my imapd.conf with the value '0'. This didn't appear to have any
> effect.
> 
> 
> 
> >>>>>>> My Config <<<<<<<<<<<<
> 
> 
> ---START imapd.conf---
> configdirectory:/var/imap
> partition-default:  /var/spool/imap
> sievedir:   /var/imap/sieve
> 
> # Don't use an everyday user as admin.
> admins: cyrus
> 
> #hashimapspool: yes
> allowanonymouslogin:no
> allowplaintext: yes
> 
> # Use this if sieve-scripts could be in ~user/.sieve.
> #sieveusehomedir:   yes
> 
> # 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
> 
> # Following taken from the FAQ
> postmaster: postmaster
> sasl_mech_list: PLAIN LOGIN
> 
> # Added to try and get fking sieve to work
> sasl_minimum_layer: 0
> 
> autocreatequota: 1
> reject8bit: no
> quotawarn: 90
> timeout: 30
> poptimeout: 10
> dracinterval: 0
> drachost: localhost
> #sievedir: /usr/sieve
> sendmail: /usr/sbin/sendmail
> sieve_maxscriptsize: 32
> sieve_maxscripts: 5
> unixhierarchysep: yes
> ---END imapd.conf---
> 
> ---START /etc/pam.d/sieve---
> authsufficient  /lib/security/pam_mysql.so user=mail
> passwd=**
> host=localhost db=mail table=accountuser usercolumn=username
> passwdcolumn=password crypt=0
> account required/lib/security/pam_mysql.so user=mail
> passwd=**
> host=localhost db=mail table=accountuser usercolumn=username
> passwdcolumn=password crypt=0
> ---END /etc/pam.d/sieve---
> 
> ---START /etc/cyrus.conf---
> START {
>   # do not delete this entry!
>   recover   cmd="ctl_cyrusdb -r"
> 
>   # this is only necessary if using idled for IMAP IDLE
> #  idledcmd="idled"
> }
> 
> # UNIX sockets start with a slash and are put into /var/imap/socket
> SERVICES {
>   # add or remove based on preferences
>   imap  cmd="imapd" listen="imap" prefork=0
>   pop3  cmd="pop3d" listen="pop3" prefork=0
>   # Don't forget to generate the neede

timsieved isn't listing any auth methods

2002-10-31 Thread Nick Fisher
Hi People,
  I can't get timsieve to list it's one auth method... PLAIN and thus
can't get sieveshell to work. This is the second set of posts I've made so
if this seems a little familiar that's because it is ;)
I've been working on and off on this bug for about two months now :(

The problem is that timsieved isn't listing it's auth method and I don't
know why. I'm using PLAIN as my auth method becuase I'm using pam_mysql to
authenticate against a MySQL DB. I know that Plain is insecure but I have
a firewall. I have tryed a number of things mostly revolving around the
sasl2 plugins and none have helped in the least. I am intrested in ANY
wild ideas that anyone might have about what to try next but please read
the stuff below detailing what I have already tryed.

I would also be most intrested to know if anyone managed to get PLAIN auth
against PAM to work with timsieve...
Or if anyone has timsieve working with *just* the PLAIN auth method.

The one idea I still have is that timsieve isn't reading it's config data
from /etc/imapd.conf. I have no clue as to how to check if this is a
problem any ideas most welcome.

Many thanks.

  Nick




>>> Things I have already tryed 


libs in the workng place or libs with the wrong permissions.
I was advised to use strace on timsieved and see if there were any file
calls that couldn't be completed. I could not find any. The permissions on
my sasl2 libs are all o+rx. The strace is attached, if your good at
reading them please give it a once over (I'm not so good).

No sieve entry in /etc/pam.d. I created a sieve file in that dir with the
correct (I think) details for how to auth against the db.

sasl_minimum_layer... On the advice of a list member I added this var to
my imapd.conf with the value '0'. This didn't appear to have any effect.



>>> My Config 


---START imapd.conf---
configdirectory:/var/imap
partition-default:  /var/spool/imap
sievedir:   /var/imap/sieve

# Don't use an everyday user as admin.
admins: cyrus

#hashimapspool: yes
allowanonymouslogin:no
allowplaintext: yes

# Use this if sieve-scripts could be in ~user/.sieve.
#sieveusehomedir:   yes

# 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

# Following taken from the FAQ
postmaster: postmaster
sasl_mech_list: PLAIN LOGIN

# Added to try and get fking sieve to work
sasl_minimum_layer: 0

autocreatequota: 1
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
#sievedir: /usr/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5
unixhierarchysep: yes
---END imapd.conf---

---START /etc/pam.d/sieve---
authsufficient  /lib/security/pam_mysql.so user=mail passwd=**
host=localhost db=mail table=accountuser usercolumn=username
passwdcolumn=password crypt=0
account required/lib/security/pam_mysql.so user=mail passwd=**
host=localhost db=mail table=accountuser usercolumn=username
passwdcolumn=password crypt=0
---END /etc/pam.d/sieve---

---START /etc/cyrus.conf---
START {
  # do not delete this entry!
  recover   cmd="ctl_cyrusdb -r"

  # this is only necessary if using idled for IMAP IDLE
#  idledcmd="idled"
}

# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
  # add or remove based on preferences
  imap  cmd="imapd" listen="imap" prefork=0
  pop3  cmd="pop3d" listen="pop3" prefork=0
  # Don't forget to generate the needed keys for SSL or TLS
  # (see doc/html/install-configure.html)
  #imapscmd="imapd -s" listen="imaps" prefork=0
  #pop3scmd="pop3d -s" listen="pop3s" prefork=0
  sieve cmd="timsieved" listen="sieve" prefork=0

  # at least one LMTP is required for delivery
#  lmtp cmd="lmtpd" listen="lmtp" prefork=0
  lmtpunix  cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0

  # this is only necessary if using notifications
#  notify   cmd="notifyd" listen="/var/imap/socket/notify" proto="udp"
prefork=1
}

EVENTS {
  # this is required
  checkpointcmd="ctl_cyrusdb -c" period=30

  # this is only necessary if using duplicate delivery suppression
  delprune  cmd="ctl_deliver -E 3" period=1440

  # this is only necessary if caching TLS sessions
  tlsprune  cmd="tls_prune" period=1440
}
---END cyrus.conf---



>>> timsieved strace 

root # strace /usr/cyrus/bin/timsieved -C /etc/imapd.conf
execve("/usr/cyrus/bin/timsieved", ["/usr/cyrus/bin/timsieved", "-C",
"/etc/imapd.conf"], [/* 23 vars */]) = 0
brk(0)  = 0x8098524
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
open("/etc/ld.so.preload", O_RDONLY)= 3
fstat64(3, {st_mode=S_IFR

Re: sieveshell says "sasl mech list empty"

2002-10-15 Thread Nick Fisher

> Is IMAP auth-ing OK with PLAIN? What's your sasl_minimum_layer? I
> thought 
> "1" was low enough, but you may need to try "0".
Thanks man but I saw a thread on that in the archives and already gave it
a shot. No better I'm afraid.
I'm fairly sure that the compile is correct after all my testing with
strace so I'm left thinking that this has to be a config problem. I have
to have missed something stupid.
For some reason timsieve doesn't list any auth types.
Here are all the config files that I can think of... anyone see any stupid
mistakes? Please?
Thanks

  Nick

---START imapd.conf---
configdirectory:/var/imap
partition-default:  /var/spool/imap
sievedir:   /var/imap/sieve

# Don't use an everyday user as admin.
admins: cyrus

#hashimapspool: yes
allowanonymouslogin:no
allowplaintext: yes

# Use this if sieve-scripts could be in ~user/.sieve.
#sieveusehomedir:   yes

# 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

# Following taken from the FAQ
postmaster: postmaster
sasl_mech_list: PLAIN LOGIN

# Added to try and get fking sieve to work
sasl_minimum_layer: 0

autocreatequota: 1
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
#sievedir: /usr/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5
unixhierarchysep: yes
---END imapd.conf---

---START /etc/pam.d/sieve---
authsufficient  /lib/security/pam_mysql.so user=mail passwd=**
host=localhost db=mail table=accountuser usercolumn=username
passwdcolumn=password crypt=0
account required/lib/security/pam_mysql.so user=mail passwd=**
host=localhost db=mail table=accountuser usercolumn=username
passwdcolumn=password crypt=0
---END /etc/pam.d/sieve---

---START /etc/cyrus.conf---
START {
  # do not delete this entry!
  recover   cmd="ctl_cyrusdb -r"

  # this is only necessary if using idled for IMAP IDLE
#  idledcmd="idled"
}

# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
  # add or remove based on preferences
  imap  cmd="imapd" listen="imap" prefork=0
  pop3  cmd="pop3d" listen="pop3" prefork=0
  # Don't forget to generate the needed keys for SSL or TLS
  # (see doc/html/install-configure.html)
  #imapscmd="imapd -s" listen="imaps" prefork=0
  #pop3scmd="pop3d -s" listen="pop3s" prefork=0
  sieve cmd="timsieved" listen="sieve" prefork=0

  # at least one LMTP is required for delivery
#  lmtp cmd="lmtpd" listen="lmtp" prefork=0
  lmtpunix  cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0

  # this is only necessary if using notifications
#  notify   cmd="notifyd" listen="/var/imap/socket/notify" proto="udp"
prefork=1
}

EVENTS {
  # this is required
  checkpointcmd="ctl_cyrusdb -c" period=30

  # this is only necessary if using duplicate delivery suppression
  delprune  cmd="ctl_deliver -E 3" period=1440

  # this is only necessary if caching TLS sessions
  tlsprune  cmd="tls_prune" period=1440
}
---END cyrus.conf---





Re: sieveshell says "sasl mech list empty"

2002-10-14 Thread Nick Fisher

> > > > Did you configure "sieve" as a PAM service?
> > > Uh I'm not sure. How would I tell? How would one do that?
> > > I'm running Gentoo and using it's ports system. It makes life alot
> > easyer
> > > but I'm never sure what options are used at compile time not to
> > > mention that I'm running way short of docs on using sieve with pam.
> > 
> > Actually, I jumped the gun a bit here, since your timsieved isn't
> even
> > advertising any mechs.
> Uhh... yeah. Don't worry I'm all confuzed to hell by now.
> 
> > The problem isn't with sieveshell, it's with timsieved.
> Yes, that is what I originally thought.
> 
> > Have you tried trussing/straceing timsieved to see what is going on
> > when
> > it tries to load plugins?
> No. But I have now and that's all fked up.
> This is all starting to make sence. I think that timsieved was compiled
> wrong. It's looking for all sorts of stuff in the wrong places. I'll
> talk
> to the port's maintainer and work this out
> Thanx to all for the kick in the right direction!
Dammit I spoke too soon. On closer inspection of the output and some
jiggering around I find that's not the problem.
timsieve was finding the librarys eventually so I'm back to crying on
my keyboard whapping my head against this problem.

Does anyone know what librarys it should be loading to get pam_mysql auth
to work? Does anyone know of any docs relating to getting timsieve to use
PAM auth?
Failing that how do you install sieve scripts without timsieved?

  Nick





Re: sieveshell says "sasl mech list empty"

2002-10-14 Thread Nick Fisher

> > > Did you configure "sieve" as a PAM service?
> > Uh I'm not sure. How would I tell? How would one do that?
> > I'm running Gentoo and using it's ports system. It makes life alot
> easyer
> > but I'm never sure what options are used at compile time not to
> > mention that I'm running way short of docs on using sieve with pam.
> 
> Actually, I jumped the gun a bit here, since your timsieved isn't even
> advertising any mechs.
Uhh... yeah. Don't worry I'm all confuzed to hell by now.

> The problem isn't with sieveshell, it's with timsieved.
Yes, that is what I originally thought.

> Have you tried trussing/straceing timsieved to see what is going on
> when
> it tries to load plugins?
No. But I have now and that's all fked up.
This is all starting to make sence. I think that timsieved was compiled
wrong. It's looking for all sorts of stuff in the wrong places. I'll talk
to the port's maintainer and work this out
Thanx to all for the kick in the right direction!

  Nick





Re: sieveshell says "sasl mech list empty"

2002-10-14 Thread Nick Fisher

> When I had this problem I strace'ed the process to see where it was
> looking 
> for the plugins, I think that helped me a lot.
Hummm.. the plot thickens.
According to strace sieveshell is happily opening several of the files in
/usr/lib/sasl2/ as read only. So.
I'm guessing that sieveshell isn't finding the plugin it wants? I'm trying
to use pam_mysql with sieve like I use with imapd but imapd appears to be
happy If it would help I can send the strace output

  Nick





sieveshell says "sasl mech list empty"

2002-10-14 Thread Nick Fisher

Hello people,
  I'm having a problem with sieveshell. When I run 'sieveshell localhost'
I get:
connecting to localhost
unable to connect to server: sasl mech list empty at /usr/bin/sieveshell
line 175.

And when I 'telnet localhost sieve' I get:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v1.1.0"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress
relational regex"
OK

I can get into IMAP with no problems. I'm using pam_mysql to auth and
these lines are taken from my imapd.conf:
allowanonymouslogin:no
allowplaintext: yes
sasl_pwcheck_method:saslauthd
sasl_mech_list: PLAIN

I looked in the archives and I found two solutions:
1) sasl plugins in the wrong place.
Now I think there supposed to be in /usr/lib/sasl2 and that's where they
are. I can't figure out how I would check this or what files I should
have
there.

2) PAM is incorrectly configured
I have a sieve entry in /etc/pam.d/

Any ideas? I'm a Cyrus newbie and I'm stuck. Is is something to do with
'sasl_mech_list' in my imapd.conf? I tryed blindly playing with it but
got
nowhere.

  Nick