Cyrus IMAP and prtoblens with slow DNS

2011-11-07 Thread Lucas Zinato Carraro
When I have a problem with DNS cyrus imapd becomes extremely slow.
A simple test: telnet imap 143-server.com takes about 15 seconds to
display the banner.

* OK [CAPABILITY IMAP4rev1 ID LITERAL + ENABLE = MUPDATE mupdate: / /
mupdate.com / STARTTLS AUTH = PLAIN SASL-IR] domain.com Cyrus IMAP Murder
v2.4.12 server ready


With DNS working properly the banner is displayed instantly.

Is there any way to disable the  name resolution for cyrus?


Many MTAs have this option to speed up the deliver process.
I dont find any similar option in man imapd.conf

Regards
Zinato

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

cyrus.index file

2011-11-07 Thread Adrian Kovacs
hi

how can I check if a user deleted a mail ?
Is there is history somewhere?
How can I read the cyrus.index file?

We are using cyrus  postfix, and would like to check if a user deleted a
certain mail

thanks

a

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Re: cyrus.index file

2011-11-07 Thread Adam Tauno Williams
Quoting Adrian Kovacs adrian...@gmail.com:
 how can I check if a user deleted a mail ?
 Is there is history somewhere?

If you are using delayed expunge [*HIGHLY* recommended] then this is  
pretty trivial.  Otherwise I think deleted/expunged is just gone.

 How can I read the cyrus.index file?

cyr_dbtool is one option.  Other you can use cvt_cyrusdb to dump a  
database to a text file.

  cvt_cyrusdb  [ -C config-file ] old-file old-format new-file  
new-format

 We are using cyrus  postfix, and would like to check if a user deleted a
 certain mail

You might have something in your log file(s).  But logging an  
individual deletion seems unlikely.


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: cyrus.index file

2011-11-07 Thread Adrian Kovacs
many thanks for the quick answer, I check it

~
a

On Mon, Nov 7, 2011 at 3:30 PM, Adam Tauno Williams
awill...@whitemice.orgwrote:

 Quoting Adrian Kovacs adrian...@gmail.com:
  how can I check if a user deleted a mail ?
  Is there is history somewhere?

 If you are using delayed expunge [*HIGHLY* recommended] then this is
 pretty trivial.  Otherwise I think deleted/expunged is just gone.

  How can I read the cyrus.index file?

 cyr_dbtool is one option.  Other you can use cvt_cyrusdb to dump a
 database to a text file.

  cvt_cyrusdb  [ -C config-file ] old-file old-format new-file
 new-format

  We are using cyrus  postfix, and would like to check if a user deleted a
  certain mail

 You might have something in your log file(s).  But logging an
 individual deletion seems unlikely.

 
 Cyrus Home Page: http://www.cyrusimap.org/
 List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Re: cyrus.index file

2011-11-07 Thread Joseph Brennan

 how can I check if a user deleted a mail ?
 Is there is history somewhere?
 How can I read the cyrus.index file?


If it's not expunged, only marked deleted, give your account lrs on
the mailbox temporarily and open it with a client. I find that a
very usable way to read the cyrus.index :-)

If it's expunged, if you use delayed expunge and it was expunged
within the delay period, unexpunge -l user.xxx will show it.

If neither, you might be able to make a guess based on the known
delivery time (from postfix logs) and timestamps on the message
files on the file system. E.g. postfix says it was delivered at
Nov 1 10:25, and you have in the mailbox message 4566. at 10:10,
no message 4567., and message 4568. at 10:30... conclusion, it
was there and was deleted and expunged.


Joseph Brennan
Columbia University Information Technology



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: cyrus.index file

2011-11-07 Thread Bron Gondwana


On Monday, November 07, 2011 9:30 AM, Adam Tauno Williams 
awill...@whitemice.org wrote:
 Quoting Adrian Kovacs adrian...@gmail.com:
  how can I check if a user deleted a mail ?
  Is there is history somewhere?
 
 If you are using delayed expunge [*HIGHLY* recommended] then this is  
 pretty trivial.  Otherwise I think deleted/expunged is just gone.
 
  How can I read the cyrus.index file?
 
 cyr_dbtool is one option.  Other you can use cvt_cyrusdb to dump a  
 database to a text file.
 
   cvt_cyrusdb  [ -C config-file ] old-file old-format new-file  
 new-format

Neither of them are any use with cyrus.index, which is its own custom format.

The attached bits of perl can read most of the more modern cyrus.index
file formats (I haven't backported to version 6 from 2.2.x).  Some perl
skill required to make it all work though - and you may need to strip
out the dependencies on FastMail specific stuff.

  We are using cyrus  postfix, and would like to check if a user deleted a
  certain mail
 
 You might have something in your log file(s).  But logging an  
 individual deletion seems unlikely.

If you turn on auditlog, you'll get all expunges as individual log items.

Bron.
-- 
  Bron Gondwana
  br...@fastmail.fm



IndexFile.pm
Description: Binary data


index_uids.pl
Description: Binary data

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Re: cyrus.index file

2011-11-07 Thread Wolfgang Breyha
Eric Luyten wrote, on 07.11.2011 17:36:
 and ... busy servers will probably produce huge audit trace files ... Who
 is running production service with auditlog: 1 in their imapd.conf ?

I am. I patched cyrus 2.4 to get similar logs in custom format and use
auditlog since 2.4 for all our 100k users. No problem at all. On the other
hand not knowing which way a mail took until it was deleted by the user is not
an option.

Greetings, Wolfgang
-- 
Wolfgang Breyha wbre...@gmx.net | http://www.blafasel.at/
Vienna University Computer Center | Austria


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


cascading (?) errors

2011-11-07 Thread brian
Cyrus-IMAP 2.2.13-14ubuntu3.1
Postfix 2.5.5-1.1
Spamassassin 3.2.5-4ubuntu0.0.1

I'm not certain this is a Cyrus issue, but Cyrus is the thing that i've 
changed recently.

I've suddenly got a bunch of the following errors in my log:

Nov  7 13:48:56 artemis postfix/pipe[31890]: 5A9A57A0EE6: 
to=admin@REMOVED, relay=procmail, delay=3.2, delays=3/0.01/0
/0.22, dsn=4.3.0, status=deferred (temporary failure. Command output: 
procmail: Error while writing to /var/log/procmai
l.log procmail: [31891] Mon Nov  7 13:48:55 2011 procmail: No match on 
^X-Spam-Flag: YES procmail: Executing /usr/sb
in/cyrdeliver,-a,admin@REMOVED,-m,user.admin@REMOVED procmail: Error 
while writing to /usr/sbin/cyrdeliver procmail:
Assigning LASTFOLDER=/usr/sbin/cyrdeliver -a admin@REMOVED -m 
user.admin@REMOVED  Subject: Re: REMOVED   Folder: **Requeued** 
8802057 )

I searched online and found that the problem was (maybe) a permissions 
issue. Figuring that I'd temporarily resolve it until learning more, I 
tried:

sudo chmod ugo+w /var/log/procmail.log

... and re-started Postfix. Now i'm seeing:

postfix/pipe[32052]: 8A0BF7A0EE9: to=admin@REMOVED, relay=procmail, 
delay=1, delays=0.99/0/0/0, dsn=2.0.0, status=sent (delivered via 
procmail service)
postfix/qmgr[31998]: 8A0BF7A0EE9: removed
cyrus/master[32055]: about to exec /usr/lib/cyrus/bin/lmtpd
cyrus/lmtpunix[32055]: executed
cyrus/lmtpunix[32055]: accepted connection
cyrus/lmtpunix[32055]: lmtp connection preauth'd as postman
cyrus/lmtpunix[32055]: verify_user(REMOVED!user^admin) failed: Mailbox 
does not exist

and:

postfix/pipe[32199]: B05177A1189: to=admin@REMOVED, relay=procmail, 
delay=1.1, delays=1/0/0/0.01, dsn=2.0.0, status=sent (delivered via 
procmail service)
postfix/qmgr[31998]: B05177A1189: removed
cyrus/lmtpunix[32192]: verify_user(REMOVED!user^admin) failed: Mailbox 
does not exist
cyrus/lmtpunix[32202]: accepted connection
cyrus/lmtpunix[32202]: lmtp connection preauth'd as postman
cyrus/lmtpunix[32202]: verify_user(REMOVED!user^admin) failed: Mailbox 
does not exist
postfix/pipe[32190]: 5A9A57A0EE6: to=admin@REMOVED, relay=procmail, 
delay=956, delays=950/0.5/0/5.3, dsn=4.3.0, status=deferred (temporary 
failure)


The msg saying the mailbox doesn't exist is very worrying. As it 
happens, the procmail errors started showing up around the same time I 
created several new mailboxes. (For a different domain--the mailbox 
above has existed for years.) I logged in to cyradmin and listed the 
mailboxes. It seems fine:

user/admin@REMOVED (\HasChildren)
(shows also all the child fiolders)

The one configuration setting that I changed at the time I created these 
new mailboxes was to change unixhierarchysep from no to yes as the 
new accounts have the dot.separated@ format. Could this be why the old 
mailboxes can't be found? Please don't tell me that I can use only one 
or the other format.

Next, i came across the following:

spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): 
Connection refused
spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): 
Connection refused
spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): 
Connection refused
spamc[32164]: connection attempt to spamd aborted after 3 retries


And then, while I was tailing mail.log, it appeared that one of the 
mailbox owners was trying to log in:

cyrus/imaps[32403]: imaps TLS negotiation failed: 
modemcable228.38-48-24.mc.videotron.ca [24.48.38.228]
cyrus/imaps[32403]: Fatal error: tls_start_servertls() failed
cyrus/master[17882]: process 32403 exited, status 75
cyrus/master[17882]: service imaps pid 32403 in BUSY state: terminated 
abnormally
cyrus/master[17882]: process 32406 exited, status 75
artemis cyrus/master[17882]: service imaps pid 32406 in BUSY state: 
terminated abnormally

Yikes! So it seems that I may have several different problems on my 
hands. But does anyone recognise anything here that would cause all or 
any of this to occur suddenly?



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: cascading (?) errors

2011-11-07 Thread Dan White
On 07/11/11 15:57 -0500, brian wrote:
Cyrus-IMAP 2.2.13-14ubuntu3.1
Postfix 2.5.5-1.1
Spamassassin 3.2.5-4ubuntu0.0.1

I'm not certain this is a Cyrus issue, but Cyrus is the thing that i've
changed recently.

I've suddenly got a bunch of the following errors in my log:

Nov  7 13:48:56 artemis postfix/pipe[31890]: 5A9A57A0EE6:
to=admin@REMOVED, relay=procmail, delay=3.2, delays=3/0.01/0
/0.22, dsn=4.3.0, status=deferred (temporary failure. Command output:
procmail: Error while writing to /var/log/procmai
l.log procmail: [31891] Mon Nov  7 13:48:55 2011 procmail: No match on
^X-Spam-Flag: YES procmail: Executing /usr/sb
in/cyrdeliver,-a,admin@REMOVED,-m,user.admin@REMOVED procmail: Error
while writing to /usr/sbin/cyrdeliver procmail:
Assigning LASTFOLDER=/usr/sbin/cyrdeliver -a admin@REMOVED -m
user.admin@REMOVED  Subject: Re: REMOVED   Folder: **Requeued**
8802057 )

I searched online and found that the problem was (maybe) a permissions
issue. Figuring that I'd temporarily resolve it until learning more, I
tried:

sudo chmod ugo+w /var/log/procmail.log

... and re-started Postfix. Now i'm seeing:

postfix/pipe[32052]: 8A0BF7A0EE9: to=admin@REMOVED, relay=procmail,
delay=1, delays=0.99/0/0/0, dsn=2.0.0, status=sent (delivered via
procmail service)
postfix/qmgr[31998]: 8A0BF7A0EE9: removed
cyrus/master[32055]: about to exec /usr/lib/cyrus/bin/lmtpd
cyrus/lmtpunix[32055]: executed
cyrus/lmtpunix[32055]: accepted connection
cyrus/lmtpunix[32055]: lmtp connection preauth'd as postman
cyrus/lmtpunix[32055]: verify_user(REMOVED!user^admin) failed: Mailbox
does not exist

Is 'admin' a cyrus or domain administrator? If so, do you have the same
problem if it is not an administrator?

The domain.name!user^admin should be domain.name!user.admin I believe, so
you appear to have ended up with a top level mailbox named
'user^ad...@domain.name' rather than a user mailbox for
'ad...@domain.name'.

and:

postfix/pipe[32199]: B05177A1189: to=admin@REMOVED, relay=procmail,
delay=1.1, delays=1/0/0/0.01, dsn=2.0.0, status=sent (delivered via
procmail service)
postfix/qmgr[31998]: B05177A1189: removed
cyrus/lmtpunix[32192]: verify_user(REMOVED!user^admin) failed: Mailbox
does not exist
cyrus/lmtpunix[32202]: accepted connection
cyrus/lmtpunix[32202]: lmtp connection preauth'd as postman
cyrus/lmtpunix[32202]: verify_user(REMOVED!user^admin) failed: Mailbox
does not exist
postfix/pipe[32190]: 5A9A57A0EE6: to=admin@REMOVED, relay=procmail,
delay=956, delays=950/0.5/0/5.3, dsn=4.3.0, status=deferred (temporary
failure)


The msg saying the mailbox doesn't exist is very worrying. As it
happens, the procmail errors started showing up around the same time I
created several new mailboxes. (For a different domain--the mailbox
above has existed for years.) I logged in to cyradmin and listed the
mailboxes. It seems fine:

user/admin@REMOVED (\HasChildren)
(shows also all the child fiolders)

The one configuration setting that I changed at the time I created these
new mailboxes was to change unixhierarchysep from no to yes as the
new accounts have the dot.separated@ format. Could this be why the old
mailboxes can't be found? Please don't tell me that I can use only one
or the other format.

It's probably most significant when an admin connects, which is one
reason why it's not a good idea for admins to have their own mailboxes.

There's a warning about this at:

http://www.cyrusimap.org/docs/cyrus-imapd/2.4.12/altnamespace.php

Next, i came across the following:

spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3):
Connection refused
spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3):
Connection refused
spamc[32164]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3):
Connection refused
spamc[32164]: connection attempt to spamd aborted after 3 retries


And then, while I was tailing mail.log, it appeared that one of the
mailbox owners was trying to log in:

cyrus/imaps[32403]: imaps TLS negotiation failed:
modemcable228.38-48-24.mc.videotron.ca [24.48.38.228]
cyrus/imaps[32403]: Fatal error: tls_start_servertls() failed
cyrus/master[17882]: process 32403 exited, status 75
cyrus/master[17882]: service imaps pid 32403 in BUSY state: terminated
abnormally
cyrus/master[17882]: process 32406 exited, status 75
artemis cyrus/master[17882]: service imaps pid 32406 in BUSY state:
terminated abnormally

Yikes! So it seems that I may have several different problems on my
hands. But does anyone recognise anything here that would cause all or
any of this to occur suddenly?

A way to attack this piecemeal wise would be to create an email message and
feed it to cyrdeliver directly, to rule out any problems with procmail.

You can also dump your mailbox list with ctl_mboxlist, to see if you have
any corruption corruption or unexpected output.

-- 
Dan White

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: cascading (?) errors

2011-11-07 Thread brian
On 11-11-07 05:08 PM, Dan White wrote:
 On 07/11/11 15:57 -0500, brian wrote:

 cyrus/lmtpunix[32055]: verify_user(REMOVED!user^admin) failed: Mailbox
 does not exist

 Is 'admin' a cyrus or domain administrator? If so, do you have the same
 problem if it is not an administrator?

This is the admin for a website. Nothing to do with users on the server. 
The problem exists for several mailboxes. These are virtual mailboxes, 
no user accounts on the server itself, btw. Has worked flawlessly for 
several years.

 The domain.name!user^admin should be domain.name!user.admin I believe, so
 you appear to have ended up with a top level mailbox named
 'user^ad...@domain.name' rather than a user mailbox for
 'ad...@domain.name'.

Within cyradm, I use this syntax for creating a mailbox:

cm user@bar.org

To create the new mailboxes (with dots in the name part) I had to turn 
on unixhierarchysep and use this form:

cm user/foo@baz.org


It looks like changing unixhierarchysep to yes is the problem. But, as 
I understand it, it should be possible to have both somen...@test.org 
and some.n...@test.org. I thought that unixhierarchysep simply allows 
one to use the latter format, not force all the addresses to be as such. 
 From the page you linked to (which, btw, I'd read before making the 
imap.conf change):

When the UNIX hierarchy convention is used, the . character MAY be 
used in mailbox names, including user names.

So it wouldn't seem that this change would be breaking things for other 
mailboxes.

... Except it does appear to be. But then I'm in over my head now so 
anything can start looking like a solution right now. Or another 
problem, as the case may be.


 It's probably most significant when an admin connects, which is one
 reason why it's not a good idea for admins to have their own mailboxes.

Yes, that bit me a few years back. But, again, the admin isn't the 
trouble, and other normal names are failing too.


 Yikes! So it seems that I may have several different problems on my
 hands. But does anyone recognise anything here that would cause all or
 any of this to occur suddenly?

 A way to attack this piecemeal wise would be to create an email message and
 feed it to cyrdeliver directly, to rule out any problems with procmail.

 You can also dump your mailbox list with ctl_mboxlist, to see if you have
 any corruption corruption or unexpected output.


Thanks for the tips! I'll man up on those and check it out.

b

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/