accidential deletion of bulletin boards / shared folders

2003-07-22 Thread Bernhard Erdmann
Hi,

I have some bulletin boards / shared folders on Cyrus 2.1.14, say "test" 
or "support" with ACL "anyone write" on it enabling everyone to delete 
mails in it.

Now, it is too easy for Outlook users to take the whole folder and move 
it to their INBOX. Afterwards, mail delivered to [EMAIL PROTECTED] 
bounces because the folder has moved to user.username.support.

Taking "d" away from the ACL is not a solution as nobody could delete 
any mail in the folder.

Everyone should edit the mailbox' content to his heart's content but 
nobody should be able to delete the folder.

"Managing IMAP" describes a patch for Cyrus 1.5/1.6 to look for 
"administer" rights before deleting a folder and says something like 
"should't be necessary for Cyrus 2.0".

Do you know a solution?



Re: empty line Cyrus' reject/vacation messages

2003-07-22 Thread Bernhard Erdmann
Stephen Grier wrote:
[...]
We created a simple wrapper to exim using the -dropcr option and
specified this in the sendmail: line of imapd.conf.


Thanks, this does the trick:

- /etc/imapd.conf:

sendmail: /opt/exim/exim_dropcr

- /opt/exim/exim_dropcr:

#!/bin/sh
/opt/exim/exim -dropcr $@


Re: Tru64 and 2.2 problems

2003-07-22 Thread Rob Siemborski
On Wed, 23 Jul 2003, Robert Urban wrote:

> Tru64 does indeed have a getaddrinfo, it even has two.  You must
>
>   #include 
>
> in order to pull in the appropriate definition. The designers
> of Tru64 bent over backwards trying to be as standards-compatible as
> humanly possible.  Because the standards (4.4/4.3 BSD) define
> contradictory behaviour for getaddrinfo, you must say what you want.  By
> default you get 4.3BSD behaviour.  If you want 4.4BSD, you must
> define
>
>   _XOPEN_SOURCE_EXTENDED
>
> before you #include .  See standards(5) for more information
> on these things...

If you can suggest changes to Cyrus such that configure does the right
thing, I'd appreciate it.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: cyradm and spaces

2003-07-22 Thread joe ritter
sorry I should have indluced this for version:


ocalhost.localdomain> ver
name   : Cyrus IMAPD
version: v2.1.13 2003/05/01 19:05:29
vendor : Project Cyrus
support-url: http://asg.web.cmu.edu/cyrus
os : Linux
os-version : 2.4.20-6smp
environment: Cyrus SASL 2.1.10
 Sleepycat Software: Berkeley DB 4.0.14:
(November 18, 2001)
 Built w/OpenSSL 0.9.7a Feb 19 2003
 Running w/OpenSSL 0.9.7a Feb 19 2003
 TCP Wrappers
 mmap = shared
 lock = fcntl
 nonblock = fcntl
 auth = unix
 idle = poll
 mboxlist.db = db3
 subs.db = flat
 seen.db = flat
 duplicate.db = db3-nosync
 tls.db = db3-nosync


--- Rob Siemborski <[EMAIL PROTECTED]> wrote:
> On Tue, 22 Jul 2003, joe ritter wrote:
> 
> > localhost.localdomain>
> > createmailbox "user.atanzer.Hotels + Travel"
> > usage: createmailbox [--partition partition]
> mailbox
> > [partition]
> >
> > Each time I just get the usage message. Has anyone
> > else seen this and were able to come up with
> > workaround? Thanks again
> 
> You're using an old version of cyrus, this works
> fine for me on 2.1.14:
> 
> CYRUS.andrew.cmu.edu> cm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu> dm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu>
> 
> -Rob
> 
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Rob Siemborski * Andrew Systems Group * Cyert Hall
> 207 * 412-268-7456
> Research Systems Programmer * /usr/contributed
> Gatekeeper
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Cyrus Hell

2003-07-22 Thread Eric Naeseth
I've been trying to get Cyrus IMAPD 2.1.14 working on my system for a
couple days now with no success. 

I've used the configure line:
./configure --with-auth=unix --with-dbdir=/usr/local/BerkeleyDB.4.1
--with-openssl=/usr/local/ssl

I had also tried this line earlier, and wound up in the same situation
as I have now: I can connect to my server on IMAP or POP3, but the
server sends nothing back.  I tried configuring with Kereberos, but
configure failed to locate it, even when I told it to look in
/usr/include (where it is).

All the cyrus executables are executable.

/etc/cyrus.conf:
standard standalone server implementation

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/sockets
SERVICES {
  # add or remove based on preferences
  # --- tried with and without the absolute paths ---
  imap  cmd="/usr/cyrus/bin/imapd" listen="imap" prefork=5
  imaps cmd="/usr/cyrus/bin/imapd -s" listen="imaps" prefork=1
  pop3  cmd="/usr/cyrus/bin/pop3d" listen="pop3" prefork=3
  pop3s cmd="/usr/cyrus/bin/pop3d -s" listen="pop3s" prefork=1
  sieve cmd="/usr/cyrus/bin/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=1

  # 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" at=0400

  # this is only necessary if caching TLS sessions
  tlsprune  cmd="tls_prune" at=0400
}


/etc/imapd.conf:
postmaster: postmaster
configdirectory: /var/imap
partition-default: /var/spool/imap
allowplaintext: yes
sasl_mech_list: PLAIN
servername: ionws.com
autocreatequota: 1
reject8bit: no
quotawarn: 90
timeout: 30
sasl_pwcheck_method: pwcheck # *** Tried saslauthd and pwcheck.
 # saslauthd *is* running
sievedir: /usr/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5




Re: cyradm and spaces

2003-07-22 Thread joe ritter
The other oddity is that user who are accessing cyrus
boxes through a squirrel mail front end can create
mail
boxes with space in the name just fine? Is there
another means of create? This is really strange.
Thanks again for your help.


--- Rob Siemborski <[EMAIL PROTECTED]> wrote:
> On Tue, 22 Jul 2003, joe ritter wrote:
> 
> > localhost.localdomain>
> > createmailbox "user.atanzer.Hotels + Travel"
> > usage: createmailbox [--partition partition]
> mailbox
> > [partition]
> >
> > Each time I just get the usage message. Has anyone
> > else seen this and were able to come up with
> > workaround? Thanks again
> 
> You're using an old version of cyrus, this works
> fine for me on 2.1.14:
> 
> CYRUS.andrew.cmu.edu> cm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu> dm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu>
> 
> -Rob
> 
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Rob Siemborski * Andrew Systems Group * Cyert Hall
> 207 * 412-268-7456
> Research Systems Programmer * /usr/contributed
> Gatekeeper
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: Tru64 and 2.2 problems

2003-07-22 Thread Robert Urban

Scott Adkins wrote:
>  1) The configure process appears to pick up on the fact that Tru64 does
> have getnameinfo(), but not getaddrinfo().  The problem is that if one
> is found and the other is not, the definitions for both are included
> in lib/gai.h.  Well, getnameinfo() on Tru64 has a slightly different
> definition and produces a conflict that the compiler can't resolve.
> The solution was to modify gai.h and wrap the getaddrinfo() related
> routines with "#ifndef HAVE_GETADDRINFO/#endif" macros, and wrap the
> getnameinfo() with similar HAVE_GETNAMEINFO macros.

Tru64 does indeed have a getaddrinfo, it even has two.  You must

#include 

in order to pull in the appropriate definition. The designers
of Tru64 bent over backwards trying to be as standards-compatible as
humanly possible.  Because the standards (4.4/4.3 BSD) define
contradictory behaviour for getaddrinfo, you must say what you want.  By
default you get 4.3BSD behaviour.  If you want 4.4BSD, you must
define

_XOPEN_SOURCE_EXTENDED

before you #include .  See standards(5) for more information
on these things...


>  3) After that, it compiles for awhile and then stops on imap/protocol.c
> with the following error:
> 
>   cc: Error: ./../lib/prot.h, line 209: Missing ";". (nosemi)
>   __attribute__ ((format (printf, 2, 3)));
> 
> Looking in lib/prot.h, I see the following:
> 
>   extern int prot_printf(struct protstream *, const char *, ...)
>   __attribute__ ((format (printf, 2, 3)));
> 
> What is that supposed to do?  I simply deleted the line that has the
> __attribute__ on it and put a semicolon on the previous line and it
> compiles.  What problems will I see by doing that?

I don't have any specific suggestions wrt to the problems above, but

cc -source_listing -show all [other flags] sourcefile.c

is your *friend*.  It produces sourcefile.lis which can be immensely
helpful.

cheers,

Rob Urban



Re: cyradm and spaces

2003-07-22 Thread joe ritter
Actually I am using cyrus 2.1.13 built from source. so
it is not that much older. This is a linux 2.4.20-6 if
that makes any difference. Can you think of anything
else that might be causing this behavior? Is there a
setting in /etc/impad.conf? I am really stumped.

Thanks again.



localhost.localdomain> cm "user.chef2b.Dollar Bill"
createmailbox: Unexpected extra arguments to Create


--- Rob Siemborski <[EMAIL PROTECTED]> wrote:
> On Tue, 22 Jul 2003, joe ritter wrote:
> 
> > localhost.localdomain>
> > createmailbox "user.atanzer.Hotels + Travel"
> > usage: createmailbox [--partition partition]
> mailbox
> > [partition]
> >
> > Each time I just get the usage message. Has anyone
> > else seen this and were able to come up with
> > workaround? Thanks again
> 
> You're using an old version of cyrus, this works
> fine for me on 2.1.14:
> 
> CYRUS.andrew.cmu.edu> cm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu> dm "user.rjs3.foo bar"
> CYRUS.andrew.cmu.edu>
> 
> -Rob
> 
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Rob Siemborski * Andrew Systems Group * Cyert Hall
> 207 * 412-268-7456
> Research Systems Programmer * /usr/contributed
> Gatekeeper
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: cyradm and spaces

2003-07-22 Thread Jonathan Marsden
On 22 Jul 2003, joe ritter writes:

> localhost.localdomain> cm "user.chef2b.Dollar Bill"
> createmailbox: Unexpected extra arguments to Create

(1) Make sure the user.chef2b mailbox already exists.

(2) Try escaping all spaces in the mailbox name with a backslash,
rather than quoting the whole string.

  localhost.localdomain> cm user/chef2b 
  localhost.localdomain> cm user/chef2b/Dollar\ Bill
  localhost.localdomain> 

works fine here, against 2.1.11.  I'm using "unixhierarchysep: yes",
hence the use of "/" where you had "." in the example.

Jonathan
--
Jonathan Marsden| Internet: [EMAIL PROTECTED]   | Making electronic 
1252 Judson Street  | Phone: +1 (909) 795-3877  | communications work 
Redlands, CA 92374  | Fax:   +1 (909) 795-0327  | reliably for Christian 
USA | http://www.xc.org/jonathan| missions worldwide 





Re: cyradm and spaces

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, joe ritter wrote:

> The other oddity is that user who are accessing cyrus
> boxes through a squirrel mail front end can create
> mail
> boxes with space in the name just fine? Is there
> another means of create? This is really strange.
> Thanks again for your help.

Well, it'd be a problem in cyradm, not in the IMAP Daemon.

This should be fixed in 2.1.13, can you show me the IMAP telemetry log?

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: cyradm and spaces

2003-07-22 Thread joe ritter
Yep this did it. Setting 

LANG="en_US:en"

In /etc/sysconfig /il8n and gutting the UTF-8 crap did
it. 


--- Joakim Ryden <[EMAIL PROTECTED]> wrote:
> On Tue, 2003-07-22 at 17:09, joe ritter wrote:
> > The other oddity is that user who are accessing
> cyrus
> > boxes through a squirrel mail front end can create
> > mail
> > boxes with space in the name just fine? Is there
> > another means of create? This is really strange.
> > Thanks again for your help.
> 
> This is a complete shot in the dark... but maybe
> there is something with
> how the spaces are treated on the command line since
> Red Hat now uses
> utf8 by default. Try setting the LANG variable to
> en_US before using
> cyradm and then try to add something with spaces.
> 
> --Jo
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: cyradm and spaces

2003-07-22 Thread Joakim Ryden
On Tue, 2003-07-22 at 17:09, joe ritter wrote:
> The other oddity is that user who are accessing cyrus
> boxes through a squirrel mail front end can create
> mail
> boxes with space in the name just fine? Is there
> another means of create? This is really strange.
> Thanks again for your help.

This is a complete shot in the dark... but maybe there is something with
how the spaces are treated on the command line since Red Hat now uses
utf8 by default. Try setting the LANG variable to en_US before using
cyradm and then try to add something with spaces.

--Jo



Re: cyradm and spaces

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, joe ritter wrote:

> localhost.localdomain>
> createmailbox "user.atanzer.Hotels + Travel"
> usage: createmailbox [--partition partition] mailbox
> [partition]
>
> Each time I just get the usage message. Has anyone
> else seen this and were able to come up with
> workaround? Thanks again

You're using an old version of cyrus, this works fine for me on 2.1.14:

CYRUS.andrew.cmu.edu> cm "user.rjs3.foo bar"
CYRUS.andrew.cmu.edu> dm "user.rjs3.foo bar"
CYRUS.andrew.cmu.edu>

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



cyradm and spaces

2003-07-22 Thread joe ritter
I know that folder names with spaces in them are RFC
1730 compliants however I have some users who like to
put mail in folders such as user.username.Study
Guides. I have noticed the cyradm does not seem to
like the folder names with spaces in them even if they
are quoted:



localhost.localdomain> renamemailbox
"user.atanzer.Hotels_040+_040Travel"
"user.atanzer.Hotels + Travel"
renamemailbox: Unexpected extra arguments to Rename

localhost.localdomain> 
createmailbox "user.atanzer.Hotels + Travel"
usage: createmailbox [--partition partition] mailbox
[partition]

Each time I just get the usage message. Has anyone
else seen this and were able to come up with
workaround? Thanks again

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: Tru64 and 2.2 problems

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Rob Siemborski wrote:

> I thought you said it wasn't running at all?

Sorry, I missed the part about getting it working using LD_LIBRARY_PATH.

OOC, how do other executables that need libraries from multiple
directories work on Tru64?

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: flock vs fnctl

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Scott Adkins wrote:

> In version 2.0.16, flock() was being used for file locking.  However, in
> 2.2.1, I am wondering if this is still the case.  I looked in the configure
> output of 2.0.16 and it detects the flock() function call, but in the output
> of 2.2.1, it doesn't even look like it checks for flock().  Has the default
> changed or the behavior for locking changed between those versions?  The
> docs seem to indicate that flock() is still the default, if it is detected.

No, fcntl is not the default.  I'll have to look at the documentation.

--with-lock=flock should fix this for you though if it makes a difference.

I'd have to think about whats going on with your skiplist, it sounds wrong
but it could be an odd case of some sort.  (Its possible you also hit a
time when it was checkpointing, but that wouldn't happen every time).

Skiplist should *always* be faster than a flat database for any sort of
update operation.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: Tru64 and 2.2 problems

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Scott Adkins wrote:

> With respect to the compile errors, this is what I have found:
>
>  1) The configure process appears to pick up on the fact that Tru64 does
> have getnameinfo(), but not getaddrinfo().  The problem is that if one
> is found and the other is not, the definitions for both are included
> in lib/gai.h.  Well, getnameinfo() on Tru64 has a slightly different
> definition and produces a conflict that the compiler can't resolve.
> The solution was to modify gai.h and wrap the getaddrinfo() related
> routines with "#ifndef HAVE_GETADDRINFO/#endif" macros, and wrap the
> getnameinfo() with similar HAVE_GETNAMEINFO macros.

Please bugzilla this and hopefully we can come up with a better configure
system for it.

> Basically, ever line in that table generates an error on the union
> construct.  I don't understand the error message, been even more so, I
> don't understand why the union is even there at all.  It appears that
> this file is automatically generated by the following command:

The union is there because the default value can be either an int or a
char *.

>   ../tools/config2header imapopts.c imapopts.h < imapoptions
>
> The config2header script talks about playing an interesting game to get
> the union to initialize itself in a syntacticly valid manner, namely to
> initialize the union itself and not the members of the union, as well as
> to ensure that the union is initialized to something of a type that is
> in that union.  What do I say about that?  Very bizarre, and it doesn't
> work in Tru64.

If you have a suggestion that results in something that compiles with gcc
also, please let me know.

> Doing a mass delete of all the '(union config_value)' stuff in the file
> gets the code to compile, but I don't know what kind of problems that
> is
> going to cause me if it has to do with initializing things.
>
> Any thoughts on how to handle this problem?

I'm not sure what you're deleting here, so I can't say if its going to
work or not.  If the values are still there, I'll cautioiusly claim that
it will work.

>  3) After that, it compiles for awhile and then stops on imap/protocol.c
> with the following error:
>
>   cc: Error: ./../lib/prot.h, line 209: Missing ";". (nosemi)
>   __attribute__ ((format (printf, 2, 3)));
>
> Looking in lib/prot.h, I see the following:
>
>   extern int prot_printf(struct protstream *, const char *, ...)
>   __attribute__ ((format (printf, 2, 3)));
>
> What is that supposed to do?  I simply deleted the line that has the
> __attribute__ on it and put a semicolon on the previous line and it
> compiles.  What problems will I see by doing that?

What does this look like after your preprocessor sees it?  The contents of
the __attribute__ *should* dissapear if your compiler doesn't support it
and the semicolon should be able to be anywhere as long as its the next
token.

> Anyways, I hope someboyd out there can throw some ideas out to me... What I
> see right now is a server that acts slower than the 2.0.16 version we were
> running, and we are having problems with it staying up too.  I am still
> troubleshooting those problems.

I thought you said it wasn't running at all?

I'm not sure what to do about your runpath problems, since I don't know
anyone who has their sasl libraries and Berkeley DB libraries and so on
all live in a single directory.

As much as I want to be as portable as possible, is there a reason you
can't use gcc for this?  I'm not going to be able to do much for you
unless you can get me patches, since I don't have any Tru64 machines to
work on.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: RENAMES while users is logged in...

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Scott Adkins wrote:

> The two ways that I am aware of doing this is as follows:
>
>   1) issue RENAME commands at the IMAP protocol level, renaming a user
>  from one partition to another
>
>   2) moving the IMAP directories at the UNIX level and modifying the
>  mailboxes.db file manually to reflect the changed location
>
> We are looking at doing the first one.  Currently, we are doing this on
> the 2.0.16 version with the mailboxes.db file in the flat file format.

You definately want to do the first one.

> So, what happens if the user is logged in?  I definitely saw the warning
> in the docs about avoiding logged in users for rename commands.  We aren't
> able to shutdown the server to do the work, so I am not exactly sure how
> we determine if a user is already logged in or how to disable a user from
> logging in while the process works.

You'll wind up locking their inbox for a substantial amount of time, which
could be confusing to them.  The worst thing that will happen is that
their mailbox will briefly appear empty, they'll restart their client, and
all will be well.

FWIW, you can tell if a user is logged in by looking at the contents of
the proc directory in the configdirectory.

> Would doing a reconstruct on the user account as the very last thing help
> solve some of the inconsistencies that might develop with the server and
> client getting out of sync?

reconstruct has nothing to do with a client's view of the mailbox.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: Multiple master processes?

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Scott Adkins wrote:

> I am curious about the experiences of others out there that might have
> run more than one cyrus master on the same server for whatever reason...
> Are there any issues with interacting with the databases?  My guess is
> that as locking is working properly, there should be any issues at all.
> I just needed to confirm it with others first before we look at putting
> this philosophy into production.

This should be safe.  Master is sort of like a souped-up inetd and thats
it.

> By the way, with regards to the locking issues:
>
>   1) Yes, I have the lock patch that has been posted applied, so we are
>  less likely to see it.
>
>   2) No, we aren't going to limit the LMTP processes to some ridiculously
>  low number so that there is a 1:1 relationship of LMTP processes to
>  IMAP partitions.  I/O performance is a bit more complex than that...

More recent versions seem to have this problem significantly less.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



RENAMES while users is logged in...

2003-07-22 Thread Scott Adkins
We are going to restruture our IMAP stores across more partitions (meaning,
more disks) to improve our disk I/O performance and to improve our ability
to get these things backed up.
The two ways that I am aware of doing this is as follows:

 1) issue RENAME commands at the IMAP protocol level, renaming a user
from one partition to another
 2) moving the IMAP directories at the UNIX level and modifying the
mailboxes.db file manually to reflect the changed location
We are looking at doing the first one.  Currently, we are doing this on
the 2.0.16 version with the mailboxes.db file in the flat file format.
So, what happens if the user is logged in?  I definitely saw the warning
in the docs about avoiding logged in users for rename commands.  We aren't
able to shutdown the server to do the work, so I am not exactly sure how
we determine if a user is already logged in or how to disable a user from
logging in while the process works.
Would doing a reconstruct on the user account as the very last thing help
solve some of the inconsistencies that might develop with the server and
client getting out of sync?
Thanks,
Scott
--
+---+
 Scott W. Adkinshttp://www.cns.ohiou.edu/~sadkins/
  UNIX Systems Engineer  mailto:[EMAIL PROTECTED]
   ICQ 7626282 Work (740)593-9478 Fax (740)593-1944
+---+
PGP Public Key available at http://www.cns.ohiou.edu/~sadkins/pgp/

pgp0.pgp
Description: PGP signature


Multiple master processes?

2003-07-22 Thread Scott Adkins
With the lock problems we had with LMTP in 2.0.16, we are thinking about
maybe running two master processes, one configured just for LMTP and the
other for all the other stuff.  We would gain the added benefit that we
could actually run the LMTP master process on one cluster member of our
Tru64 5.1a cluster and the rest of the stuff on the other member.
I am curious about the experiences of others out there that might have
run more than one cyrus master on the same server for whatever reason...
Are there any issues with interacting with the databases?  My guess is
that as locking is working properly, there should be any issues at all.
I just needed to confirm it with others first before we look at putting
this philosophy into production.
By the way, with regards to the locking issues:

 1) Yes, I have the lock patch that has been posted applied, so we are
less likely to see it.
 2) No, we aren't going to limit the LMTP processes to some ridiculously
low number so that there is a 1:1 relationship of LMTP processes to
IMAP partitions.  I/O performance is a bit more complex than that...
Scott
--
+---+
 Scott W. Adkinshttp://www.cns.ohiou.edu/~sadkins/
  UNIX Systems Engineer  mailto:[EMAIL PROTECTED]
   ICQ 7626282 Work (740)593-9478 Fax (740)593-1944
+---+
PGP Public Key available at http://www.cns.ohiou.edu/~sadkins/pgp/

pgp0.pgp
Description: PGP signature


flock vs fnctl

2003-07-22 Thread Scott Adkins
In version 2.0.16, flock() was being used for file locking.  However, in
2.2.1, I am wondering if this is still the case.  I looked in the configure
output of 2.0.16 and it detects the flock() function call, but in the output
of 2.2.1, it doesn't even look like it checks for flock().  Has the default
changed or the behavior for locking changed between those versions?  The
docs seem to indicate that flock() is still the default, if it is detected.
We noticed the change in behavior when we went from flat file format in
2.0.16 to skiplist format in 2.2.1 for the mailboxes.db file.  We were
playing around with renaming a user account with a lot of files and see
that it takes more than twice as long to rename the user account (from
one partition to another partition, same account name) using the skiplist
database.  Trussing the process, we see that it does about the same time
period for the actual traversing of the user directory trees, copying
files from one partition to another, deleting the old files off, etc etc.
However, after the imap server finishes with all the file/directory
related stuff for that user rename, it then procedes to work on the
mailboxes.db file.  It goes into this nearly endless loop where most of
the time is spent doing the following:
 stat("/var/imap/mailboxes.db", 0x00011FFF9C88) = 0
 fcntl(7, F_SETLKW, 0x00011FFF9D98)  = 0
 fcntl(7, F_SETLKW, 0x00011FFF9C40)  = 0
(7 is the file descriptor associated with mailboxes.db currently opened
for read/write operations)
The user had 6 directories (5 folders directly under the INBOX folder)
and 704 files total (686 messages and 18 cyrus header/index/cache files).
Looking through the truss output, there were 1486 open operations that
involved the user account itself, generally, one for the file in the old
partition, and one for the file in the new partition.  There were 39
mkdir operations (6 of which actually succeeded... the other 33 were on
directories that already existed).  That all seems reasonable.
The problem is when it gets to mailboxes.db with the above 3 lines,
in which case it does those 3 calls consecutively 16,521 times!!!  I
have no idea what it is doing, and that is what I will be figuring
out tomorrow.  I don't know if this is related to the flock() (or the
lack of flock() being called) or not.
If anyone has any ideas, I would appreciate it.

Scott
--
+---+
 Scott W. Adkinshttp://www.cns.ohiou.edu/~sadkins/
  UNIX Systems Engineer  mailto:[EMAIL PROTECTED]
   ICQ 7626282 Work (740)593-9478 Fax (740)593-1944
+---+
PGP Public Key available at http://www.cns.ohiou.edu/~sadkins/pgp/

pgp0.pgp
Description: PGP signature


Tru64 and 2.2 problems

2003-07-22 Thread Scott Adkins
Okay, I have enough problems now to post something.

We are running on a Tru64 5.1a cluster (2 machines).  Compiling 2.2.1 has
not been a pleasant prospect.  We are using Tru64's cc compiler, and are
not permitted to use the gcc compiler.
First thing is first, we are using SASL-2.15.1 and BerkeleyDB 4.0.14.  The
configure process is ran with the following code in a script:
 SSL=/usr/local/ssl
 SASL=/usr/local/sasl-2.1.15
 BERK=/usr/local/BerkeleyDB.4.0
 SNMP=/usr/local/net-snmp-4.2.1
 CFLAGS="-I$SSL/include -I$SASL/include -I$BERK/include -I$SNMP/include 
-gall"
 RPATH="-Wl,-rpath,$SSL/lib:$SASL/lib:$BERK/lib:$SNMP/lib"
 LDFLAGS="-L$SSL/lib -L$SASL/lib -L$BERK/lib -L$SNMP/lib $RPATH"
 export CFLAGS LDFLAGS

 ./configure --with-sasl=/usr/local/sasl-2.1.15 \
 --with-dbdir=/usr/local/BerkeleyDB.4.0 \
 --with-ucdsnmp=/usr/local/net-snmp-4.2.1 \
 --with-openssl=/usr/local/ssl \
 --with-egd-socket=/var/run/egd-pool \
 --with-pidfile --enable-listext \
 2>&1 | tee configure.output
With respect to the compile errors, this is what I have found:

1) The configure process appears to pick up on the fact that Tru64 does
   have getnameinfo(), but not getaddrinfo().  The problem is that if one
   is found and the other is not, the definitions for both are included
   in lib/gai.h.  Well, getnameinfo() on Tru64 has a slightly different
   definition and produces a conflict that the compiler can't resolve.
   The solution was to modify gai.h and wrap the getaddrinfo() related
   routines with "#ifndef HAVE_GETADDRINFO/#endif" macros, and wrap the
   getnameinfo() with similar HAVE_GETNAMEINFO macros.
2) So, I get past the above, and run right smack into another problem,
   this time with lib/imapopts.c.  I get over a 100 lines of errors along
   the lines of the following:
   {IMAPOPT_ADMINS,"admins",0,(union config_value)((const char 
*)""),OPT_STRING},
   ---^
   {IMAPOPT_ALLOWALLSUBSCRIBE,"allowallsubscribe",0,(union 
config_value)((int)0),OPT_SWITCH},
   -^
   {IMAPOPT_ALLOWNEWNEWS,"allownewnews",0,(union 
config_value)((int)0),OPT_SWITCH},
   ---^

   Basically, ever line in that table generates an error on the union
   construct.  I don't understand the error message, been even more so, I
   don't understand why the union is even there at all.  It appears that
   this file is automatically generated by the following command:
 ../tools/config2header imapopts.c imapopts.h < imapoptions

   The config2header script talks about playing an interesting game to get
   the union to initialize itself in a syntacticly valid manner, namely to
   initialize the union itself and not the members of the union, as well as
   to ensure that the union is initialized to something of a type that is
   in that union.  What do I say about that?  Very bizarre, and it doesn't
   work in Tru64.
   Doing a mass delete of all the '(union config_value)' stuff in the file
   gets the code to compile, but I don't know what kind of problems that 
is
   going to cause me if it has to do with initializing things.

   Any thoughts on how to handle this problem?

   I get similar errors when compiling libcyr_cfg.c as well, but in a
   slightly different context, and doing the same deletion gets it to at
   least compile.
3) After that, it compiles for awhile and then stops on imap/protocol.c
   with the following error:
 cc: Error: ./../lib/prot.h, line 209: Missing ";". (nosemi)
 __attribute__ ((format (printf, 2, 3)));
   Looking in lib/prot.h, I see the following:

 extern int prot_printf(struct protstream *, const char *, ...)
 __attribute__ ((format (printf, 2, 3)));
   What is that supposed to do?  I simply deleted the line that has the
   __attribute__ on it and put a semicolon on the previous line and it
   compiles.  What problems will I see by doing that?
4) Okay, everything compiled.  However, I saw a lot of these errors when
   linking the final executables:
Unrecognized argument in LIBS ignored: 
'-Wl,-rpath,/usr/local/BerkeleyDB.4.0/lib'
Unrecognized argument in LIBS ignored: 
'-Wl,-rpath,/usr/local/sasl-2.1.15/lib'
Unrecognized argument in LIBS ignored: '-Wl,-rpath,/usr/local/ssl/lib'

   In fact, if I do an 'ldd imap/imapd', I get the following error:

imap/imapd: ldd: Fatal Error: Cannot generate dynamic dependencies for
  library libsasl2.so
   Of course, the executables won't even run at this point.  I can set the
   LD_LIBRARY_PATH info by hand and get them to work, but that isn't ideal
   and I shouldn't have to with the current technology of using rpath.  I
   don't know how it works in Linux or other systems, but in Tru64, the use
   of multiple rpaths are *not* additive... the last one provided on the
   command line wins... I specified my own in the LDFLAGS variable before
   compiling, but apparently, the configure p

Re: vacation "days:" expiration question

2003-07-22 Thread Rob Siemborski
On Tue, 22 Jul 2003, Mike Cathey wrote:

> On Tue, 2003-07-22 at 14:11, Craig Graham wrote:
> > The expiry is not for the vacation, but for the caching of addresses to
> > which a vacation message has been send; if it is 7 days and someone mails
> > you every day, they will only get a vacation response every 7 days. As far
> > as I can tell from the RFC, anyway :)
>
> Where is Cyrus/sieve storing this state info?

In deliver.db (its a sort of overloaded per-message database that is used
for duplicate delivery supression as well).

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: vacation "days:" expiration question

2003-07-22 Thread Mike Cathey
On Tue, 2003-07-22 at 14:11, Craig Graham wrote:
> The expiry is not for the vacation, but for the caching of addresses to
> which a vacation message has been send; if it is 7 days and someone mails
> you every day, they will only get a vacation response every 7 days. As far
> as I can tell from the RFC, anyway :)

Where is Cyrus/sieve storing this state info?

Cheers,

Mike
-- 
Mike Cathey - http://www.mikecathey.com/
Network Administrator
RTC Internet - http://www.catt.com/


signature.asc
Description: This is a digitally signed message part


problem getting Cyrus imapd to work

2003-07-22 Thread Robert J. Rust
Greetings -

I am attempting to get Cyrus imapd to work with mysql following the
following how-to document:
http://www.delouw.ch/linux/Postfix-Cyrus-Web-cyradm-HOWTO/html/install.html

I have tried using the same versions of the software as in the howto
(imapd-2.1.12, sasl-2.1.12, db-4.0.14, openssl-0.9.7b etc.) as well as what
are the latest (imapd-2.1.14, sasl-2.1.15, db-4.1.24, openssl-0.9.7b).  I
have gotten them to compile with (seemingly) no errors but 'master'
segfaults when attempting to start it.  All that appears in the logs is:

Jul 22 13:53:44 trinity master[8571]: setrlimit: Unable to set file
descriptors limit to -1: Operation not permitted
Jul 22 13:53:44 trinity master[8571]: retrying with 1024 (current max)
Jul 22 13:53:44 trinity master[8571]: process started
Jul 22 13:53:44 trinity master[8575]: about to exec
/usr/cyrus/bin/ctl_cyrusdb
Jul 22 13:53:44 trinity ctl_cyrusdb[8575]: recovering cyrus databases
Jul 22 13:53:45 trinity ctl_cyrusdb[8575]: done recovering cyrus databases

The server is a Debian Linux box with the latest "unstable" packages (yeah,
I know it's 'unstable', but I wanted recent software).
I would be happy to provide information about the software setup as
requested.  I read a hint that it might be related to having multiple
versions of db libraries on the system, but I don't know how to check and be
sure that's the problem (since I have stuff like perl that requires one
version and other packages that require a newer version).
Does anybody have suggestions on how to fix/troubleshoot this?

Robert



Re: vacation "days:" expiration question

2003-07-22 Thread Craig Graham
The expiry is not for the vacation, but for the caching of addresses to
which a vacation message has been send; if it is 7 days and someone mails
you every day, they will only get a vacation response every 7 days. As far
as I can tell from the RFC, anyway :)

- Original Message -
From: "Kyle Silfer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 22, 2003 5:46 PM
Subject: vacation "days:" expiration question


> I have set up a couple of vacation sieve scripts which work just fine
except
> that they never seem to expire and must be manually disabled.
>
> My question is: How does sieve know when "days:" has expired? And when
> during the day does it expire? For example, if it's 5pm today and I set my
> vacation script to be "days: 1" will it expire the next day at 5pm? Or is
> this subject to other processes?




Re: Error: Could not shut down filedescriptor...

2003-07-22 Thread Erik Steffl
Henrique de Moraes Holschuh wrote:
On Thu, 17 Jul 2003, Rob Siemborski wrote:

On Thu, 17 Jul 2003, Erik Steffl wrote:

Jul 17 08:56:43 jojda cyrus/imapd[7560]: lock_reopen: blocked, sleeping
for 0 on interval 0 (15, /var/lib/cyrus/user/e/erik.seen)
Jul 17 08:56:43 jojda cyrus/imapd[7560]: lock_reopen: blocked, sleeping
for 1 on interval 1 (15, /var/lib/cyrus/user/e/erik.seen)


You're getting lock contention in Berkeley DB, and the no-deadlock stuff I
put in Debian is doing exponential backoffs.
What is the load profile in your system?
  pretty much nothing, I am the only user, I have two mozilla instances 
(one on the same computer, another one remote) checking for new email 
every 10 minutes and 5 minutes, respectively. Mozilla checks about 20 
folders for new mails.

  I suspect that that might be a problem, I just noticed that it checks 
for new mail pretty much all the time, and in between the 'user erik 
opened...' messages I see the locks. So maybe it's mozilla being too 
enthusiastic about checking for new email messages, opening another 
folder before it gets response from the other or something like that.

Here's what looks like relevant part of the log (that's from syslog):

Jul 22 10:28:58 jojda cyrus/imapd[2448]: open: user erik opened 
In.osafrosambas
Jul 22 10:28:58 jojda cyrus/imapd[2448]: open: user erik opened In.PJB-100
Jul 22 10:28:59 jojda cyrus/imapd[2448]: open: user erik opened In.SVLUG
Jul 22 10:28:59 jojda cyrus/imapd[2448]: open: user erik opened In.VNC
Jul 22 10:28:59 jojda cyrus/imapd[2448]: open: user erik opened In.~ SPAM ~
Jul 22 10:28:59 jojda cyrus/imapd[2448]: open: user erik opened 
In.Chasing the wish
Jul 22 10:28:59 jojda cyrus/imapd[2448]: open: user erik opened 
In.FreeBSD-questions
Jul 22 10:30:01 jojda /USR/SBIN/CRON[3046]: (www-data) CMD (if [ -x 
/usr/sbin/awstats-update ]; then /usr/sbin/awstats-update; fi)
Jul 22 10:31:54 jojda cyrus/imapd[1754]: lock_reopen: blocked, sleeping 
for 0 on interval 0 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[1754]: lock_reopen: blocked, sleeping 
for 1 on interval 1 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[2637]: lock_reopen: blocked, sleeping 
for 0 on interval 0 (15, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[2637]: lock_reopen: blocked, sleeping 
for 1 on interval 1 (15, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[1094]: lock_reopen: blocked, sleeping 
for 0 on interval 0 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[1094]: lock_reopen: blocked, sleeping 
for 1 on interval 1 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[2626]: open: user erik opened In.BayNPG
Jul 22 10:31:54 jojda cyrus/imapd[1753]: open: user erik opened In
Jul 22 10:31:54 jojda cyrus/imapd[1753]: lock_reopen: blocked, sleeping 
for 0 on interval 0 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[1753]: lock_reopen: blocked, sleeping 
for 1 on interval 1 (16, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:54 jojda cyrus/imapd[2626]: open: user erik opened In.Cyrus
Jul 22 10:31:55 jojda cyrus/imapd[2626]: open: user erik opened 
In.Debian-devel
Jul 22 10:31:55 jojda cyrus/imapd[2637]: lock_reopen: blocked, sleeping 
for 4 on interval 2 (15, /var/lib/cyrus/user/e/erik.seen)
Jul 22 10:31:55 jojda cyrus/imapd[1754]: open: user erik opened In.BK
Jul 22 10:31:55 jojda cyrus/imapd[1754]: open: user erik opened 
In.Debian-sparc
Jul 22 10:31:55 jojda cyrus/imapd[1753]: open: user erik opened In.Alsa-user
Jul 22 10:31:56 jojda cyrus/imapd[2626]: open: user erik opened 
In.Debian-user
Jul 22 10:31:56 jojda cyrus/imapd[1754]: open: user erik opened 
In.Linux-usb-users
Jul 22 10:31:56 jojda cyrus/imapd[1753]: open: user erik opened In.MUS351

  this repeats all the time, messages about user erik opening folders 
(that must be mozilla checking for new email) and messages about 
erik.seen being locked.

	erik



Re: empty line Cyrus' reject/vacation messages (was: Re: Sievewrites an empty line in headers for reject/vacation)

2003-07-22 Thread Joakim Ryden
On Tue, 2003-07-22 at 01:56, Stephen Grier wrote:
> On Sat, 2003-07-19 at 21:41, Bernhard Erdmann wrote:
> > Hi,
> > 
> > if Cyrus 2.1.13 sends reject or vacation messages generated by Sieve on 
> > Exim 3.36 Linux systems and being filed back from Exim into Cyrus, a 
> > blank line is added in the middle of the header lines causing the second 
> > part of the header being treated as the body of the mail.
> 
> We were seeing this with Cyrus and exim-3.22.
> 
> > Exim 4.20 has an option drop_cr [5] but not Exim 3.36.
> 
> exim-3.22 has a -dropcr command line option.

I am seeing this using the latest snapshot version of Postfix and Cyrus
2.2.1. There's no reject/vacation messages involved though, just regular
lmtp delivery and it doesn't happen all the time. Does anyone know if
there is a drop_cr equivalent for Postfix?

--Jo



vacation "days:" expiration question

2003-07-22 Thread Kyle Silfer
I have set up a couple of vacation sieve scripts which work just fine except 
that they never seem to expire and must be manually disabled.

My question is: How does sieve know when "days:" has expired? And when 
during the day does it expire? For example, if it's 5pm today and I set my 
vacation script to be "days: 1" will it expire the next day at 5pm? Or is 
this subject to other processes?

./k

-- 
Kyle Silfer
Systems Manager
NuCity Publications
505.346.0660 x242




cyrus folders with spaces

2003-07-22 Thread joe ritter

Hello,
I recently migrated a UW Imap userbase over to Cyrus.
In UW the default folder for "sent" was Sent Items
with the space in there. After running the bsd2cyrus
protion of the procedure these folders got create as 

Sent_040Items

I was wondering if anyone else who has done this type
of migration saw this and how was handled or
rectigied? I thought  cyrus might just be doing this
internaly however when users log via squirrelmail they
see the folder name as Sent_040Items. Thanks for your feedback.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: distribution mailboxes across multiple partitions

2003-07-22 Thread joe ritter
I believe the script Mike was referring to is at:

http://www.squeegy.org/programs/

However is cyrus 1.X era TCL stuff. It could probably
stand a rewrite in PERL.


--- Etienne Goyer <[EMAIL PROTECTED]>
wrote:
> I'll be interested in this script too.
> 
> On Fri, Jul 18, 2003 at 04:52:42PM -0400, Mike
> Cathey wrote:
> > A while back I remember seeing a script that would
> grab your partiton
> > list from /etc/imapd.conf and evenly distribute
> mailboxes amongst said
> > partitions.  I googled for a while and was unable
> to find it.  Does
> > anyone on the list remember this script or have a
> link to it?
> > 
> > Thanks
> > 
> > Mike
> > -- 
> > Mike Cathey - http://www.mikecathey.com/
> > Network Administrator
> > RTC Internet - http://www.catt.com/
> 
> 
> 
> -- 
> Etienne GoyerLinux Québec
> Technologies Inc.
> http://www.LinuxQuebec.com  
[EMAIL PROTECTED]


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: distribution mailboxes across multiple partitions

2003-07-22 Thread Etienne Goyer
I'll be interested in this script too.

On Fri, Jul 18, 2003 at 04:52:42PM -0400, Mike Cathey wrote:
> A while back I remember seeing a script that would grab your partiton
> list from /etc/imapd.conf and evenly distribute mailboxes amongst said
> partitions.  I googled for a while and was unable to find it.  Does
> anyone on the list remember this script or have a link to it?
> 
> Thanks
> 
> Mike
> -- 
> Mike Cathey - http://www.mikecathey.com/
> Network Administrator
> RTC Internet - http://www.catt.com/



-- 
Etienne GoyerLinux Québec Technologies Inc.
http://www.LinuxQuebec.com   [EMAIL PROTECTED]


Re: empty line Cyrus' reject/vacation messages (was: Re: Sievewrites an empty line in headers for reject/vacation)

2003-07-22 Thread Stephen Grier
On Sat, 2003-07-19 at 21:41, Bernhard Erdmann wrote:
> Hi,
> 
> if Cyrus 2.1.13 sends reject or vacation messages generated by Sieve on 
> Exim 3.36 Linux systems and being filed back from Exim into Cyrus, a 
> blank line is added in the middle of the header lines causing the second 
> part of the header being treated as the body of the mail.

We were seeing this with Cyrus and exim-3.22.

> Exim 4.20 has an option drop_cr [5] but not Exim 3.36.

exim-3.22 has a -dropcr command line option.

> Would it be advisable to
> - patch Cyrus not to use \r\n as a line terminator
> - patch Cyrus to use a wrapper for the sendmail binary stripping \r\n 
> down to \n
> - upgrade to Exim 4.20 and use the option drop_cr?

We created a simple wrapper to exim using the -dropcr option and
specified this in the sendmail: line of imapd.conf.

-- 

Stephen Grier
Systems Developer
Computing Services
Queen Mary, University of London