Re: LMTPD signaled to death by 11 - neverending story [the end]

2001-10-01 Thread Szymon Juraszczyk

On Sun, 2001-09-30 at 23:25:37, Amos Gouaux wrote:

  On Mon, 1 Oct 2001 05:56:08 +0200,
  Szymon Juraszczyk [EMAIL PROTECTED] (sj) writes:
 
 sj   I spent a few days figuring out why this beast was crashing. And all
 sj because lots of people still are unaware of elementary secure programing
 sj issues, hence they make trivial mistakes such as sprintf()-ing variable
 sj length string into a fixed size buffer. Sigh...
 
 Looks like this was contributed to CMU.
 
 Wait, did you use the --with-notify option to configure?  If so,
 what did you specify it as?

  I've chosen unix notify for it is simple and I know nothing about Zephyr.
I need this just for triggering SMS messages sent to the owners of the
mailboxes. Anyway, simple patch fixed the problem. Thanks god, because I'd
be in a trouble if I didn't have it done by morning. Somehow there was quite
lots of messages with such long topic in the spool, making lmtpd done
hundreds if not thousands of times a day.

Cheers,
-- 
Szymon Juraszczyk, [EMAIL PROTECTED]
Surfland Computer Systems S.A.
tel. +48 71 78-02-952, http://www.ssk.com.pl/



Re: LMTPD signaled to death by 11 - neverending story [the end]

2001-10-01 Thread Szymon Juraszczyk

On Mon, 2001-10-01 at 15:04:59, Jeremy Howard wrote:

 Amos Gouaux wrote:
   On Mon, 1 Oct 2001 05:56:08 +0200,
   Szymon Juraszczyk [EMAIL PROTECTED] (sj) writes:
 
  sj   I spent a few days figuring out why this beast was crashing. And all
  sj because lots of people still are unaware of elementary secure
 programing
  sj issues, hence they make trivial mistakes such as sprintf()-ing
 variable
  sj length string into a fixed size buffer. Sigh...
 
  Looks like this was contributed to CMU.
 
  Wait, did you use the --with-notify option to configure?  If so,
  what did you specify it as?
 
 Yes, that is contributed code. By me! When I posted it to the list I warned
 that I'm not a regular C coder and that this is a quick hack mainly copied
 and pasted from someone else's code, but I guess that that warning didn't
 get through to the docs.
 
 Anyway, this is an obvious and stupid mistake, and I'm sorry that you've
 been caught by it. I haven't actually got around to using notify_unix at our
 site, which is why I haven't checked the code more carefully, and haven't
 been caught by this bug.

  OK, do not worry :-) We learn something each day. I had no sleep, it was
already dawn so I wrote some sharp words. Thanks for contributing the
software anyway!

Cheers,
-- 
Szymon Juraszczyk, [EMAIL PROTECTED]
Surfland Computer Systems S.A.
tel. +48 71 78-02-952, http://www.ssk.com.pl/



Re: overview.html

2001-10-01 Thread Tarjei Huse

TO ALL YOU PEOPLE ON THE CYRUS MAILLINGLIST: Read the faq and mail me all 
errors you find, especially spellingerrors :)

 I find the Cyrus docs pretty reliable. I suggest that in the FAQ you
 remove the comment about suggesting that users follow the HOWTO but be
 aware of differences with v2, and instead suggest that they ignore the
 HOWTO and instead follow the install*.html in the distribution.
I'll try to fix it this week, ok?
Thanks for the input btw, I think there's a lot of misstakes in the faq 
that you'll spot but I would not now of...

 BTW, can we mirror the Cyrus docs on the FAQ site? Not everyone has the
 docs in their binary distribution, and it would also be nice to link to
 the official docs from the FAQ.
And also, most people read the docs before deciding on what prog to use. 
Thus, we should put some sentences into the texts along the lines of cyrus 
is very easy to install and a very well documented package :)

When Cyrus-utils is up and running, I don't think we'll be lying. Cyrus 
Sasl is another thing.
thinking
Hmm. Jeremy, maybe we should make a small area for the cyrus-sasl docs on 
the site as well, even including the changes done by the ldap patch ?

Here's an idea: lets hold a small contest for the webdesign of the cyrus-
utils pages. 



Tarjei


Tarjei Huse
920 63 413





Re: LMTPD signaled to death by 11 - neverending story [the end]

2001-10-01 Thread Szymon Juraszczyk

On Mon, 2001-10-01 at 17:27:58, Jeremy Howard wrote:

 Szymon Juraszczyk wrote:
OK, do not worry :-) We learn something each day. I had no sleep, it was
  already dawn so I wrote some sharp words. Thanks for contributing the
  software anyway!
 
 Can you post the patch that you made please? Any other suggestions for
 improving unix_notify? I haven't heard reports of anyone else using it in a
 production environment, so any feedback would be much appreciated :-)

  I just changed

sprintf (messageToSend,%s\n%s\n%s\n%s\n%s\n,class,instance,user,mailbox,message);

  to

sprintf (messageToSend,%s\n%s\n%s\n%s\n,class,instance,user,mailbox);
cnt = write(sock, messageToSend, strlen(messageToSend));
cnt += write(sock, message, strlen(message));
cnt += write(sock, newline, 1);

  and added declaration

char newline = '\n';

  in function notify()

  I asserted that those 4 variables won't exceed 2KB buffer :-) Quick and
dirty fix, nothing to base on but I'm sending this as you wish. 

 PS: What kind of SMS daemon are you using? Preforking Perl daemon?

  Actually I don't even prefork the listening (master) proces. The process
is listening alone on a socket and it spawns a child when it comes to
sending an SMS (first it looks up the user in the database to check whether
he/she has set up SMS notification). I did not see any need for preforking
as the time between accepting a connection, looking up the user in DB and
spawning a child is short enough to handle the load for some 5500 mailboxes.
So I use perl skeleton from the Cyrus source with preforking part cut out.

  When the load increases I might fork right after accepting the connection.
However, fork() will be done even if no SMS will be actually sent, so at the
moment I've chosen the former model. Preforking processes on listening
socket are needed for really considerable load, when swift response
is required (webservers are good example).

  For sending SMS I use LWP library and web2sms gateways provided by all of
the three mobile telecoms in Poland.

Cheers,
-- 
Szymon Juraszczyk, [EMAIL PROTECTED]
Surfland Computer Systems S.A.
tel. +48 71 78-02-952, http://www.ssk.com.pl/



Migrating from wu-imap to Cyrus

2001-10-01 Thread Marko Cuk

I have working cyrus, but I have problems with migration.

If I try to move messages in Netscape client, it moves some folders, but on some 
folders I get an error, that message contains invalid header...

I have tried a scripts mbox2cyrus, uw2cyrus, but none of them is working ok for me. 
They don't work or they are not reliable.

I have about 2Gig of my mail any I'd like to move it to cyrus.

The second thing is, wich passwd database do you prefer ? I have sasldb with pwcheck. 
What about mysql ? Wich type is capable of changing e-mails through web-based script 
and where to get it ?

Many thanks, Cuk

p.s. I use FreeBSD




lmtpd locking?

2001-10-01 Thread Nick Ustinov

I am still investigating this many-lmtpds-in memory thing and running

sendmail -q -v -X shows the following:

05707  Running /var/spool/mqueue/f91BZUx28683 (sequence 9 of 733)

05707   RSET

05707  RSET

05707  250 2.0.0 ok

05707  250 2.0.0 ok

05707  [EMAIL PROTECTED] Using cached ESMTP connection to localhost via
cyrus...  
05707   MAIL From:[EMAIL PROTECTED] SIZE=263

05707  MAIL From:[EMAIL PROTECTED] SIZE=263

05707  250 2.1.0 ok

05707  250 2.1.0 ok

05707   RCPT To:epa

05707  RCPT To:epa

05707  250 2.1.5 ok

05707  250 2.1.5 ok

05707   DATA

05707  DATA

05707  354 go ahead

05707  354 go ahead

05707  Received: (from root@localhost)

05707by satan.inbox.lv (8.11.6/8.11.0) id f91BZUx28683

05707for [EMAIL PROTECTED]; Mon, 1 Oct 2001 13:35:30 +0200

05707  Received: from hyper.gids.lv (ns.gids.lv [159.148.14.3])

05707by satan.inbox.lv (8.11.6/8.11.0) with ESMTP id f91BYje27669

05707for [EMAIL PROTECTED]; Mon, 1 Oct 2001 13:34:45 +0200

05707  Received: from black-monster (unknown [217.199.98.170])

05707by hyper.gids.lv (Postfix) with SMTP id 504B1655A1

05707for [EMAIL PROTECTED]; Mon,  1 Oct 2001 12:22:59 +0200 (EET)

05707  Date: Mon, 01 Oct 2001 12:27:23 -0200

05707  Subject: [EMAIL PROTECTED] nosuutiijis Tev zinju no oHo.lv

05707  To: [EMAIL PROTECTED]

05707  From: oHo.lv [EMAIL PROTECTED]

05707  Message-Id: [EMAIL PROTECTED]

05707 

05707  test

05707  .

05707   . 

and freezes here.

Running strace on this, indicates, that it freezes on

read(8,


so, I assume lmtp is not sending some response after . in DATA ?? Comments?


Nick Ustinov
Enterprise Solutions Group Director

Vide Infra Grupa SIA
40 Brivibas St, Riga, Latvia, LV 1050
phone: +371 7812294
fax: +371 7812297
http://www.videinfra.com



Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread Cillian Sharkey

Marko Cuk [EMAIL PROTECTED] wrote:
 I have working cyrus, but I have problems with migration.
 
 If I try to move messages in Netscape client, it moves some folders, but on
 some folders I get an error, that message contains invalid header...

I got that too when doing a mass-conversion a while back, but my script simply
'ignored' troublesome mails and carried on. I never did track down what header
Cyrus didn't like as the number of dropped mails was small. I'd recommend
tracking down which message is causing the problem then look for any invalid
headers (or post it here nothing seems amiss).

Regards,

-- 
Cillian



Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread Marko Cuk

I found the problem.

From [EMAIL PROTECTED]  Wed Jul 25 01:08:53 2001
From cuk  Wed Jul 25 01:08:53 2001   --PROBLEM
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: from localhost (localhost.nu.cuk.nu [127.0.0.1])
by nu.cuk.nu (Postfix) with ESMTP id 1D5F21AB75
for [EMAIL PROTECTED]; Wed, 25 Jul 2001 01:08:52 +0200 (CEST)
Received: from eva.inforta.com (eva.inforta.com [212.30.95.190])
by nu.cuk.nu (Postfix) with SMTP id 4D17D1AB72
for [EMAIL PROTECTED]; Wed, 25 Jul 2001 01:08:49 +0200 (CEST)
Received: from localhost (localhost.inforta.com [127.0.0.1])
by eva.inforta.com (Postfix) with ESMTP id 2BCD8B71B
for [EMAIL PROTECTED]; Wed, 25 Jul 2001 01:12:52 +0200 (CEST)


I think, that it is generated by procmail .

Cuk




Cillian Sharkey wrote:

 Marko Cuk [EMAIL PROTECTED] wrote:
  I have working cyrus, but I have problems with migration.
 
  If I try to move messages in Netscape client, it moves some folders, but on
  some folders I get an error, that message contains invalid header...

 I got that too when doing a mass-conversion a while back, but my script simply
 'ignored' troublesome mails and carried on. I never did track down what header
 Cyrus didn't like as the number of dropped mails was small. I'd recommend
 tracking down which message is causing the problem then look for any invalid
 headers (or post it here nothing seems amiss).

 Regards,

 --
 Cillian




lmtpd locking continued

2001-10-01 Thread Nick Ustinov

And that's the place, where lmtpd freezes:


Oct  1 14:27:09 satan lmtpd[5687]: duplicate_check:
[EMAIL PROTECTED]  user.bforce  0 




Nick Ustinov
Enterprise Solutions Group Director

Vide Infra Grupa SIA
40 Brivibas St, Riga, Latvia, LV 1050
phone: +371 7812294
fax: +371 7812297
http://www.videinfra.com



Re: lmtpd locking continued

2001-10-01 Thread Amos Gouaux

 On Mon, 1 Oct 2001 13:22:27 +0200 ,
 Nick Ustinov [EMAIL PROTECTED] (nu) writes:

nu And that's the place, where lmtpd freezes:
nu Oct  1 14:27:09 satan lmtpd[5687]: duplicate_check:
nu [EMAIL PROTECTED]  user.bforce  0 

You should probably indicate what version of Cyrus you're using.
At one point you mention 2.1.0pre, but don't specify when you pulled
this from CVS.

-- 
Amos




RE: lmtpd locking continued

2001-10-01 Thread Nick Ustinov

Sorry,

it's 2.1.0pre, pulled sep 26th.

concerning the problem -- i ran reconstruct on this mailbox (user.bforce)
and it went fine, however this doesn't always help (was it a coincedence?)

I enabled another sendmail.mc config with avpkeeper, which works fine now
(non-local mails delivered). However, localmails which are delivered using
cyrus mailer are still freezing after issuing DATA (messages are being
delivered to mailboxes, by the way).

This happens when it tries to connect via UNIX: /var/imap/socket/lmtp
according to sendmail's log. 

Nick

-Original Message-
From: Amos Gouaux [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 15:20
To: [EMAIL PROTECTED]
Subject: Re: lmtpd locking continued


 On Mon, 1 Oct 2001 13:22:27 +0200 ,
 Nick Ustinov [EMAIL PROTECTED] (nu) writes:

nu And that's the place, where lmtpd freezes:
nu Oct  1 14:27:09 satan lmtpd[5687]: duplicate_check:
nu [EMAIL PROTECTED]  user.bforce  0 

You should probably indicate what version of Cyrus you're using.
At one point you mention 2.1.0pre, but don't specify when you pulled
this from CVS.

-- 
Amos



Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread mills

Cillian Sharkey writes:

Marko Cuk [EMAIL PROTECTED] wrote:
 I have working cyrus, but I have problems with migration.
 
 If I try to move messages in Netscape client, it moves some folders, but on
 some folders I get an error, that message contains invalid header...

I got that too when doing a mass-conversion a while back, but my script simply
'ignored' troublesome mails and carried on. I never did track down what header
Cyrus didn't like as the number of dropped mails was small. I'd recommend
tracking down which message is causing the problem then look for any invalid
headers (or post it here nothing seems amiss).

Here's an example of a messages that Cyrus rejected when I was
testing loading Cyrus mailboxes from Unix mailboxes:

From IMAP4.psuedo.sims Fri Sep 28 10:09:00 2001
Date: Fri, 28 Sep 2001 10:09:00 -0500 (CDT)
From: Postmaster
Subject: Message from mail server   
Content-Length: 94
Mime-Version: 1.0
Status: RO
X-IMAP: 923336730 178

Delete.
This is a system message.

My script just carries on to the next message, which is fine in
this case.


-- 
-Gary Mills--Unix Support--U of M Academic Computing and Networking-



Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread Leena Heino

On Mon, 1 Oct 2001 [EMAIL PROTECTED] wrote:

 Here's an example of a messages that Cyrus rejected when I was
 testing loading Cyrus mailboxes from Unix mailboxes:

 From IMAP4.psuedo.sims Fri Sep 28 10:09:00 2001
 Date: Fri, 28 Sep 2001 10:09:00 -0500 (CDT)
 From: Postmaster
 Subject: Message from mail server
 Content-Length: 94
 Mime-Version: 1.0
 Status: RO
 X-IMAP: 923336730 178

 Delete.
 This is a system message.

 My script just carries on to the next message, which is fine in
 this case.
Is your script able to remove the From  header from mails that are
to be converted?

I used this very simple but crude command to convert mailboxes:
cat user-mbox | formail -I From  -s deliver -q user



 --
 -Gary Mills--Unix Support--U of M Academic Computing and Networking-


  -- Leena Heino ([EMAIL PROTECTED])




Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread mills

Leena Heino writes:

Is your script able to remove the From  header from mails that are
to be converted?

Yes, that's always necessary.

I used this very simple but crude command to convert mailboxes:
cat user-mbox | formail -I From  -s deliver -q user

That's approximately what I used last time I did a migration.
This time, I'm using a perl script that preserves the `read'
status of mail.


-- 
-Gary Mills--Unix Support--U of M Academic Computing and Networking-



Re: lmtpd locking continued

2001-10-01 Thread Ken Murchison



Nick Ustinov wrote:
 
 Sorry,
 
 it's 2.1.0pre, pulled sep 26th.

Try pulling it again.  I fixed a file descriptor leak (which I created)
in lmtpd.  Your lmtpd _may_ be running up against the fd limit.  Do you
get any complaints about too many open files?

Ken
-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



Re: ! in folder names

2001-10-01 Thread Gene Rackow

Also don't forget that ! is a special to many mail systems as well.
o O ( there are those of us that still remember UUCP bang paths)
--Gene

Ken Murchison made the following keystrokes:
 
 
 Darin Perusich wrote:
  
  does anyone know of any issues with using exclamation points in folder
  names?
 
 You can try it, but I don't think that it will work because '!' is a
 shell meta-char and Cyrus doesn't allow these.  To see what is allowed,
 look at GOODCHARS in mboxname.c.  You can try adding '!' to this list
 and see what happens.
 
 Ken
 -- 
 Kenneth Murchison Oceana Matrix Ltd.
 Software Engineer 21 Princeton Place
 716-662-8973 x26  Orchard Park, NY 14127
 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
 



RE: lmtpd locking continued

2001-10-01 Thread Nick Ustinov

Larry,

just did that and it sent 48 out of 721 msgs in mqueue.. And froze here:

Running /var/spool/mqueue/f91HRse04091 (sequence 49 of 721)
 RSET
250 2.0.0 ok
[EMAIL PROTECTED]... Using cached ESMTP connection to localhost
via cyrus...
 MAIL From:[EMAIL PROTECTED] SIZE=538
250 2.1.0 ok
 RCPT To:sb167407627200884
250 2.1.5 ok
 DATA
354 go ahead
 .


strace shows it's read(7,

Is it somehow related to alarm(300) I see in strace output as well?



Sincererly,
Nick

PS. Pretty weird user name, however it exists, reconstructed and is
accessible via IMAP



-Original Message-
From: Lawrence Greenfield [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 19:46
To: '[EMAIL PROTECTED]'; Nick Ustinov
Subject: Re: lmtpd locking continued


   From: Nick Ustinov [EMAIL PROTECTED]
   Date: Mon, 1 Oct 2001 18:02:16 +0200 

   Ken, just pulled latest cvs version, still the same. 

   As for too many files open, I have echo 32768 /etc/fs/file-max 

Did you nuke your existing duplicate delivery db and run ctl_cyrusdb -r?

As you noticed, the duplicate delivery code was reworked in 2.1 and
may still have some gotchas.

Larry



Re: Slow loading of Cyrus mailboxes

2001-10-01 Thread Lawrence Greenfield

   Date: Sun, 30 Sep 2001 20:12:01 -0500 (CDT)
   From: [EMAIL PROTECTED]

   I'm testing a perl script that runs on a Solaris 8 mail server to read
   Unix mailbox files and append the messages to Cyrus mailboxes.  I need
   to do this for 17000 mailboxes, and it's way too slow.  The server is
   pretty much idle.  Neither the perl script nor the imapd process are
   CPU or I/O bound.  When I truss the two processes, both have long
   delays were nothing is happening.

   In the case of the perl script, there is about a tenth of a second
   delay between the time it sends a command to the IMAP server and
   gets a response back:

1.5735 write(6,  1 1 7   a p p e n d   u.., 39)  = 39
1.5738 write(6, \r\n, 2) = 2
1.6709 read(6,  +   g o   a h e a d\r\n, 8192)   = 12

This is the classic Nagle-algorithm problem.  Nagle's algorithm
attempts to coalesce short TCP packets into a single one by delaying
small writes for a short amount of time.  It works well for telnet,
which sends out each keystroke as an individual packet.

If you change your script to write the \r\n at the same time as the
append you'll probably notice drastically better performance.
(Generally, you don't want to do a write unless you're about to read
OR you're writing a large amount of data.)

Larry




Re: LMTPD signaled to death by 11 - neverending story [the end]

2001-10-01 Thread Lawrence Greenfield

   Date:   Mon, 1 Oct 2001 11:00:22 +0200
   From: Szymon Juraszczyk [EMAIL PROTECTED]

 I just changed

   sprintf 
(messageToSend,%s\n%s\n%s\n%s\n%s\n,class,instance,user,mailbox,message);

 to

   sprintf (messageToSend,%s\n%s\n%s\n%s\n,class,instance,user,mailbox);
   cnt = write(sock, messageToSend, strlen(messageToSend));
   cnt += write(sock, message, strlen(message));
   cnt += write(sock, newline, 1);

If you're going to do this style of programming, please use writev().
It's significantly more efficient.  (You might want to look at using
retry_writev(), which is in libcyrus.)

Larry




Re: cyrus imap/SASL + sendmail/SASL (Whatever happened?)

2001-10-01 Thread David W. Jablonski

I apologize for bringing up such an old discussion but whatever became
of this?  I am using 2.0.16 with Sendmail 8.12 and I'm having the same
problem that if cyrus isn't the owner of /etc/sasldb the master process
can't read it.  I have read rights for group mail (which cyrus is a
member of) but when I change rights on sasldb to root.mail with rx-r
rights Cyrus doesn't work.  This did work for 1.6.24 before I upgraded. 
I set the options in Sendmail to ignore Groupreadable so Sendmail
doesn't complain about those rights it's just cyrus.  Thanks for any
info...

On Sat, 2001-03-10 at 13:29, Lawrence Greenfield wrote:
 This is reasonable.  Would people be happier if the master process did a setgid() by 
default?
 
 Thanks,
 Larry
 


 --On Wednesday, January 17, 2001 02:54:00 PM +0100 Robert Böhm 
[EMAIL PROTECTED] wrote:
 
 
 
  Hi there.
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Wednesday, January 17, 2001 5:10 AM
  Subject: Re: Authentication Cyrus/sasl
 
 
  Sendmail and cyrus don't cooperate very well with file access.
 
  I've encountered the following problem in trying to use sendmail w/ SASL
  and cyrus' imap w/ SASL at the same time:
 
  Per default both will want readaccess to the /etc/sasldb.
  Furthermore sendmail usually will not allow this file to be write or
  readable by any other user than the one which it is running as.
 
  This, at first, seems unsolvable, as my sendmail daemon is running as a
  privileged user, as opposed to cyrus imap.
 
  But sendmail is kind enough to offer an option which will allow for the
  /etc/sasldb to be groupreadable.
  So I chmod/own'ed the file to 640/root.cyrus, where the group cyrus is the
  default group for user cyrus, with no other users in it.
 
  I supposed this to work, as
# su cyrus
$ cat /etc/sasldb
  did work, too.. but it did not. Cyrus imap, even though running as cyrus,
  did not have the permission to read the file. chown'ing would have worked
  though, but was not an option as it would not have been accepted by
  sendmails security checks.
 
  Well, I have changed the source code of `master`, and now it works. But I
  don't know whether it will impose any security risks or the general
  operability of cyrus imap.
 
  These are my changes to file /usr/src/cyrus-imapd-2.07/master/master.c :
 
  int become_cyrus(void)
   {
   struct passwd *p;
   static int uid = 0;
  +static int gid = 0;
 
  -if (uid) return setuid(uid);
  +if (uidgid) return (setgid(gid) || setuid(uid)) ;
 
   p = getpwnam(CYRUS_USER);
   if (p == NULL) {
   syslog(LOG_ERR, no entry in /etc/passwd for %s,
   CYRUS_USER); return -1;
   }
   uid = p-pw_uid;
  +gid = p-pw_gid;
  -return setuid(uid);
  +return (setgid(gid) | setuid(uid)) ;
   }
 
  Any comment on whether this course of action is acceptable is welcome.
 
  Thanks, Robert.
 
  ---
  The universe is filled with dark letters even though we can't see them.
  90% of all letters are dark.
 
 
 
 
 
-- 
David W. Jablonski, RHCE, MCSE
Systems Administrator
http://www.weccusa.org
http://www.energyfinancesolutions.com




Re: Cyrus 2.0.16 with RedHat 7.1

2001-10-01 Thread Francesc Guasch

Eric wrote:
 
 Hi,
 
Hi Eric.

 Ok I added the following line in my /etc/pam.d/pop:
 auth  required   pam_warn.so

I've been trying to install cyrus-imapd also. And I've been following
the advices here.

 And here is the log when I tried to connect using pop:
 Sep 28 10:01:22 magenta PAM-warn[2069]: user: (uid=76) - test [remote:
 ?nobody@?nowhere]

I got here also.

 
 So PAM seems to work correctly but why do I still get an Invalid Login??
 What is cyrus doing after a user is authenticated???

I know what to do next: compile cyrus-imap-v1.5.19 with shadow
and pwcheck. But I don't want to. I don't know what it is so hard
to have this up and running.

Please, any hints from someone ?

-- 
 --Frankie



Re: lmtpd locking continued

2001-10-01 Thread Ken Murchison



Nick Ustinov wrote:
 
 Larry,
 
 just did that and it sent 48 out of 721 msgs in mqueue.. And froze here:
 
 Running /var/spool/mqueue/f91HRse04091 (sequence 49 of 721)
  RSET
 250 2.0.0 ok
 [EMAIL PROTECTED]... Using cached ESMTP connection to localhost
 via cyrus...
  MAIL From:[EMAIL PROTECTED] SIZE=538
 250 2.1.0 ok
  RCPT To:sb167407627200884
 250 2.1.5 ok
  DATA
 354 go ahead
  .

Hmm.  This *should* have given you:

554 5.6.0 Message has no header/body separator

 
 strace shows it's read(7,

Could you please check to see which file its trying to read from?  Look
for open() = 7.  If the strace is gone, please trace a new
connection.

Ken
-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



RE: cyrus/pam tutorial?

2001-10-01 Thread Nick Ustinov

Vincent,

I am using cyrus with pam_mysql. Let me know what are the problems you are
facing and I will try to help. In general, you compile pam module, create
entries in /etc/pam.d (files imap and pop) with settings pam modules require
and set in /etc/imapd.conf sasl_pwcheck_method: pam

Sincerely,
Nick

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 21:40
To: [EMAIL PROTECTED]
Subject: cyrus/pam tutorial?


Hello , I am having a hard time getting cyrus to
use pam authentication. It only seems to want to work
with sasl. Any tuttorials or hints?
-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588



Re: lmtpd locking continued

2001-10-01 Thread Lawrence Greenfield

   Date: Mon, 01 Oct 2001 13:47:01 -0400
   From: Ken Murchison [EMAIL PROTECTED]

 MAIL From:[EMAIL PROTECTED] SIZE=538
250 2.1.0 ok
 RCPT To:sb167407627200884
250 2.1.5 ok
 DATA
354 go ahead
 .

   Hmm.  This *should* have given you:

   554 5.6.0 Message has no header/body separator

No, no, Sendmail never shows the body of the message when it sends
it.  (Ok, maybe on really high debug levels, but not normally.)
It sent a message between the DATA and the .


strace shows it's read(7,

   Could you please check to see which file its trying to read from?  Look
   for open() = 7.  If the strace is gone, please trace a new
   connection.

I think this was an strace of Sendmail, not an strace of lmtpd.

I agree a trace of lmtpd and a gdb backtrace of where lmtpd is when
this happens would be more helpful.

Larry




Re: cyrus/pam tutorial?

2001-10-01 Thread Vincent Stoessel

This is great. I have been banging my head against the wall here.
Let me tell you what I want to do and you tell me if it even possible.


1. I moved to cyrus from UW because of the ability to create virtual mailboxes
and sasl has worked fine

2, I also have a mysql database that contains user info and is also used to 
authenticate
users for various parts of the website including my web based imap client.

what I want to do is

1. combine the creation of cyrus mailboxes with record creation in the sql db
2. have cyrus use pam_mysql to look up and authenticate passwords from the sql database


are 1 or 2 possible ?

I have compiled pam_mysql as directed and tested it with pam module for the sudo
and it definetely checks the database when I use it there. The same is not true for 
imap,
no queries are made to the database and nothing seems to work except sasl

I am working on an intel redhat linux 7.1 system.

Thanks in advance.

Nick Ustinov wrote:

 Vincent,
 
 I am using cyrus with pam_mysql. Let me know what are the problems you are
 facing and I will try to help. In general, you compile pam module, create
 entries in /etc/pam.d (files imap and pop) with settings pam modules require
 and set in /etc/imapd.conf sasl_pwcheck_method: pam
 
 Sincerely,
 Nick
 
 -Original Message-
 From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 21:40
 To: [EMAIL PROTECTED]
 Subject: cyrus/pam tutorial?
 
 
 Hello , I am having a hard time getting cyrus to
 use pam authentication. It only seems to want to work
 with sasl. Any tuttorials or hints?
 



-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588




RE: lmtpd locking continued

2001-10-01 Thread Nick Ustinov

Larry, Ken,

I ran strace on lmtpd and noticed that it sticks with connecting to
notify_unix socket. I recompiled it with-notify=no and it seems to work fine
now (and much faster too :)  

Ken, ignore last email with strace, it was all right (my fault)

Nick

-Original Message-
From: Lawrence Greenfield [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 22:37
To: Nick Ustinov; Ken Murchison
Cc: '[EMAIL PROTECTED]'
Subject: Re: lmtpd locking continued


   Date: Mon, 01 Oct 2001 13:47:01 -0400
   From: Ken Murchison [EMAIL PROTECTED]

 MAIL From:[EMAIL PROTECTED] SIZE=538
250 2.1.0 ok
 RCPT To:sb167407627200884
250 2.1.5 ok
 DATA
354 go ahead
 .

   Hmm.  This *should* have given you:

   554 5.6.0 Message has no header/body separator

No, no, Sendmail never shows the body of the message when it sends
it.  (Ok, maybe on really high debug levels, but not normally.)
It sent a message between the DATA and the .


strace shows it's read(7,

   Could you please check to see which file its trying to read from?  Look
   for open() = 7.  If the strace is gone, please trace a new
   connection.

I think this was an strace of Sendmail, not an strace of lmtpd.

I agree a trace of lmtpd and a gdb backtrace of where lmtpd is when
this happens would be more helpful.

Larry



RE: cyrus/pam tutorial?

2001-10-01 Thread Nick Ustinov

Vincent,

I have rh7 and exactly the same situation -- pam_mysql, mysql and web
interface for user creation, which inserts necessary records to mysql tables
upon user creation.

As for pam_mysql -- the tricky part here may be that you have unneeded line
break in end of /etc/pam.d/imap file (I was fighting this for a couple of
days :)

Also, what format do you use in /etc/pam.d/imap ?

I have

auth optional ...(params for pammysql)...
account required ...(same params for pammysql)...

and worked just fine. Did you check /var/log/messages file? also, i'd
recommend #define DEBUG in pam_mysql.c so you can see whats going on.


Nick

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 22:46
To: Nick Ustinov
Cc: [EMAIL PROTECTED]
Subject: Re: cyrus/pam tutorial?


This is great. I have been banging my head against the wall here.
Let me tell you what I want to do and you tell me if it even possible.


1. I moved to cyrus from UW because of the ability to create virtual
mailboxes
and sasl has worked fine

2, I also have a mysql database that contains user info and is also used to
authenticate
users for various parts of the website including my web based imap
client.

what I want to do is

1. combine the creation of cyrus mailboxes with record creation in the sql
db
2. have cyrus use pam_mysql to look up and authenticate passwords from the
sql database


are 1 or 2 possible ?

I have compiled pam_mysql as directed and tested it with pam module for the
sudo
and it definetely checks the database when I use it there. The same is not
true for imap,
no queries are made to the database and nothing seems to work except sasl

I am working on an intel redhat linux 7.1 system.

Thanks in advance.

Nick Ustinov wrote:

 Vincent,
 
 I am using cyrus with pam_mysql. Let me know what are the problems you are
 facing and I will try to help. In general, you compile pam module, create
 entries in /etc/pam.d (files imap and pop) with settings pam modules
require
 and set in /etc/imapd.conf sasl_pwcheck_method: pam
 
 Sincerely,
 Nick
 
 -Original Message-
 From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 21:40
 To: [EMAIL PROTECTED]
 Subject: cyrus/pam tutorial?
 
 
 Hello , I am having a hard time getting cyrus to
 use pam authentication. It only seems to want to work
 with sasl. Any tuttorials or hints?
 



-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588



Re: cyrus/pam tutorial?

2001-10-01 Thread Vincent Stoessel

This what my  /etc/imapd.conf looks like:


configdirectory: /var/imap
partition-default: /var/spool/imap
admins: admin
srvtab: /var/imap/srvtab
allowanonymouslogin: no
sasl_passwd_check: PAM
allowplaintext: yes


Like you , I am using the following params

  auth optional ...(params for pammysql)...
  account required ...(same params for pammysql)...

I am tail -f ing my mysql.log  (mysql is running in logging mode)

and I can see connections that I make from the command line but not
from the imap pam


I have the same config in sudo , sudo makes the connection but not imap.





Nick Ustinov wrote:

 Vincent,
 
 I have rh7 and exactly the same situation -- pam_mysql, mysql and web
 interface for user creation, which inserts necessary records to mysql tables
 upon user creation.
 
 As for pam_mysql -- the tricky part here may be that you have unneeded line
 break in end of /etc/pam.d/imap file (I was fighting this for a couple of
 days :)
 
 Also, what format do you use in /etc/pam.d/imap ?
 
 I have
 
 auth optional ...(params for pammysql)...
 account required ...(same params for pammysql)...
 
 and worked just fine. Did you check /var/log/messages file? also, i'd
 recommend #define DEBUG in pam_mysql.c so you can see whats going on.
 
 
 Nick
 
 -Original Message-
 From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 22:46
 To: Nick Ustinov
 Cc: [EMAIL PROTECTED]
 Subject: Re: cyrus/pam tutorial?
 
 
 This is great. I have been banging my head against the wall here.
 Let me tell you what I want to do and you tell me if it even possible.
 
 
 1. I moved to cyrus from UW because of the ability to create virtual
 mailboxes
 and sasl has worked fine
 
 2, I also have a mysql database that contains user info and is also used to
 authenticate
 users for various parts of the website including my web based imap
 client.
 
 what I want to do is
 
 1. combine the creation of cyrus mailboxes with record creation in the sql
 db
 2. have cyrus use pam_mysql to look up and authenticate passwords from the
 sql database
 
 
 are 1 or 2 possible ?
 
 I have compiled pam_mysql as directed and tested it with pam module for the
 sudo
 and it definetely checks the database when I use it there. The same is not
 true for imap,
 no queries are made to the database and nothing seems to work except sasl
 
 I am working on an intel redhat linux 7.1 system.
 
 Thanks in advance.
 
 Nick Ustinov wrote:
 
 
Vincent,

I am using cyrus with pam_mysql. Let me know what are the problems you are
facing and I will try to help. In general, you compile pam module, create
entries in /etc/pam.d (files imap and pop) with settings pam modules

 require
 
and set in /etc/imapd.conf sasl_pwcheck_method: pam

Sincerely,
Nick

-Original Message-
From: Vincent Stoessel [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 21:40
To: [EMAIL PROTECTED]
Subject: cyrus/pam tutorial?


Hello , I am having a hard time getting cyrus to
use pam authentication. It only seems to want to work
with sasl. Any tuttorials or hints?


 
 
 



-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588




Delivering to an IMAPD on another server.

2001-10-01 Thread Steven J. Sobol


hey folks,

I'm migrating to Exim from Sendmail.

Configuration of Exim for Cyrus seems quite straightforward.

Problem is, my production SMTP server is still running on mail.nstc.com.
I'm training myself on exim, trying to get up to speed, so obviously I am
NOT ready to put exim on the production server. :) So, I need a way to
deliver from dev.nstc.com (my development box) to mail.nstc.com. Is LMTP
the way to go? If so, does 1.6.19 work with LMTP -- I need to be able to
use pwcheck...

TIA - Steve


-- 
JustThe.net LLC - Steve Web Dude Sobol, CTO - [EMAIL PROTECTED] 

Donate a portion of your monthly ISP bill to your favorite charity or
non-profit organization! E-mail me for details. 




Shell.pm

2001-10-01 Thread Anderson

Hi friends,
I am running cyrus-imapd-2.0.16 along with postfix under Red Hat Linux 7.1.
Who can help to decide this problem me ?

# cyradm -u cyrus localhost
Can't locate Cyrus/IMAP/Shell.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.


Anderson Ferreira
Analista de Suporte

APPI Informática LTDA.
Av. Atáufo de Paiva nº 135/1410
Leblon - Rio de janeiro
Tel - 55 21 2529-5600
Fax - 55 21 2511-0785





Re: cyrus/pam tutorial?

2001-10-01 Thread Vincent Stoessel

 Did you enable #define DEBUG in pam_mysql? 


yes, and I am getting degub messages from sudo after i recompiled
pam_mysql but nothing from imap.

The way I am testing this is


 cyradm -u user  localhost


is this a valid way to test pam.d/imap ?





-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588




Re: Websieve for procmail?

2001-10-01 Thread Alain Turbide

Whups.. The correct link:  http://sourceforge.net/projects/websieve

Alain Turbide

 




Re: Migrating from wu-imap to Cyrus

2001-10-01 Thread Jeremy Howard

[EMAIL PROTECTED] wrote:
 Cillian Sharkey writes:
 
 Marko Cuk [EMAIL PROTECTED] wrote:
  I have working cyrus, but I have problems with migration.
 
  If I try to move messages in Netscape client, it moves some folders,
but on
  some folders I get an error, that message contains invalid header...
 
 I got that too when doing a mass-conversion a while back, but my script
simply
 'ignored' troublesome mails and carried on. I never did track down what
header
 Cyrus didn't like as the number of dropped mails was small. I'd recommend
 tracking down which message is causing the problem then look for any
invalid
 headers (or post it here nothing seems amiss).

 Here's an example of a messages that Cyrus rejected when I was
 testing loading Cyrus mailboxes from Unix mailboxes:

 From IMAP4.psuedo.sims Fri Sep 28 10:09:00 2001
 Date: Fri, 28 Sep 2001 10:09:00 -0500 (CDT)
 From: Postmaster
 Subject: Message from mail server
 Content-Length: 94
 Mime-Version: 1.0
 Status: RO
 X-IMAP: 923336730 178

The problem is the 'From' header. I patched imap/message.c so that rather
than saying
  if (*p = ' ') return IMAP_MESSAGE_BADHEADER;
it says
  if (*p  ' ') return IMAP_MESSAGE_BADHEADER;

I haven't seen any bad side-effects from this. I've been running it for over
a month. I made this change because HotMail adds this header, and dragging
messages in Outlook Express from a HotMail account to an IMAP account fails
without the patch.





Re: Slow loading of Cyrus mailboxes

2001-10-01 Thread mills

Larry Greenfield writes:

   Date: Sun, 30 Sep 2001 20:12:01 -0500 (CDT)
   From: [EMAIL PROTECTED]

1.5735 write(6,  1 1 7   a p p e n d   u.., 39)  = 39
1.5738 write(6, \r\n, 2) = 2
1.6709 read(6,  +   g o   a h e a d\r\n, 8192)   = 12

This is the classic Nagle-algorithm problem.  Nagle's algorithm
attempts to coalesce short TCP packets into a single one by delaying
small writes for a short amount of time.  It works well for telnet,
which sends out each keystroke as an individual packet.

If you change your script to write the \r\n at the same time as the
append you'll probably notice drastically better performance.

Thanks for the suggestion.  I found the problem.  I'm using the
Net::IMAP library, from NetxAP-0.02.  It turned out to be a pathological
case.  It was doing every write in two pieces with syswrite(), first
the string, and next the \r\n.  I've modified it to do both of them
together.  This reduced the write/read delays from about 0.11 seconds
down to about 0.02 seconds, a huge improvement.  I'll send patches
to the author once I've got the whole thing working.


-- 
-Gary Mills--Unix Support--U of M Academic Computing and Networking-



Re: Delivering to an IMAPD on another server.

2001-10-01 Thread Amos Gouaux

 On Mon, 1 Oct 2001 17:56:59 -0400 (EDT),
 Steven J Sobol [EMAIL PROTECTED] (sjs) writes:

sjs NOT ready to put exim on the production server. :) So, I need a way to
sjs deliver from dev.nstc.com (my development box) to mail.nstc.com. Is LMTP
sjs the way to go? If so, does 1.6.19 work with LMTP -- I need to be able to

I'm pretty sure it does.  Yeah, was using that before jumping into
2.x not too long ago.  Though, I think I was running 1.6.24, or
maybe even the non released beta 1.6.25.  See if deliver supports
the '-l' option.  If so, it should be able to talk LMTP.

Before going to 2.x, I had an entry like this in inetd.conf:

lmtp  stream  tcp nowait  cyrus   /usr/sbin/tcpd /usr/local/cyrus/bin/deliver -e -l

The tcpd binary is from the tcp_wrappers package.  Then in your
/etc/hosts.allow make sure your lmtp server above can only be
accessed by dev.nstc.com.  Then configure your exim to deliver via
LMTP over a TCP socket.

-- 
Amos