Re: PHP Interface/Web GUI

2002-03-17 Thread Nick Sayer

Steven M Bloomfield said:
 www.squirrelmail.org is a web based e-mail client written in PHP
 Works fine connecting to Cyrus.
 Use websieve for web gui interface.

squirrelmail doesn't work fine with cyrus... It works FANTASTICALLY with
cyrus!! :-)

There is also a sieve plugin for squirrelmail. It's not 100% yet, but it's
pretty close to the mark.

squirrelmail, cyrus, cyrus-sasl set up for PAM and the PAM_SMB module is a
truly awesome replacement for an Exchange server. Now if only someone would
make it possible for Outlook to store non-mail folders (that is, contacts
and schedule stuff) on cyrus... :-)






altnamespace and unixhierarchysep patches for 2.0.16?

2002-03-07 Thread Nick Sayer

Does anyone have patches relative to 2.0.16 that will enable these two
features? I've done it in the past and had it work just fine. I can't
upgrade to 2.1.x yet because FreeBSD does not yet have a port for SASL 2.x
and I don't feel like going off the beaten path for this.





Re: RFC: Sieving mail delivered directly to shared/public folders

2001-11-09 Thread Nick Sayer

It seems to me that this could be far more easily done by creating a pseudo-
user. Have this user be the target of the alias and his sieve script will
be run. That sieve script can have nothing but fileinto directives to
populate the public folders. This pseudo-user does not even have to have an
INBOX, I don't think. Or if it does, then it will be perpetually empty if
your sieve script is written correctly. :-)






Re: Restoring Mailboxes from a Backup

2001-08-07 Thread Nick Sayer

Marc Schöchlin wrote:
 Hi !
 
 I´m useing the following Version/RPMs of Cyrus:
 
 cyrus-sasl-1.5.24-17
 cyrus-imapd-2.0.14-3rm
 cyrus-imapd-devel-2.0.14-3rm
 cyrus-imapd-utils-2.0.14-3rm
 cyrus-imapd-doc-2.0.14-3rm
 
 Cyrus works very well, but now i´m asking me how I can restore specific 
 Mailboxes from a backup by keeping:
 
 - the ACLs

Restore the mailbox database.

 - the mailboxdata

Restore the mail files you care about, then reconstruct the mailbox

 
 How can I restore a complete server ?

Reinstall the software, restore the sasl database (if applicable), 
restore etc/*.conf (and other things like ssl keys), restore the user, 
sieve and quota directories, restore the mailbox database, restore the 
mail files, reconstruct all mailboxes, restart master.

 
 Which data should be included in the backup ?

Everything. :-) You can never back up too much. :-)

It may not be a bad idea every once in a while to dump the mailboxes 
database to a flat file just in case. You do this with ctl_mboxlist -d.

 
 How can I rebuild the database integrity ?

Well, for the mailboxes, do a reconstruct. For the mailbox database 
itself, I believe it can be rebuilt, but you would lose the ACLs if the 
database was not restorable.

 
 I have serveral problems in finding this information...is there any in 
 the www ?
 
 If someone explains me the restore, I will write a little howto :-)
 
 Regards
 
 Mar Schöchlin
 
 
 
 
 






SirCam and sieve

2001-07-29 Thread Nick Sayer


I really, really want to do this:

if body :is :comparator i;octet text:
I send you this f i l e in order to have your a d v i c e
.
reject Possible SirCam Infection;
stop;
}

(note that I have perturbed the line a bit in order for this message not 
to match the worm's signature. I am sure you all know what I'm talking 
about)

Is there no way for the sieve to match on lines in the body? This would 
be the next extension I would like to see.




Re: Bug: 2.0.15-HIERARCHY - delete subscribed folder screws up LSUB

2001-07-27 Thread Nick Sayer

Ken Murchison wrote:

 
 Nick Sayer wrote:
 
 
 [...]
 
 
2. Extra entries in the ...user/f/foo.sub file that corespond to
nonexistent mailboxes causes the LSUB output to truncate at that spot.

 
 Try this patch.  Fairly simple, but a pain in the ass to find.
 


*ding ding ding*

That fixed it.






2.0.15 + HIERARCHY = MacOS X mail working

2001-07-25 Thread Nick Sayer

Folks here may or may not have remembered that I mentioned a while ago 
that the MacOS X mail client does not work with IMAP servers that do not 
use / as their separator.

I coerced the FreeBSD port to build 2.0.15 with the new hierarchy patches.
  With the unix hierarchy separator directive turned on, I can confirm that 
the MacOS X mail client works correctly. For what that's worth.

I sent mail to the port maintainer with my patch. It is easier than it 
might at first seem. Here's how:

1. change GNU_CONFIGURE=YES to USE_AUTOCONF=YES in the port makefile.

2. redo files/patch-ac so that it applies the same fix to aclocal.m4 
instead of configure.

3. Now you can apply the diff from the 2.0.15 normal distribution and the 
2.0.15-HIERARCHY-r2 one, discarding the diffs in 'configure' itself. When 
you build the port, configure will be regenerated by autoconf.



Bug: 2.0.15-HIERARCHY - delete subscribed folder screws up LSUB

2001-07-25 Thread Nick Sayer

Check this out:

* OK medusa.kfu.com Cyrus IMAP4 v2.0.15-HIERSEP-r2 server ready
. login user testcase
. OK User logged in
. list * *
* LIST (\Noinferiors) / INBOX
* LIST () / Drafts
* LIST () / Sent
* LIST () / Templates
* LIST () / Trash
* LIST () / amanda
* LIST () / archive/20010428
* LIST () / archive/certificates
* LIST () / archive/enlighten-inbox
* LIST () / archive/ladybugs
* LIST () / archive/old
* LIST () / archive/older
* LIST () / archive/orders
* LIST () / archive/passwords
* LIST () / archive/purchases
* LIST () / archive/wrinkles
* LIST () / cron-stools
* LIST () / lists/6bone
* LIST () / lists/airport-config
* LIST () / lists/bestos
* LIST () / lists/bzflag-dev
* LIST () / lists/dcti
[and so on and so on]
. OK Completed (0.000 secs 42 calls)
. lsub * *
* LSUB (\Noinferiors) / INBOX
* LSUB () / Drafts
* LSUB () / Sent
* LSUB () / Templates
* LSUB () / Trash
* LSUB () / amanda
* LSUB () / archive/20010428
* LSUB () / archive/certificates
* LSUB () / archive/enlighten-inbox
* LSUB () / archive/ladybugs
* LSUB () / archive/old
* LSUB () / archive/older
* LSUB () / archive/orders
* LSUB () / archive/passwords
* LSUB () / archive/purchases
* LSUB () / archive/wrinkles
* LSUB () / cron-stools
* LSUB () / lists/6bone
* LSUB () / lists/airport-config
* LSUB () / lists/bestos
* LSUB () / lists/bzflag-dev
* LSUB () / lists/dcti
[and so on and so on]
. OK Completed (0.000 secs 42 calls)


Ok. So we have a nice, full hierarchy, most of which is subscribed. With 
me so far?

Now the bug:

. create abra/cadabra
. OK Completed
. subscribe abra/cadabra
. OK Completed
. lsub * *
* LSUB (\Noinferiors) / INBOX
* LSUB () / Drafts
* LSUB () / Sent
* LSUB () / Templates
* LSUB () / Trash
* LSUB () / abra/cadabra
* LSUB () / amanda
* LSUB () / archive/20010428
* LSUB () / archive/certificates
* LSUB () / archive/enlighten-inbox
* LSUB () / archive/ladybugs
* LSUB () / archive/old
* LSUB () / archive/older
* LSUB () / archive/orders
* LSUB () / archive/passwords
* LSUB () / archive/purchases
* LSUB () / archive/wrinkles
* LSUB () / cron-stools
* LSUB () / lists/6bone
* LSUB () / lists/airport-config
* LSUB () / lists/bestos
* LSUB () / lists/bzflag-dev
* LSUB () / lists/dcti
[and so on and so on]
. OK Completed (0.016 secs 43 calls)

So far so good.

. delete abra/cadabra
. OK Completed
. lsub * *
* LSUB (\Noinferiors) / INBOX
* LSUB () / Drafts
* LSUB () / Sent
* LSUB () / Templates
* LSUB () / Trash
. OK Completed (0.000 secs 6 calls)

Woah! The subscription list is (almost) gone!

. unsubscribe abra/cadabra
. OK Completed
. lsub * *
* LSUB (\Noinferiors) / INBOX
* LSUB () / Drafts
* LSUB () / Sent
* LSUB () / Templates
* LSUB () / Trash
* LSUB () / amanda
* LSUB () / archive/20010428
* LSUB () / archive/certificates
* LSUB () / archive/enlighten-inbox
* LSUB () / archive/ladybugs
* LSUB () / archive/old
* LSUB () / archive/older
* LSUB () / archive/orders
* LSUB () / archive/passwords
* LSUB () / archive/purchases
* LSUB () / archive/wrinkles
* LSUB () / cron-stools
* LSUB () / lists/6bone
* LSUB () / lists/airport-config
* LSUB () / lists/bestos
* LSUB () / lists/bzflag-dev
* LSUB () / lists/dcti
[and so on and so on]
. OK Completed (0.008 secs 42 calls)

Oh! There it is!

So the bug is a two-parter.

1. Deleting a subscribed mailbox does not automatically unsubscribe 
oneself from it.

2. Extra entries in the ...user/f/foo.sub file that corespond to 
nonexistent mailboxes causes the LSUB output to truncate at that spot.

This is the case whether or not the unix hierachy character is set. I 
don't know if it's the case if I turn off alternate namespace (I don't 
want to do that).




Re: Newbie struggling with sendmail config

2001-07-17 Thread Nick Sayer

Fred Ball wrote:

 Hi, crew.  I'm going for my first installation of Cyrus imapd, running 
 sendmail and freeBSD 4.3.
 
 I'm using the O'Reilly IMAP book as a guide, and everything *seemed*okay 
 until I hit the instructions for building the sendmail config file.  It 
 instructs me to add the following two lines to cyrusproto.mc:
 
 OSTYPE(freebsd4)
 DOMAIN('DOMAIN.COM')
 
 Then I run:
 
 m4 ../m4/cf.m4 cyrusproto.mc  cyrusproto.cf
 
 Every time I do this, I get the message:
 
 m4: . . /domain/'DOMAIN.COM'.m4: No such file or directory


To build a sendmail.cf under FreeBSD 4.x, start with the freebsd.mc 
file, which should be in /etc/mail. Copy that to some other name, and 
put that name in /etc/make.conf in a SENDMAIL.MC= line.

For cyrus 2.x, change you need to make is like this:

FEATURE(local_lmtp)dnl
define(`confLOCAL_MAILER',`cyrus')dnl

MAILER_DEFINITIONS
mcyrus, 
P=[IPC], F=lsSDFMnqA@/:|SmXz, E=\r\n,
S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
U=cyrus:cyrus, A=FILE /var/imap/socket/lmtp

The mailer definition should be the same as the one for 'smtp', but with 
the U= added and the A= as shown. The argument to A= should be the lmtp 
listening socket path specified in your cyrus.conf file.

This is an optimal setup. No extra processes will be spawned (with 2.x 
deliver just does the equivalent LMTP delivery), envelope information 
will be preserved (for Sieve), CCed mail will be hardlinked in the cyrus 
filesystem.

To deliver to top leve dirs, specify +box.path. To deliver to a folder 
under a user's INBOX, use user+box.

Nothing could be simpler.


 
 as if it is looking for another script piece.  When I omit the domain 
 line, it seems to output fine.  But then I try O'Reilly's test for the 
 sendmail config:
 
 cyradmin -user cyrus localhost imap

 
  and it returns:
 
  cyradm: cannot connect to server
 
  Any ideas on where to start with this
 

I think you're mixing apples and oranges here. This has nothing to do 
with sendmail. But it probably does mean that cyrus isn't running.






Re: LDAP imap (Invalid credentials)

2001-07-12 Thread Nick Sayer

David wrote:


 
 /etc/imap.conf:
   sasl_pwcheck_method: pam
 


Don't do it this way. Set this to pwcheck, then rebuild pwcheck to use 
pwcheck_pam.c. This insures that the pam methods are run as root rather 
than as cyrus. See the archives for more info.




Re: [ANN] UNIX hierarchy separator for Cyrus IMAP

2001-07-06 Thread Nick Sayer

Ken Murchison wrote:

 
 Nick Sayer wrote:
 
Ken Murchison wrote:


Nick Sayer wrote:

Hey great! This will let me work around MacOS X's Mail program's stupidity
in this regard. Before I set up alt namespace, I couldn't get to any of my
folders besides the INBOX! Doesn't anyone read an RFC anymore before they
write software? Sheesh.


Who?  Me or the Mac guys?

Sorry for the ambiguity. The problem lies in the MacOS X Mail client,
NOT in cyrus. When you try and select a subfolder, you get an error back
that folder/subfolder is not an acceptable mailbox name to the server.
Well, of course it's not! :-) alt namespace was required before I could
look at anything other than INBOX because, for example, I would get an
error saying that it couldn't select INBOX/Sent. Now I can get to all
of the first level folders because they can be selected without
separator chars, but I anticipate that I will be able to get to all of
them with the unix separator patch. But if Apple had been able to read
an RFC, none of it would be necessary at all.

 
 I'm confused.  Are/were you running a patched version of Cyrus that
 created folders with '/' as the separator?  My stuff is NOT compatible
 with anything that actually stores folder names containing '/' in the
 mailboxes DB (like David Fuchs' patch).  The whole premise of my
 alt-namespace and hier-sep is to not change any of the on-disk files.


No. It's just cyrus with the namespace patch.

MacOS X's mail client is stupid. It tries to do a

10 SELECT INBOX/foo

despite the fact that the LSUB/LIST output said INBOX.foo.

This behavior is clearly stupid.

You're being blinded by an expectation that the client was not written 
by morons. :-)






Re: lmtp again.

2001-07-05 Thread Nick Sayer

I stronly recommend you use the sendmail.mc bits that I posted a little 
while ago. It works, it preserves the envelope headers for sieve, it 
avoids forking a process (deliver) needlessly in deliveries and allows 
cyrus to hardlink CCed messages.

And sendmail is not hard to configure. It is hard to edit .cf files. 
Editing .cf files and configuring sendmail are not the same thing.







Re: LMTP - getting in the way

2001-07-04 Thread Nick Sayer

Louis LeBlanc wrote:

So it looks like I got much of 2.0.14 on FreeBSD working, now what is
the problem with LMTP?  I don't have a network with mail relays and
multiple servers or anything like that, so I don't think I really need
a second MTA.  My current working setup (on the dying Linux box) is
1.6.24; sendmail drops messages to procmail - configurable per user -
which then calls deliver to drop the message in the correct folder.

This is all I really need to do, so how can I get rid of LMTP?


You can't. deliver in 2.x merely front-ends the LMTP socket, so even if 
you use deliver for everything you still need LMTP for deliver to work.

I used to be like you -- I used procmail and wanted to figure out how to 
get procmail between sendmail and cyrus. I eventually decided that sieve 
was really all I needed and did without procmail. Unless you're hooking 
shell scripts up as filters or bizarre things like that, it's very 
likely that sieve is sufficient. Another detail is that if you use sieve 
and have sendmail set up to do LMTP delivery, you can filter on the 
envelope headers, which normaly is not possible with procmail.

Of course, the ability for an administrator to allow a method of hooking 
shell scripts as filters up to sieve would be very nice...



Thanks
Lou







Re: Installing on FreeBSD

2001-07-03 Thread Nick Sayer

It's fairly straightforward. I recommend this set of steps:

1. Install the db3 port. Just do that in the ordinary way.

2. Search the archives of this list for the SASL pwcheck_pam.c file. 
When you build the cyrus-sasl port, you want to modify the build so that 
pwcheck uses this file.

3. Modify /etc/pam.conf to add entries for the 'cyrus' service to use 
whichever PAM functionality you desire (at this point you have the 
option of adding other pam module ports if you wish, such as pam_smb).

4. Install the cyrus-imap port in the usual manner. You don't need to 
add any options.

5. Make yourself an /etc/mail/_.mc file. Do this by copying the 
sendmail.mc file and modifying it to taste. One thing you will need to 
do is this:

FEATURE(local_lmtp)dnl
define(`confLOCAL_MAILER',`cyrus')dnl
MAILER(smtp)dnl

MAILER_DEFINITIONS
McyrusP=[IPC], F=lsSDFMngA@/:|SmXz, E=\r\n, S=EnvFromL, R=EnvToL/HdrToL,
   T=DNS/RFC822/X-Unix,U=cyrus:cyrus, A=FILE /var/imap/socket/lmtp

The MAILER_DEFINITION should be salted to taste. The A argument should 
be set to wherever the lmtp socket lives, as defined by cyrus.conf, and 
the rest of the arguments should shadow the normal SMTP mailer 
definition for the most part.

You may wish to modify the mc file in other ways (for example, adding 
cyrus-sasl may make it desirable to add sasl authentication to sendmail 
for authenticated SMTP), but such mods are outside the scope of this 
document.

When you're done, make .cf and test it, copying it to sendmail.cf if 
it works. Then 'make restart' to restart sendmail.

That ought to do it.


Louis LeBlanc wrote:

Hey all.  I have Cyrus imapd 1.6.24 running on a RH 6.2 linux box, and
it has done quite well since just after the 1.6.24 release.  No
complaints whatsoever.  Install was complicated, but well documented
in the Linux HowTo, so great.

Now the problem.  I am switching my server to FreeBSD 4.3 and would
like to upgrade to 2.0.14 - which is present in a FreeBSD port.

Does anyone know where I can find install info specific to FreeBSD?  I
am checking out the html install info in the distribution, and it
notes a couple Linux specific steps, but . . .

Any and all help is appreciated.

TIA
Lou







Re: user+folder delivery confusion

2001-06-30 Thread Nick Sayer

Since you're using LMTP to the lmtpd socket, you don't have to do anything 
special at all. Define the local mailer in your .mc file as cyrus. It can 
handle both 'user', 'user+subbox' or '+shared_folder' as left-hand-sides 
and deliver all of them correctly. You can even use any of these 3 as the 
right-hand-side of an alias if you wish.

 Hello all,
 
 I've been batting my head against a wall on this one, and need some
 help,  please. I've read all I can find in the archives on how to get
 mails  delivered to a user's sub-folders and to shared mailboxes, and I
 just can't  get it to work right.
 
 I've tried several of the suggestions I've seen in the mailing list
 (those  that I sorta understood what I should do, anyway) and they
 cause something  else to break, causing sendmail panics in my logs.
 
 My current mc file looks like so (in the relevant portions):
 
 MAILER(`local')dnl
 MAILER(`smtp')dnl
 
 MAILER_DEFINITIONS
 Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
A=FILE /var/imap/socket/lmtp
 
 LOCAL_RULE_0
 Rbb + $+  @ $=w . $#cyrus $: + $1
 
 LOCAL_RULESETS
 # if there's a plus part, we want to directly deliver it
 SLocal_localaddr
 R$+ + $*$#cyrus $@ $: $1 + $2
 
 
 Can someone please tell me what I should do to enable the 
 [EMAIL PROTECTED] scheme? I have a couple of users (myself included)
 that  need/want this to work.
 
 Thanks,
 Will
 
 --
--
 William K. Hardeman
 [EMAIL PROTECTED]
 http://www.wkh.org
 
 Always listen to experts. They'll tell you what can't be done and why.
 Then do it.
 --Robert A. Heinlein





Re: Problems with sieveshell on FreeBSD: fillin_interactions?

2001-06-14 Thread Nick Sayer

Nick Sayer wrote:

 One of the freebsd machines I have access to recently upgraded from 
 1.mumble to 2.0.14. The port was used without modification. Everything 
 is fine except for this:
 
 %sieveshell
 Can't load 
 
'/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/Cyrus/SIEVE/managesieve/managesieve.so'
 
 for module Cyrus::SIEVE::managesieve: 
 
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/Cyrus/SIEVE/managesieve/managesieve.so:
 
 Undefined symbol fillin_interactions at 
 /usr/libdata/perl/5.00503/DynaLoader.pm line 169.
 
  at /usr/local/bin/sieveshell line 42
 BEGIN failed--compilation aborted at /usr/local/bin/sieveshell line 42.
 
 Anyone come across this before?

Rebuilding the port fixed this. Perhaps this is because I ran the 
initial port build while 1.6 was still installed?




Re: CYRUS_SERVICE Variable? Easy Question??

2001-06-12 Thread Nick Sayer

I ran across this when upgrading a site from 1.x to 2.x. I had forgotten 
to remove the inetd.conf entries for the cyrus servers. In 2.x they 
don't run from inetd, they are spawned by the master.






Problems with sieveshell on FreeBSD: fillin_interactions?

2001-06-12 Thread Nick Sayer

One of the freebsd machines I have access to recently upgraded from 
1.mumble to 2.0.14. The port was used without modification. Everything 
is fine except for this:

%sieveshell
Can't load 
'/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/Cyrus/SIEVE/managesieve/managesieve.so'
 
for module Cyrus::SIEVE::managesieve: 
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/Cyrus/SIEVE/managesieve/managesieve.so:
 
Undefined symbol fillin_interactions at 
/usr/libdata/perl/5.00503/DynaLoader.pm line 169.

  at /usr/local/bin/sieveshell line 42
BEGIN failed--compilation aborted at /usr/local/bin/sieveshell line 42.

Anyone come across this before?




Re: Problems with 2.0.13 on FreeBSD

2001-05-07 Thread Nick Sayer

Hajimu UMEMOTO wrote:


 
 nsayer 2. imapd loses its -s argument the 2nd time around. I suspect this is a
 nsayer setproctitle issue, but I haven't tried to prove it. If I do
 nsayer 'openssl s_client -connect localhost:imaps', then '. logout' and then
 nsayer very quickly 'telnet localhost imaps', I get a non-SSLed imapd.
 nsayer Further research shows that when this happens the 'imaps' variable in the
 nsayer code is set to 0, which can only be because the argv[][] given to
 nsayer service_main() does not have a -s in it.
 
 How about this patch?  It seems fixed the problem here.  What I've
 done is moving option parsing from service_main() to service_init().
 I believe option parsing is good enough to be done only one time.
 I think there is same problem in pop3d.
 


The patch to imapd appears to be both safe and effective. I have 
duplicated the problem with pop3d, however, so a similar patch would 
need to be applied.