Re: squatter stops when it encounters a locked mailbox?

2011-07-01 Thread Michael D. Sofka
Clement Hermann (nodens) wrote:
> Le 21/06/2011 18:28, Michael D. Sofka a écrit :
>> I run squatter in a perl program that forks three parallel squatter
>> processes on individual user's mailboxes. If a mailbox is locked the
>> particular squatter processing the mailbox quits, but the main program
>> continues to fork new processes for the remaining mailboxes. The program
>> checkpoints each user, shuts down at 6 A.M., and continues where it left
>> off the following day.
> Looks nice.
> 
> Maybe you could share this script ? I could use a squatter with some 
> parallelization and a way to stop it when the load is starting to grow 
> (like in the morning). I guess it could be modified to use other 
> parameters to know when to stop : number of logged-in users or imap/pop 
> processes, system load...
> 
> Cheers,
> 


I'm looking over the paperwork needed to share the program (welcome to
21st Century academia). If I get approval, I'll consider adding other
termination/pause options. Our 24 hour load-cycle is fairly predicable.
But I can see how logged-in users, and load average would be useful.

Mike
-- 
Michael D. Sofka   sof...@rpi.edu
C&MT Sr. Systems Programmer,   Email, HPC, TeX, Epistemology
Rensselaer Polytechnic Institute, Troy, NY.  http://www.rpi.edu/~sofkam/

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


Re: cyradm login loops

2011-07-01 Thread Robert Spellman

It appears that the front end does know that it has the mailbox:

[cyrus@postoffice09 ~]$ cyr_dbtool `pwd`/mailboxes.db skiplist show 
user.frodo
user.frodo1 postoffice09.bates.edu!default frodolrswipkxtecda 



The backend knows nothing about the user frodo:

[cyrus@mailstore07 ~]$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist 
show user.frodo

[cyrus@mailstore07 ~]$


Murder does know:

[cyrus@murder ~]$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist show 
user.frodo
user.frodo1 postoffice09.bates.edu!default frodolrswipkxtecda 



Deleting the mailbox using cyr_dbtool works, which does resolve the problem.

Rob

On 7/1/11 9:49 AM, Dan White wrote:


Could it be due to a referral loop, where the frontend believes the 
mailbox

exists on the backend, but the backend doesn't know about it?

What does the mailbox look like in the output of cyr_dbtool on the 
frontend

and the backend?, and does it 'fix' the problem if you delete it manually
on the frontend with cyr_dbtool?

Here's a usage example:

cyrus@mail:/var/spool/imap$ file /var/lib/imap/mailboxes.db 
/var/lib/imap/mailboxes.db: Cyrus skiplist DB


cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db 
skiplist show user.test1234
user.test1234   (uniqueid 6ebe0fe04dad935f) 0 default test1234 
lrswipkxtecda   user.test1234.trash (uniqueid 638c3a464dad9368) 0 
default test1234 lrswipkxtecda
cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db 
skiplist get 'user.test1234.trash'
(uniqueid 638c3a464dad9368) 0 default test1234  lrswipkxtecda   
cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db 
skiplist delete 'user.test1234.trash'
cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db 
skiplist get 'user.test1234.trash'


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

Re: cyradm login loops

2011-07-01 Thread Dan White
On 01/07/11 09:10 -0400, Robert Spellman wrote:
>We have recently upgraded to cyrus 2.4.6.  Our environment includes a 
>server running as a murder server, four back end mailstores, and two 
>front end servers.  If we mistakenly create a user mailbox on one of 
>the front end servers using cyradm, and then try to manage it (dm, 
>sam, info, lm), cpu load on the front end server increases until the 
>box is unusable.  Syslogs show the user cyrus (our admin user) 
>logging in over and over, each time creating a new proxyd process, 
>which explains the high cpu load.
>
>Managing mailboxes on the back end servers from the front end servers 
>works fine.
>
>Here's my imapd.conf for one of my front end servers:
>
>>configdirectory: /var/lib/imap
>>partition-default: /home/imap
>>defaultpartition: default
>>sievedir: /var/lib/imap/sieve
>>admins: cyrus backend
>>sasl_pwcheck_method: saslauthd
>>sasl_mech_list: PLAIN GSSAPI
>>
>>altnamespace: true
>>hashimapspool: true
>>allowallsubscribe: true
>>allowusermoves: true
>>autocreateinboxfolders: Trash|Sent|Junk
>>autosubscribeinboxfolders: Trash|Sent|Junk
>>autosubscribesharedfolders: shared.announce
>>lmtp_downcase_rcpt: true
>>
>>tls_cert_file: /etc/pki/tls/certs/mail.bates.edu-cert.pem
>>tls_key_file: /etc/pki/tls/certs/mail.bates.edu-key.pem
>>tls_ca_file: /etc/pki/tls/certs/bates.edu-cert.pem
>>
>>proxy_authname: backend
>>proxyservers: backend
>>
>>mupdate_server: murder.bates.edu
>>mupdate_username: backend

Could it be due to a referral loop, where the frontend believes the mailbox
exists on the backend, but the backend doesn't know about it?

What does the mailbox look like in the output of cyr_dbtool on the frontend
and the backend?, and does it 'fix' the problem if you delete it manually
on the frontend with cyr_dbtool?

Here's a usage example:

cyrus@mail:/var/spool/imap$ file /var/lib/imap/mailboxes.db 
/var/lib/imap/mailboxes.db: Cyrus skiplist DB

cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist show 
user.test1234
user.test1234   (uniqueid 6ebe0fe04dad935f) 0 default test1234 lrswipkxtecda   
user.test1234.trash (uniqueid 638c3a464dad9368) 0 default test1234 
lrswipkxtecda   

cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist get 
'user.test1234.trash'
(uniqueid 638c3a464dad9368) 0 default test1234  lrswipkxtecda   
cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist 
delete 'user.test1234.trash'
cyrus@mail:/var/spool/imap$ cyr_dbtool /var/lib/imap/mailboxes.db skiplist get 
'user.test1234.trash'

-- 
Dan White

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


Re: resetting imap password

2011-07-01 Thread Dan White
On 01/07/11 10:50 +0800, JonL wrote:
>Does anyone know how to reset the imap server password?

We'll need to know what your SASL configuration is (grep sasl
/etc/imapd.conf)?

If you've configured sasl_pwcheck_method: saslauthd, we'll need to know
what command line parameters you're passing to it and, if it exists, your
/etc/saslauthd.conf configuration.


-- 
Dan White

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


cyradm login loops

2011-07-01 Thread Robert Spellman
We have recently upgraded to cyrus 2.4.6.  Our environment includes a 
server running as a murder server, four back end mailstores, and two 
front end servers.  If we mistakenly create a user mailbox on one of the 
front end servers using cyradm, and then try to manage it (dm, sam, 
info, lm), cpu load on the front end server increases until the box is 
unusable.  Syslogs show the user cyrus (our admin user) logging in over 
and over, each time creating a new proxyd process, which explains the 
high cpu load.


Managing mailboxes on the back end servers from the front end servers 
works fine.


Here's my imapd.conf for one of my front end servers:


configdirectory: /var/lib/imap
partition-default: /home/imap
defaultpartition: default
sievedir: /var/lib/imap/sieve
admins: cyrus backend
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN GSSAPI

altnamespace: true
hashimapspool: true
allowallsubscribe: true
allowusermoves: true
autocreateinboxfolders: Trash|Sent|Junk
autosubscribeinboxfolders: Trash|Sent|Junk
autosubscribesharedfolders: shared.announce
lmtp_downcase_rcpt: true

tls_cert_file: /etc/pki/tls/certs/mail.bates.edu-cert.pem
tls_key_file: /etc/pki/tls/certs/mail.bates.edu-key.pem
tls_ca_file: /etc/pki/tls/certs/bates.edu-cert.pem

proxy_authname: backend
proxyservers: backend

mupdate_server: murder.bates.edu
mupdate_username: backend


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

Re: Solved: Re: cannot retrieve mail in desktop client

2011-07-01 Thread Adam Tauno Williams
On Fri, 2011-07-01 at 12:56 +0800, JonL wrote:
> Finally,  I have it fixed!!
> What I had to do to resolve this problem was:
> 1) make sure mail was in the postfix group
> 2) I added "1" to
> lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1

FYI, it is also possible to have LMTP listen on a TCP/IP and use that
for Postfix-->Cyrus delivery.  This allows you to have SMTP (Postfix)
and IMAP (Cyrus) on separate hosts/instances.

> Couple of question however,
> a) since this is a SLES 10 SP1 server and I plan to move to SP4 soon, is 
> there a rpm for the cyrus-imapd 2.4.9? and to upgrade it manually, if there 
> is no cyrus-imapd rpm, the instructions seems very vague are there any good 
> step-by-step instructions.

There are very good RPMs at:


I think just about everyone uses those.  They are for CentOS/RHEL but
I'd imagine just rebuilding the .src.rpm files should be sufficient.

Cyrus upgrades are generally seemless.  Although I'd probably upgrade
2.2 -> 2.3 -> 2.4 [being generally conservative is good].  But maybe
someone here has experience jumping from 2.2 straight to 2.4?

> b) is there a way to get the mail from an old outlook.pst file into this 
> system?

If it is just one user, or a few users, the general method is to open
the PST file in Outlook with the Cyrus connection configured and to
drag-n-drop.

FYI, one tip when using Outlook with a real IMAP server is:

Tools -> Options -> Other -> Advanced -> Options -> Add-In Manager ->
Uncheck Exchange Extensions property.

That may depend on the version of Outlook but at least in XP & 2003 I
believe I've had to do that to make random errors go away.



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


Re: Solved: Re: cannot retrieve mail in desktop client

2011-07-01 Thread Craig White
On Fri, 2011-07-01 at 11:16 +0200, Simon Matter wrote:
> > On Fri, 2011-07-01 at 12:56 +0800, JonL wrote:
> >> Finally,  I have it fixed!!!
> >>
> >> What I had to do to resolve this problem was:
> >> 1) make sure mail was in the postfix group
> >> 2) I added "1" to
> >> lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
> >>
> >> Thanks everyone for your assistance.
> >>
> >> Couple of question however,
> >> a) since this is a SLES 10 SP1 server and I plan to move to SP4 soon, is
> >> there a rpm for the cyrus-imapd 2.4.9? and to upgrade it manually, if
> >> there
> >> is no cyrus-imapd rpm, the instructions seems very vague are there any
> >> good
> >> step-by-step instructions.
> > 
> > use Simon's rpm's (invoca.ch)
> > http://www.invoca.ch/pub/packages/cyrus-imapd/
> 
> But he's running Suse :(
> I don't think that will work well.

you would know best but I suspect that since SuSE is an rpm system and
this is an SRPM, it's just a matter of adjusting the pre-requisite
package names in the spec file to match.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


Re: Solved: Re: cannot retrieve mail in desktop client

2011-07-01 Thread Simon Matter
> On Fri, 2011-07-01 at 12:56 +0800, JonL wrote:
>> Finally,  I have it fixed!!!
>>
>> What I had to do to resolve this problem was:
>> 1) make sure mail was in the postfix group
>> 2) I added "1" to
>> lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
>>
>> Thanks everyone for your assistance.
>>
>> Couple of question however,
>> a) since this is a SLES 10 SP1 server and I plan to move to SP4 soon, is
>> there a rpm for the cyrus-imapd 2.4.9? and to upgrade it manually, if
>> there
>> is no cyrus-imapd rpm, the instructions seems very vague are there any
>> good
>> step-by-step instructions.
> 
> use Simon's rpm's (invoca.ch)
> http://www.invoca.ch/pub/packages/cyrus-imapd/

But he's running Suse :(
I don't think that will work well.

Simon


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


Re: Solved: Re: cannot retrieve mail in desktop client

2011-07-01 Thread Craig White
On Fri, 2011-07-01 at 12:56 +0800, JonL wrote:
> Finally,  I have it fixed!!!
> 
> What I had to do to resolve this problem was:
> 1) make sure mail was in the postfix group
> 2) I added "1" to
> lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
> 
> Thanks everyone for your assistance.
> 
> Couple of question however,
> a) since this is a SLES 10 SP1 server and I plan to move to SP4 soon, is 
> there a rpm for the cyrus-imapd 2.4.9? and to upgrade it manually, if there 
> is no cyrus-imapd rpm, the instructions seems very vague are there any good 
> step-by-step instructions.

use Simon's rpm's (invoca.ch)
http://www.invoca.ch/pub/packages/cyrus-imapd/

> b) is there a way to get the mail from an old outlook.pst file into this 
> system?

once you get outlook connected to IMAP server account, open the old
outlook.pst file and drag the mail to wherever you want it to be on the
IMAP server - this is pretty basic usage.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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


resetting imap password

2011-07-01 Thread JonL
Does anyone know how to reset the imap server password?

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

Solved: Re: cannot retrieve mail in desktop client

2011-07-01 Thread JonL
Finally,  I have it fixed!!!

What I had to do to resolve this problem was:
1) make sure mail was in the postfix group
2) I added "1" to
lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1

Thanks everyone for your assistance.

Couple of question however,
a) since this is a SLES 10 SP1 server and I plan to move to SP4 soon, is 
there a rpm for the cyrus-imapd 2.4.9? and to upgrade it manually, if there 
is no cyrus-imapd rpm, the instructions seems very vague are there any good 
step-by-step instructions.

b) is there a way to get the mail from an old outlook.pst file into this 
system?


Regards,

Jon

--
From: "Adam Tauno Williams" 
Sent: Friday, July 01, 2011 12:56 AM
To: 
Subject: Re: cannot retrieve mail in desktop client

> Please reply to list if your MUA support it, rather than Reply-All.
>
> On Thu, 2011-06-30 at 23:11 +0800, JonL wrote:
>> after adding the required command in main.cf
>> mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
>> I'm now getting the following error
>> Jun 30 23:05:24 mmtlnx postfix/qmgr[13978]: 05C4A19B8A:
>> from=<839556+2D3-jlmiller=mmtnetworks.com...@lists.techtarget.com>,
>> size=4281, nrcpt=1 (queue active)
>> Jun 30 23:05:24 mmtlnx postfix/lmtp[14146]: 05C4A19B8A:
>> to=, relay=none, delay=3, status=deferred
>> (connect to /var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp]: 
>> Permission
>> denied)
>
> Does "/var/lib/imap/socket/lmtp" exist?  What are the permissions?
>
> I assume lmtpd (the LMTP receiver is running [Cyrus is started]).
>
> Where LMTP listens is defined in /etc/cyrus.conf
>
> See the Cyrus chapter of WMOGAG for an explanation of cyrus.conf.
> 
>
>> I'm using:
>> Suse Linux Enterprise Server v 10 SP1 (will be moving to SP4)
>> Unfortunately I find the documentation not as clear as I had hoped.
>> Also do I need to make any changes to my transport table?
>
> Probably not; as seen via your error it is already trying to deliver via
> LMTP.
>
> 
> 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: cannot retrieve mail in desktop client

2011-07-01 Thread JonL
see replies below

--
From: "Adam Tauno Williams" 
Sent: Friday, July 01, 2011 12:56 AM
To: 
Subject: Re: cannot retrieve mail in desktop client

> Please reply to list if your MUA support it, rather than Reply-All.
>
> On Thu, 2011-06-30 at 23:11 +0800, JonL wrote:
>> after adding the required command in main.cf
>> mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
>> I'm now getting the following error
>> Jun 30 23:05:24 mmtlnx postfix/qmgr[13978]: 05C4A19B8A:
>> from=<839556+2D3-jlmiller=mmtnetworks.com...@lists.techtarget.com>,
>> size=4281, nrcpt=1 (queue active)
>> Jun 30 23:05:24 mmtlnx postfix/lmtp[14146]: 05C4A19B8A:
>> to=, relay=none, delay=3, status=deferred
>> (connect to /var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp]: 
>> Permission
>> denied)
>
> Does "/var/lib/imap/socket/lmtp" exist?  What are the permissions?
jlm:  srwxrwxrwx  1 root  root   0 2011-07-01 09:42 lmtp

> I assume lmtpd (the LMTP receiver is running [Cyrus is started]).
>
jlm:  from master.cf
   lmtp  unix  -   -   n   -   -   lmtp

> Where LMTP listens is defined in /etc/cyrus.conf
>
jlm /etc/cyrus.conf
lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" 
prefork=0

> See the Cyrus chapter of WMOGAG for an explanation of cyrus.conf.
> 
>
>> I'm using:
>> Suse Linux Enterprise Server v 10 SP1 (will be moving to SP4)
>> Unfortunately I find the documentation not as clear as I had hoped.
>> Also do I need to make any changes to my transport table?
>
> Probably not; as seen via your error it is already trying to deliver via
> LMTP.
>
> 
> 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: cannot retrieve mail in desktop client

2011-07-01 Thread Marc Patermann
Hi,

Andrew Morgan schrieb am 30.06.2011 18:48 Uhr:
> On Thu, 30 Jun 2011, JonL wrote:
> 
>> after adding the required command in main.cf
>> mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
>>
>> I'm now getting the following error
>>
>> Jun 30 23:05:24 mmtlnx postfix/qmgr[13978]: 05C4A19B8A:
>> from=<839556+2D3-jlmiller=mmtnetworks.com...@lists.techtarget.com>,
>> size=4281, nrcpt=1 (queue active)
>> Jun 30 23:05:24 mmtlnx postfix/lmtp[14146]: 05C4A19B8A:
>> to=, relay=none, delay=3, status=deferred
>> (connect to /var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp]: Permission
>> denied)
> 
> Make sure that your Postfix user has permissions to open that socket file. 
> You might need to relax the permissions on the parent directories.  Also, 
> Postfix is frequently run in a chroot environment, so you may need to 
> relocate your lmtp socket somewhere inside the chroot or disable chroot.
On my SLES11 box I set:

# grep lmtp /etc/cyrus.conf
lmtpunix  cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=0

The socket is created like this by restarting cyrus IMAPd:

# l /var/spool/postfix/public/lmtp
srwxrwxrwx 1 root root 0 Apr  6 09:42 /var/spool/postfix/public/lmtp=

Postfix is set to deliver there:

# postconf mailbox_transport
mailbox_transport = lmtp:unix:public/lmtp



Marc

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