Problems with Cyrus IMAP 2.1.13

2003-06-05 Thread Nikola Milutinovic
Hi all.

Just upgraded our production server to 2.1.13. I must confess, yesterday afternoon and 
evening were full of Gremlins (those little creatures that screw up your, otherwise, 
perfect plan for upgrade).

Well, I got the Cyrus UP and RUNNING, but there are some subtle points which fail and 
make me nervous.

POINT 1: admin
-

I have users "cyrus" and "root" listed as admins in the "imapd.conf" file. I can login 
as "root" via "cyradm", no problem (cyradm --auth=cram-md5 --user=root localhost). I 
can create mailboxes "cm user.nikola".

What I cannot do is: 

list mailboxes ("lm" just gives empty line), 
delete a mailbox ("dm user.ene" just gives "deletemailbox: " and the mailbox is still 
there)
list ACL for a mailbox (again, a blank line)
I CAN set ACL for mailbox ("sam user.ene root lrwp" gives "setaclmailbox: root: lrwp:")

What is going on here? I'd expect it to be some general ACL problem, but if someone 
can advise, I'd be grateful.

POINT 2: imapd complains

I am seeing this in "imap.log"

Jun  6 07:54:40 Mercury master[5235]: about to exec 
/usr/opt/Cyrus-IMAP-2.1.13/sbin/imapd
Jun  6 07:54:40 Mercury imaps[5235]: executed
Jun  6 07:54:40 Mercury imapd[5235]: accepted connection
Jun  6 07:54:40 Mercury imapd[5235]: mystore: starting txn 2147483707
Jun  6 07:54:40 Mercury imapd[5235]: mystore: committing txn 2147483707
Jun  6 07:54:40 Mercury imapd[5235]: starttls: TLSv1 with cipher RC4-MD5 (128/128 bits 
new) no authentication
Jun  6 07:54:40 Mercury imapd[5235]: login: Brigitte.ev.co.yu[192.168.61.110] nikola 
plaintext+TLS 
Jun  6 07:54:40 Mercury imapd[5235]: seen_db: user nikola opened 
/var/opt/Cyrus-IMAP-2.1.13/config/user/n/nikola.seen
Jun  6 07:54:40 Mercury imapd[5235]: open: user nikola opened INBOX
Jun  6 07:54:41 Mercury imapd[5235]: Connection reset by peer, closing connection
Jun  6 07:54:41 Mercury imapd[5235]: Could not shut down filedescriptor 0: Socket is 
not connected
Jun  6 07:54:41 Mercury imapd[5235]: Could not shut down filedescriptor 1: Socket is 
not connected
Jun  6 07:54:41 Mercury imapd[5235]: Could not shut down filedescriptor 2: Socket is 
not connected

Jun  6 08:00:52 Mercury master[5337]: about to exec 
/usr/opt/Cyrus-IMAP-2.1.13/sbin/lmtpd
Jun  6 08:00:52 Mercury lmtpunix[5337]: executed
Jun  6 08:00:53 Mercury lmtpd[5337]: accepted connection
Jun  6 08:00:53 Mercury lmtpd[5337]: lmtp connection preauth'd as postman
Jun  6 08:00:53 Mercury lmtpd[5337]: duplicate_check: <[EMAIL PROTECTED]> user.nikola  
0
Jun  6 08:00:53 Mercury lmtpd[5337]: mystore: starting txn 2147483730
Jun  6 08:00:53 Mercury lmtpd[5337]: mystore: committing txn 2147483730
Jun  6 08:00:53 Mercury lmtpd[5337]: duplicate_mark: <[EMAIL PROTECTED]> user.nikola   
   1054879253
Jun  6 08:00:53 Mercury lmtpd[5337]: Could not shut down filedescriptor 0: Socket is 
not connected
Jun  6 08:00:53 Mercury lmtpd[5337]: Could not shut down filedescriptor 1: Socket is 
not connected
Jun  6 08:00:53 Mercury lmtpd[5337]: Could not shut down filedescriptor 2: Socket is 
not connected

POINT 3: (could be gone) IdleD problems.
---

I was seeing complaints from both "imapd" and "lmtpd", that they couldn't connect to 
"idled socket", but those are gone at the moment. The log contained this:

Jun  6 06:57:43 Mercury master[3365]: about to exec 
/usr/opt/Cyrus-IMAP-2.1.13/sbin/imapd
Jun  6 06:57:43 Mercury imap[3365]: executed
Jun  6 06:57:44 Mercury imapd[3365]: accepted connection
Jun  6 06:57:44 Mercury imapd[3365]: login: webmaster.ev.co.yu[192.168.61.105] davor 
plaintext 
Jun  6 06:57:47 Mercury imapd[3676]: error sending to idled: 0
Jun  6 06:57:47 Mercury imapd[3676]: error sending to idled: 1
Jun  6 06:57:48 Mercury imapd[3676]: seen_db: user davor opened 
/var/opt/Cyrus-IMAP-2.1.13/config/user/d/davor.seen
Jun  6 06:57:48 Mercury imapd[3676]: error sending to idled: 0
Jun  6 06:57:48 Mercury imapd[3676]: error sending to idled: 1
Jun  6 06:57:48 Mercury imapd[3676]: Could not shut down filedescriptor 0: Socket is 
not connected
Jun  6 06:57:48 Mercury imapd[3676]: Could not shut down filedescriptor 1: Socket is 
not connected
Jun  6 06:57:48 Mercury imapd[3676]: Could not shut down filedescriptor 2: Socket is 
not connected
Jun  6 06:57:48 Mercury imapd[3676]: accepted connection
Jun  6 06:57:48 Mercury imapd[3676]: login: webmaster.ev.co.yu[192.168.61.105] davor 
plaintext 
Jun  6 06:57:49 Mercury master[2888]: about to exec 
/usr/opt/Cyrus-IMAP-2.1.13/sbin/pop3d
Jun  6 06:57:49 Mercury pop3[2888]: executed
Jun  6 06:57:49 Mercury pop3d[2888]: accepted connection
Jun  6 06:57:49 Mercury pop3d[2888]: login: Celeron2.ev.co.yu[192.168.1.135] draganal 
plaintext 
Jun  6 06:57:54 Mercury imapd[3365]: error sending to idled: 0
Jun  6 06:57:54 Mercury imapd[3365]: error sending to idled: 1
Jun  6 06:57:54 Mercury imapd[3365]: seen_db: user davor opened 
/var/opt/Cyrus-IMAP-2.1.13/config/user/d/davor.seen
Jun  6 

I can't get imtest to work

2003-06-05 Thread Ronald Rough
Help:

I can't run:

imtest -m login -p imap localhost

When I do, I get the following:

Jun  5 20:13:35 roughrider imapd[22485]: could not
getenv(CYRUS_SERVICE); exiting

I was told that I should check the log files
after I start the imap server.

I need to know how to start the imap server.

I need to know what to do to resolve the
CYRUS_SERVICE error.

Any ideas.

Thanks,

Ron



Re: Seperate Cyrus

2003-06-05 Thread Patrick Nelson
On Wed, 2003-06-04 at 12:17, Ken Murchison wrote:
> Patrick Nelson wrote:
> > On Wed, 2003-05-14 at 22:44, Patrick Nelson wrote:
> > 
> >>On Wed, 2003-05-14 at 08:31, Ken Murchison wrote:
> >>
> >>>Christian Schulte wrote:
> >>>
> Patrick Nelson wrote:
> 
> 
> >Wow...  Got my system working great...  RH9 and Cyrus 2.1.13!
> >
> >Was thinking...  Would it be possible to have sendmail on one system and
> >cyrus on another.  This solution is probably simple and/or standard.
> >
> > 
> >
> 
> You can use the cyrusv2.mc mailer to connect to cyrus' lmtp port...
> Have a look at cf/mailer/cyrusv2.mc and change the default 
> /var/imap/socket/lmtp unix socket to some lmtp port on a foreign 
> machine! For this you will have to active lmtp service in cyrus.conf and 
> not just lmtpunix service on the machine cyrus is running on.
> >>>
> >>>
> >>>No!  You shouldn't hack the cyrusv2.mc file itself.  Its setup to be 
> >>>configurable from your sendmail.mc (or whatever you call it).  Please 
> >>>read cf/README in the Sendmail distro.  All you need to do is define 
> >>>CYRUSV2_MAILER_ARGS to be something like `TCP $h lmtp'
> >>
> >>OK so I'm going to try adding:
> >>
> >> define(`CYRUSV2_MAILER_ARGS',`TCP imapsrv lmtp')
> >>
> >>to the sendmail.mc of the mailersrv to move mail to the imapsrv.
> >>
> >>I will test to see if this works tomorrow.
> > 
> > 
> > OK finally got around to it.  It didn't work.  So, does anyone know of a
> > how-to that will show me how to do this?
> 
> 
> Did you build a new sendmail.cf and restart Sendmail?
> 
> If done correctly, this will work.  In addition to writing the cyrusv2 
> mailer
> definition I've also tested it with lmtp over TCP.

Yes rebuilt it and restarted it.  Bunch o' sendmail errors.  So here's
the details:

Cyrus IMAP Server:  redhat9  cyrus-imap.2.1.13 sendmail.8.12.8
--
 Works for local delivery to cyrus

 cyrus-imap.conf has the following services:
 
  lmtp   cmd="lmtpd" listen="lmtp" prefork=0
  lmtpuqnix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
 
 sendmail.mc has the following cyrus entries:

  VERSIONID(`linux setup for RH and Cyrus')dnl
  dnl define(`confTRUSTED_USER', `cyrus')
  define(`confLOCAL_MAILER', `cyrusv2')
  define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o')
  define(`CYRUSV2_MAILER_ARGS',`FILE /var/lib/imap/socket/lmtp')
  MAILER(cyrusv2)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/lib/imap/socket/lmtp
  LOCAL_RULE_0
  Rbb + $+ < @ $=w . >  $#cyrus $: + $1

Incoming Mail Server:  redhat72  sendmail.8.11.6

 works for local delivery of mail

 sendmail.mc has the following cyrus entries:

  VERSIONID(`linux setup for delivery to Cyrus')dnl
  define(`confLOCAL_MAILER', `cyrusv2')
  define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o')
  define(`CYRUSV2_MAILER_ARGS',`TCP  lmtp')
  MAILER(cyrusv2)dnl
  MAILER_DEFINITIONS
  Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
  S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
  A=TCP  lmtp
  LOCAL_RULE_0
  Rbb + $+ < @ $=w . >  $#cyrus $: + $1


lmtp is a service in both systems.  When I went to rebuild the sendmail
on Incoming Mail Server it didn't build because cyrusV2.mc was missing
so I copied it over from Cyrus IMAP Server.  Then it rebuilt without
error.  However, on sendmail restart on the Incoming Mail Server
sendmail barfs and fails to start, the error message is:

Starting sendmail: 554 5.0.0 /etc/sendmail.cf: line 1481: EnvFromL=10:
ruleset changed value (old 171, new 10)
554 5.0.0 /etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value
(old 173, new 20)
554 5.0.0 /etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed
value (old 174, new 30)
554 5.0.0 /etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value
(old 172, new 40)
[FAILED]

And /var/log/maillog shows:

Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old
171, new 10)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173,
new 20)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old
174, new 30)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value (old 172,
new 40)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old
171, new 10)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173,
new 20)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail

Re: Seperate Cyrus

2003-06-05 Thread Christian Schulte
Patrick Nelson wrote:

On Wed, 2003-06-04 at 12:17, Ken Murchison wrote:
 

Patrick Nelson wrote:
   

On Wed, 2003-05-14 at 22:44, Patrick Nelson wrote:

 

On Wed, 2003-05-14 at 08:31, Ken Murchison wrote:

   

Christian Schulte wrote:

 

Patrick Nelson wrote:

   

Wow...  Got my system working great...  RH9 and Cyrus 2.1.13!

Was thinking...  Would it be possible to have sendmail on one system and
cyrus on another.  This solution is probably simple and/or standard.


 

You can use the cyrusv2.mc mailer to connect to cyrus' lmtp port...
Have a look at cf/mailer/cyrusv2.mc and change the default 
/var/imap/socket/lmtp unix socket to some lmtp port on a foreign 
machine! For this you will have to active lmtp service in cyrus.conf and 
not just lmtpunix service on the machine cyrus is running on.
   

No!  You shouldn't hack the cyrusv2.mc file itself.  Its setup to be 
configurable from your sendmail.mc (or whatever you call it).  Please 
read cf/README in the Sendmail distro.  All you need to do is define 
CYRUSV2_MAILER_ARGS to be something like `TCP $h lmtp'
 

OK so I'm going to try adding:

define(`CYRUSV2_MAILER_ARGS',`TCP imapsrv lmtp')

to the sendmail.mc of the mailersrv to move mail to the imapsrv.

I will test to see if this works tomorrow.
   

OK finally got around to it.  It didn't work.  So, does anyone know of a
how-to that will show me how to do this?
 

Did you build a new sendmail.cf and restart Sendmail?

If done correctly, this will work.  In addition to writing the cyrusv2 
mailer
definition I've also tested it with lmtp over TCP.
   

Yes rebuilt it and restarted it.  Bunch o' sendmail errors.  So here's
the details:
Cyrus IMAP Server:  redhat9  cyrus-imap.2.1.13 sendmail.8.12.8
--
Works for local delivery to cyrus
cyrus-imap.conf has the following services:

 lmtp   cmd="lmtpd" listen="lmtp" prefork=0
 lmtpuqnix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
sendmail.mc has the following cyrus entries:

 VERSIONID(`linux setup for RH and Cyrus')dnl
 dnl define(`confTRUSTED_USER', `cyrus')
 define(`confLOCAL_MAILER', `cyrusv2')
 define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o')
 define(`CYRUSV2_MAILER_ARGS',`FILE /var/lib/imap/socket/lmtp')
 MAILER(cyrusv2)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/lib/imap/socket/lmtp
 LOCAL_RULE_0
 Rbb + $+ < @ $=w . > $#cyrus $: + $1
Incoming Mail Server:  redhat72  sendmail.8.11.6

works for local delivery of mail
sendmail.mc has the following cyrus entries:

 VERSIONID(`linux setup for delivery to Cyrus')dnl
 define(`confLOCAL_MAILER', `cyrusv2')
 define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o')
 define(`CYRUSV2_MAILER_ARGS',`TCP  lmtp')
 MAILER(cyrusv2)dnl
 MAILER_DEFINITIONS
 Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
 S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
 A=TCP  lmtp
 LOCAL_RULE_0
 Rbb + $+ < @ $=w . > $#cyrus $: + $1
lmtp is a service in both systems.  When I went to rebuild the sendmail
on Incoming Mail Server it didn't build because cyrusV2.mc was missing
so I copied it over from Cyrus IMAP Server.  Then it rebuilt without
error.  However, on sendmail restart on the Incoming Mail Server
sendmail barfs and fails to start, the error message is:
Starting sendmail: 554 5.0.0 /etc/sendmail.cf: line 1481: EnvFromL=10:
ruleset changed value (old 171, new 10)
554 5.0.0 /etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value
(old 173, new 20)
554 5.0.0 /etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed
value (old 174, new 30)
554 5.0.0 /etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value
(old 172, new 40)
[FAILED]
And /var/log/maillog shows:

Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old
171, new 10)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173,
new 20)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old
174, new 30)
Jun  4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value (old 172,
new 40)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old
171, new 10)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173,
new 20)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old
174, new 30)
Jun  4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root):
/etc/sendmail

ctl_deliver hangs

2003-06-05 Thread Dmitry Sergienko
I use Cyrus 2.1.9. Sometimes ctl_deliver hangs until I restart cyrus.
Looks like it waits for unlocking of deliver.db. That's what ktrace shows:
 54735 ctl_deliver CALL  pread(0x5,0x282b47d4,0x2000,0,0x27e000,0)
 54735 ctl_deliver GIO   fd 5 read 8192 bytes
[skip] 
[EMAIL PROTECTED]>\0user.atbmarket\\^D\0\^Argэ>a+\0\^A<618DCCJLLF3C6H57\
@translit.ru>\0user.servag\0da\^D\0\^A\^Srш>1H\0\^A<6186081.10545702618\
[EMAIL PROTECTED]>\0user.loveme\0J"
 54735 ctl_deliver RET   pread 8192/0x2000
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0
 54735 ctl_deliver CALL  select(0,0,0,0,0xbfbff854)
 54735 ctl_deliver RET   select 0

and select waits until kill of program.

I use db3_nosync as deliver backend.
Version:
Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001)
Can I avoid such hangs?

--
Best wishes,
Dmitry Sergienko


Re: [PATCH] fud.c : timeout in do_proxy_request

2003-06-05 Thread Etienne Goyer
Just to let whoever know that this patch include two syslog() call that
I used to debug.  I forgot to take them out before I made the patch.  
They should be removed.

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



Re: Notification when mailbox is full

2003-06-05 Thread Marc-Christian Petersen
On Wednesday 04 June 2003 20:23, Andreas Freyvogel wrote:

Hi Andreas,

> Is it just me or is anyone else receiving this message many times?
It's also me. 100 times or so yet?!

ciao, Marc

>
> -Andreas
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Bartosz
> Jozwiak
> Sent: Wednesday, June 04, 2003 9:25 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Notification when mailbox is full
>
>
> See attachments files.Save it to
> /usr/cyrus/quota and add quota.pl to your crontab.
>
> in quota.pl replace domain.tld in lines 113 and 132 with something you like
> and also replace domain\.tld in lines 199 and 207 with something you like.
>
>
> Bartosz Jozwiak
> IT Developer



Mailbox namespace + LMTP question

2003-06-05 Thread Lars Peterson
I'm running cyrus-imapd 2.1.13 w/cyrus-sasl 2.1.13 on a RedHat 9.0 system. My
goal is have my mailer hand off a message to deliver with the recepient mailbox
in an e-mail address format: <[EMAIL PROTECTED]>.

I'm not sure if I've violoated the mailbox namespace by trying to use names
containing the "@" character...deliver refuses to deliver any messages to
mailboxes I've created with this character in their name. I get the "Mailbox
does not exist" error message whenever I try.

I am able to deliver messages using deliver when I give it a recepient without
the "@" character.

If the "@" character violates the mailbox namespace, then why does cyradm let me
create mailboxes that contain it? Reconstruct, ctl_mbxolist, and the other
utilites / commands seem to be okay with it as well.

useful lines in /etc/imapd.conf are:
hashimapspool: true
unixhierarchysep: yes

Thanks in advance for any light you can shed on this matter.

Regards,

Lars Peterson
[EMAIL PROTECTED]




Re: Weird pop3d hang problem (fd blocked?!)

2003-06-05 Thread Stewart
Thanks for your reply Patrick (all 8 of them :) but i was hoping 
there'd be a fix that didn't involve compiling.. this is a production 
server installed from a debian pkg so compilation isn't really an 
option at this stage..

cheers,

..S.

On Thursday, June 5, 2003, at 02:43  AM, Patrick Welche wrote:

On Wed, Jun 04, 2003 at 04:41:59PM +1000, Stewart wrote:
On Saturday, May 31, 2003, at 01:33  AM, Ken Murchison wrote:



foobar wrote:
No, I didn't check if I was out of entropy (random).
This is most likely your problem, since the pop3d banner includes a
random challenge for APOP.
that sounds very much like what has started happening to me this
afternoon. i'm sorry i don't know how to reset my entropy :-) can
someone post the fix? (cyrus 2.1 debian ppc)
cf. the configure option:
  --with-devrandom=PATH   set the path to /dev/random /dev/random
so you could

  --with-devrandom=/dev/urandom

as it just gives out pseudo-random numbers once the entropy runs out 
rather
than block.

Cheers,

Patrick




RE: Notification when mailbox is full

2003-06-05 Thread Andrew Morgan

Looks like all the messages sent to the list are being bounced back to it.
The offending list member is [EMAIL PROTECTED], so maybe
someone could remove that person from the list?

Andy

On Wed, 4 Jun 2003, Andreas Freyvogel wrote:

> Is it just me or is anyone else receiving this message many times?
>
> -Andreas
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Bartosz
> Jozwiak
> Sent: Wednesday, June 04, 2003 9:25 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Notification when mailbox is full
>
>
> See attachments files.Save it to
> /usr/cyrus/quota and add quota.pl to your crontab.
>
> in quota.pl replace domain.tld in lines 113 and 132 with something you like
> and also replace domain\.tld in lines 199 and 207 with something you like.
>
>
> Bartosz Jozwiak
> IT Developer
>



AW: Notification when mailbox is full

2003-06-05 Thread Achim Altmann
hello,

many thank's about this perl_scripts

See attachments files.Save it to 
/usr/cyrus/quota and add quota.pl to your crontab.

This script is exactly what i search.
The script work very fine.
Thank's a lot

Best wishes

Achim


[PATCH] fud.c : timeout in do_proxy_request

2003-06-05 Thread Etienne Goyer
Hi,

The fud daemon can proxy request for mailbox that are remote (ie
Murder).  In 2.1.13, the fud daemon will just sit there if the remote
fud is not responding.  It is strange because the recvfrom() is
alarm()'ed; however, the SIGALRM handler do nothing else than clear the
signal.

I am only a beginner Unix/network C programmer so this patch may not be
the correct way to do it or have implication I cannot foresee.  However,
it should demonstrate a way to fix the problem discussed.  Basically, I
got rid of the dead alarm() code and use select() to timeout read from
the remote fud daemon.

Your comment are very welcome.

Regards,

-- 
Etienne GoyerLinux Québec Technologies Inc.
http://www.LinuxQuebec.com   [EMAIL PROTECTED]
--- fud.c.orig  Wed Jun  4 14:19:43 2003
+++ fud.c   Wed Jun  4 15:28:54 2003
@@ -53,6 +53,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +63,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "assert.h"
 #include "mboxlist.h"
@@ -196,12 +198,6 @@
 shut_down(r);
 }
 
-static void cyrus_timeout(int signo)
-{
-  signo = 0;
-  return;
-}
-
 /* Send a proxy request to the backend, send their reply to sfrom */
 int do_proxy_request(const char *who, const char *name,
 const char *backend_host,
@@ -210,8 +206,10 @@
 char tmpbuf[1024];
 int x, rc;
 int csoc = -1;
+fd_set ssock;
 struct sockaddr_in cin, cout;
 struct hostent *hp;
+struct timeval tv;
 static int backend_port = 0; /* fud port in NETWORK BYTE ORDER */
 
 /* Open a UDP socket to the Cyrus mail server */
@@ -240,14 +238,24 @@
 /* Send the query and wait for a reply */
 sendto (csoc, tmpbuf, strlen (tmpbuf), 0, (struct sockaddr *) &cin, x);
 memset (tmpbuf, '\0', strlen (tmpbuf));
-signal (SIGALRM, cyrus_timeout);
 rc = 0;
-alarm (1);
-rc = recvfrom (csoc, tmpbuf, sizeof(tmpbuf), 0,
-  (struct sockaddr *) &cout, &x);
-alarm (0);
-if (rc < 1) {
-   rc = IMAP_SERVER_UNAVAILABLE;
+FD_ZERO(&ssock);
+FD_SET(csoc, &ssock);
+tv.tv_sec = 5;
+tv.tv_usec = 0;
+rc = select(csoc + 1, &ssock, NULL, NULL, &tv);
+if (rc > 0) {
+syslog(LOG_ERR, "Reading sock");
+   rc = recvfrom (csoc, tmpbuf, sizeof(tmpbuf), 0,
+  (struct sockaddr *) &cout, &x);
+if (rc < 1) {
+   rc = IMAP_SERVER_UNAVAILABLE;
+send_reply(sfrom, REQ_UNK, who, name, 0, 0, 0);
+goto done;
+}
+} else {
+   syslog(LOG_ERR, "FUD timeout");
+rc = IMAP_SERVER_UNAVAILABLE;
send_reply(sfrom, REQ_UNK, who, name, 0, 0, 0);
goto done;
 }


Re: fetchmail and cyrus lmtp

2003-06-05 Thread Belgabor
Etienne Goyer wrote:

On Wed, Jun 04, 2003 at 04:07:34AM +0200, [EMAIL PROTECTED] wrote:
 

I'm running lmtpd via TCP since I never got it to work with sockets.
Probably just 'smtphost ""' should be enogh to make it work.
   

I vaguely remember the post you made recently concerning this problem
(lmtpd does not work with socket).  I just had a flash concerning this.
If you are running RedHat with Postfix, you must know that Postfix is
being runned chroot'ed.  So you will need to create the socket somewhere
in Postfix's root, say /var/spool/postfix/etc/lmtpd, and refer to it as
/etc/lmtpd in Postfix config.  

Anyway, just a thought. 

 

That might be the reason why it didn't work =) Anyways for my my current 
need i bypass postfix completely using spamassassin via the mda option 
of fetchmail. As it currently runs perfectly with TCP I stick to the old 
'never change a running system' policy.

Cheers
Tobias


Re: Seperate Cyrus

2003-06-05 Thread Ken Murchison


Patrick Nelson wrote:
On Wed, 2003-05-14 at 22:44, Patrick Nelson wrote:

On Wed, 2003-05-14 at 08:31, Ken Murchison wrote:

Christian Schulte wrote:

Patrick Nelson wrote:


Wow...  Got my system working great...  RH9 and Cyrus 2.1.13!

Was thinking...  Would it be possible to have sendmail on one system and
cyrus on another.  This solution is probably simple and/or standard.


You can use the cyrusv2.mc mailer to connect to cyrus' lmtp port...
Have a look at cf/mailer/cyrusv2.mc and change the default 
/var/imap/socket/lmtp unix socket to some lmtp port on a foreign 
machine! For this you will have to active lmtp service in cyrus.conf and 
not just lmtpunix service on the machine cyrus is running on.


No!  You shouldn't hack the cyrusv2.mc file itself.  Its setup to be 
configurable from your sendmail.mc (or whatever you call it).  Please 
read cf/README in the Sendmail distro.  All you need to do is define 
CYRUSV2_MAILER_ARGS to be something like `TCP $h lmtp'
OK so I'm going to try adding:

define(`CYRUSV2_MAILER_ARGS',`TCP imapsrv lmtp')

to the sendmail.mc of the mailersrv to move mail to the imapsrv.

I will test to see if this works tomorrow.


OK finally got around to it.  It didn't work.  So, does anyone know of a
how-to that will show me how to do this?


Did you build a new sendmail.cf and restart Sendmail?

If done correctly, this will work.  In addition to writing the cyrusv2 
mailer
definition I've also tested it with lmtp over TCP.

--
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: saslauthd conf file

2003-06-05 Thread Igor Brezac

On Wed, 4 Jun 2003, tsg wrote:

> 4 Июнь 2003 07:51, Вы написали:
> > > Hi
> > > I installed cyrus-sasl v2.1.13 from sources for a new mail server.
> > > I was surprised, that saslauthd daemon tries to found its conf file
> > > (saslauthd.conf) in /usr/etc directory, but not in /etc.
> > > During compillation I put following parameters: --prefix=/usr
> > > --sysconfdir=/etc.
> > >

I cannot reproduce this problem.

Try to rebuild:
make distclean; ./configure --prefix=/usr --sysconfdir=/etc; make

verify the location of saslauthd.conf in saslauthd/Makefile before make,
edit Makefile if neccessary.

> > > Previous versions, including 2.1.12 works fine for me.
> > >
> > > Jun  3 18:44:45 test saslauthd[20660]: do_auth : auth failure:
> > > [user=administrator] [service=imap] [realm=] [mech=ldap]
> > > Jun  3 18:45:03 test saslauthd[20661]: Could not open saslauthd config
> > > file: /usr/etc/saslauthd.conf (No suchfile or directory)
> >
> > Are you really using SASL Authentication Daemon? The config file is really
> > needed only if you're authenticating against LDAP, in all other cases it
> > can be empty.
> >
> > Nix.
> Hi.
> Yes, you are right. I use it to authenticate users from SMTP & POP3/IMAP
> servers against LDAP. And before v2.1.13 everything was perfect. I did link
> from /etc/saslauthd.conf to /usr/etc/saslauthd.conf, but it's a bad solution.
> SASL library should work for me as it use to.
> Sergios
>
>
>

-- 
Igor



Re: Seperate Cyrus

2003-06-05 Thread Patrick Nelson
On Wed, 2003-05-14 at 22:44, Patrick Nelson wrote:
> On Wed, 2003-05-14 at 08:31, Ken Murchison wrote:
> > Christian Schulte wrote:
> > > Patrick Nelson wrote:
> > > 
> > >> Wow...  Got my system working great...  RH9 and Cyrus 2.1.13!
> > >>
> > >> Was thinking...  Would it be possible to have sendmail on one system and
> > >> cyrus on another.  This solution is probably simple and/or standard.
> > >>
> > >>  
> > >>
> > > You can use the cyrusv2.mc mailer to connect to cyrus' lmtp port...
> > > Have a look at cf/mailer/cyrusv2.mc and change the default 
> > > /var/imap/socket/lmtp unix socket to some lmtp port on a foreign 
> > > machine! For this you will have to active lmtp service in cyrus.conf and 
> > > not just lmtpunix service on the machine cyrus is running on.
> > 
> > 
> > No!  You shouldn't hack the cyrusv2.mc file itself.  Its setup to be 
> > configurable from your sendmail.mc (or whatever you call it).  Please 
> > read cf/README in the Sendmail distro.  All you need to do is define 
> > CYRUSV2_MAILER_ARGS to be something like `TCP $h lmtp'
> 
> OK so I'm going to try adding:
> 
>  define(`CYRUSV2_MAILER_ARGS',`TCP imapsrv lmtp')
> 
> to the sendmail.mc of the mailersrv to move mail to the imapsrv.
> 
> I will test to see if this works tomorrow.

OK finally got around to it.  It didn't work.  So, does anyone know of a
how-to that will show me how to do this?
 



Re: how to convert db4 mailboxes.db to db3 ?

2003-06-05 Thread Christian Schulte
sandra wrote:

Patrick,

  I have tried to do the conversion from db4 to skiplist for the
cyrus-imap
compiled with db4, but, there is a error message:
# ./cvt_cyrusdb mailboxes.db db4 mailboxes.skiplist skilist
fatal error: unknown old backend
Why doesnt it recognize db4? I have to compile with some other parameter,
like
--with-mboxlist-db=db4 ?
Thanks

Sandra
 

I think you will need two versions of cvt_cyrusdb! One linked with db4 
to do the conversion from db4 to skiplist and another binary linked 
against db3 with which to convert from skiplist back to berkeley.

--Christian



Re: how to convert db4 mailboxes.db to db3 ?

2003-06-05 Thread Patrick Morris
Even if it's db4, you need to pass "db3" as the database type parameter:

# ./cvt_cyrusdb mailboxes.db db3 mailboxes.skiplist skiplist



sandra wrote:

Patrick,

  I have tried to do the conversion from db4 to skiplist for the
cyrus-imap
compiled with db4, but, there is a error message:
# ./cvt_cyrusdb mailboxes.db db4 mailboxes.skiplist skilist
fatal error: unknown old backend
Why doesnt it recognize db4? I have to compile with some other parameter,
like
--with-mboxlist-db=db4 ?
Thanks

Sandra



Patrick Morris wrote:

 

I'd assume this is because you're moving from a system that uses db4 to
one using db3.  If that's the case, the easiest thing to do is to
convert them on the first system to a format both recognize (such as
skiplist).  Then, convert the skiplist version back to db3 on the other
system.
sandra wrote:

   

I want to know how I can convert the files .db cyrus uses to db3!

Thanks a lot.

SAndra



 

 





Re: Cyrus 2.1.13 and single store?

2003-06-05 Thread Ted Cabeen
Bernd Nies <[EMAIL PROTECTED]> writes:

> Simon Matter wrote:
>> Bernd Nies schrieb:
>>
Looks like this has changed with postfix 2.x. According to the file
.../README_FILES/LMTP_README, you can do something like

mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
local_destination_recipient_limit = 300

and it should work. Can anybody confirm this?
>>>
>>>I tried it but it did not work. I guess this option does only work with
>>>local_transport, which does not expand aliases:
>> Are you really using postfix version 2? According to the README, v1
>> was
>> different.
>
> Yes, its Postfix 2.0.7 and I set
>
>mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
>default_destination_recipient_limit = 300
>
> And it did not work. According to the guys from the postfix mailing
> list single message store works only when I bypass the local delivery
> agent and deliver directly to LMTP. But then also the aliases and
> .forward are ignored and aliases have to be moved to virtual aliases,
> where piping to commands is not supported.

You can get around this by using the transport table.  Setup a domain
like special.adnovum.ch and use the transport table to specify that
the local transport should be used for that domain.  You can then
alias the addresses that need program deliveries to addresses
@special.adnovum.ch and they'll use the entries in your aliases file,
including the program deliveries.

-- 
Ted Cabeen   http://www.pobox.com/~secabeen[EMAIL PROTECTED] 
Check Website or Keyserver for PGP/GPG Key BA0349D2 [EMAIL PROTECTED]
"I have taken all knowledge to be my province." -F. Bacon  [EMAIL PROTECTED]
"Human kind cannot bear very much reality."-T.S.Eliot[EMAIL PROTECTED]


RE: Notification when mailbox is full

2003-06-05 Thread Andreas Freyvogel
Is it just me or is anyone else receiving this message many times?

-Andreas

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bartosz
Jozwiak
Sent: Wednesday, June 04, 2003 9:25 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Notification when mailbox is full


See attachments files.Save it to 
/usr/cyrus/quota and add quota.pl to your crontab.

in quota.pl replace domain.tld in lines 113 and 132 with something you like
and also replace domain\.tld in lines 199 and 207 with something you like.


Bartosz Jozwiak
IT Developer


Re: how to convert db4 mailboxes.db to db3 ?

2003-06-05 Thread sandra
Patrick,


   I have tried to do the conversion from db4 to skiplist for the
cyrus-imap
compiled with db4, but, there is a error message:


# ./cvt_cyrusdb mailboxes.db db4 mailboxes.skiplist skilist
fatal error: unknown old backend
Why doesnt it recognize db4? I have to compile with some other parameter,
like
--with-mboxlist-db=db4 ?

Thanks

Sandra




Patrick Morris wrote:

> I'd assume this is because you're moving from a system that uses db4 to
> one using db3.  If that's the case, the easiest thing to do is to
> convert them on the first system to a format both recognize (such as
> skiplist).  Then, convert the skiplist version back to db3 on the other
> system.
>
> sandra wrote:
>
> >I want to know how I can convert the files .db cyrus uses to db3!
> >
> >Thanks a lot.
> >
> >SAndra
> >
> >
> >
> >



Re: Cyrus 2.1.13 and single store?

2003-06-05 Thread Ted Cabeen
Simon Matter <[EMAIL PROTECTED]> writes:

> Ted Cabeen schrieb:
>> 
>> Bernd Nies <[EMAIL PROTECTED]> writes:
>> 
>> > Ken Murchison wrote:
>> >> I'd have to see the LMTP conversation between Postfix and Cyrus, but
>> >> my guess would be that Postfix isn't sending the message to all of
>> >> the recipients in one connection to Cyrus (with multiple RCPT TO).
>> >> If Cyrus gets thems in separate connections, then it has no way of
>> >> doing the links.
>> >
>> > Unfortunately I can't sniff on a Unix socket or at least don't know
>> > how to do it with snoop or ethereal. All I can give you is the Postfix
>> > configuration:
>> >
>> > mailbox_transport = lmtp:unix:/var/cyrus/socket/lmtp
>> 
>> This is it.  The postfix local transport always breaks up multiple
>
> Looks like this has changed with postfix 2.x. According to the file
> .../README_FILES/LMTP_README, you can do something like
>
> mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
> local_destination_recipient_limit = 300
>
> and it should work. Can anybody confirm this?

I don't think that will work.  See the note in that file just a few
lines down:

Not all local delivery agent transports can support a recipient
limit greater than 1.  Be sure to check the man page of the
specific transport before attempting this with anything but the
Postfix LMTP client.

Also, recent comments on the postfix list imply that even if local
supports multiple recipients, you'll see a significant performance hit
over using the lmtp transport directly.

-- 
Ted Cabeen
Systems/Network Administrator
Impulse Internet Services


Re: Weird pop3d hang problem (fd blocked?!)

2003-06-05 Thread Patrick Welche
On Wed, Jun 04, 2003 at 04:41:59PM +1000, Stewart wrote:
> 
> On Saturday, May 31, 2003, at 01:33  AM, Ken Murchison wrote:
> 
> >
> >
> >foobar wrote:
> >>
> >>No, I didn't check if I was out of entropy (random).
> >
> >This is most likely your problem, since the pop3d banner includes a 
> >random challenge for APOP.
> 
> that sounds very much like what has started happening to me this 
> afternoon. i'm sorry i don't know how to reset my entropy :-) can 
> someone post the fix? (cyrus 2.1 debian ppc)

cf. the configure option:
  --with-devrandom=PATH   set the path to /dev/random /dev/random

so you could

  --with-devrandom=/dev/urandom  

as it just gives out pseudo-random numbers once the entropy runs out rather
than block.

Cheers,

Patrick


Notification when mailbox is full

2003-06-05 Thread Bartosz Jozwiak
See attachments files.Save it to 
/usr/cyrus/quota and add quota.pl to your crontab.

in quota.pl replace domain.tld in lines 113 and 132 with something you like
and also replace domain\.tld in lines 199 and 207 with something you like.


Bartosz Jozwiak
IT Developer

mailfull.message
Description: Binary data


mailwarn.message
Description: Binary data


quota.pl
Description: Binary data


Re: notify with sieve ?

2003-06-05 Thread Bartosz Jozwiak
Hello,

I have a script in perl.
It check quota of every e-mail box and send e-mails to notify users.
If you want it let me know.

BARTEK


- Original Message - 
From: "Achim Altmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 03, 2003 3:35 PM
Subject: notify with sieve ?


>
> Hello,
> i would like generate a script was inform any users if there mailboxes
over
> quota.
>
> Could i use the notifyd?
> could i use a sieve script in the user-sieve-home?
>
> Please could any say how to have i program this script?
> The sieve and notify-doku isn\'t enough and say nothing about how can i
check
> user-quotas with sieve scripts?
>
> Thank\'s a lot for any help
>
> Best reagards
>
> Achim
>
>



Re: good database type choices

2003-06-05 Thread Ken Murchison


Patrick Welche wrote:
On Tue, Jun 03, 2003 at 02:16:14PM -0600, Carl P. Corliss wrote:

So I think I figured out the problem. 

What was happening was that db4 was having issues (don't know what in 
particular) but it was causing lmtp to hang because lmtp was waiting for the 
duplicate delivery check to complete and it never did because of whatever 
issues db4 was having. So I switched the db type for deliver.db to skiplist 
and now all seems to be working well...


  Default  Recommended?
  --with-duplicate-db=DB  db3_nosync   skiplist
  --with-mboxlist-db=DB   db3  skiplist
  --with-seen-db=DB   flat skiplist 
  --with-subs-db=DB   flat
  --with-tls-db=DBdb3_nosync

Going through past emails, it seems now that skiplist is recommended
essentially for everything. Is that plausible? Comments?


No, skiplist isn't recommended for everything.  Rob posted a message 
multiple times with the current recommendations (which are the defaults 
in 2.2), and the reasons why.

In a nutshell:

  Recommended
  --with-duplicate-db=DB  db3_nosync
  --with-mboxlist-db=DB   skiplist
  --with-seen-db=DB   skiplist
  --with-subs-db=DB   flat
  --with-tls-db=DBdb3_nosync
The simple reason for this setup is that skiplist performs very well for 
when enumerating a database and BDB works very well for random access.

--
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