DNS load balancing

2010-05-11 Thread Andre Nathan
Hello

I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
setup is working fine, and I'm now considering the load balancing
options I have.

I believe the simplest option would be to simply rely on DNS load
balancing. However, for this to work, I need to consider what happens
when one of the cluster nodes fails, regarding the clients which access
the cluster:

 - Will IMAP and POP3 clients automatically try the second DNS entry if 
   connecting to the first one fails?
 - Will the LMTP client also do this? I'm using the postfix LMTP client 
   for delivery.

Does any one have experience with this kind of setup?

Thanks in advance,
Andre


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Kenneth Marshall
On Tue, May 11, 2010 at 09:35:26AM -0300, Andre Nathan wrote:
> Hello
> 
> I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
> setup is working fine, and I'm now considering the load balancing
> options I have.
> 
> I believe the simplest option would be to simply rely on DNS load
> balancing. However, for this to work, I need to consider what happens
> when one of the cluster nodes fails, regarding the clients which access
> the cluster:
> 
>  - Will IMAP and POP3 clients automatically try the second DNS entry if 
>connecting to the first one fails?
>  - Will the LMTP client also do this? I'm using the postfix LMTP client 
>for delivery.
> 
> Does any one have experience with this kind of setup?
> 
> Thanks in advance,
> Andre
> 
Hi Andre,

Most mail clients will provide a very poor user experience for failover
with DNS load balancing. Almost any other option would be a better choice
although not as simple to implement.

Regards,
Ken

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Michael Menge

Quoting Andre Nathan :


Hello

I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
setup is working fine, and I'm now considering the load balancing
options I have.



For Clustering Cyrus have a look at
http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/CyrusCluster

I have no experiance with OCFS2 but an active-active cyrus cluster
on a shared filesystem is tricky at best.



I believe the simplest option would be to simply rely on DNS load
balancing. However, for this to work, I need to consider what happens
when one of the cluster nodes fails, regarding the clients which access
the cluster:



Depending on the OS and Networksetting this can take some time,
because the OS and relaying DNS-server may cache the result.


 - Will IMAP and POP3 clients automatically try the second DNS entry if
   connecting to the first one fails?
 - Will the LMTP client also do this? I'm using the postfix LMTP client
   for delivery.



The will try to reconnect but might use the old DNS answer.


Does any one have experience with this kind of setup?


We use this kind of loadbalancing for web-proxys and smtp-server
but if one node fails there are some clients that try to connect
the failed node


You should take a look at ClusterIP, Cyrus Murder and Cyrus Replication






Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html






M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen

smime.p7s
Description: S/MIME Signatur

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: DNS load balancing

2010-05-11 Thread Ciro Iriarte
2010/5/11 Andre Nathan :
> Hello
>
> I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
> setup is working fine, and I'm now considering the load balancing
> options I have.
>
> I believe the simplest option would be to simply rely on DNS load
> balancing. However, for this to work, I need to consider what happens
> when one of the cluster nodes fails, regarding the clients which access
> the cluster:
>
>  - Will IMAP and POP3 clients automatically try the second DNS entry if
>   connecting to the first one fails?
>  - Will the LMTP client also do this? I'm using the postfix LMTP client
>   for delivery.
>
> Does any one have experience with this kind of setup?
>
> Thanks in advance,
> Andre

LVS is quite simple to setup this days, there's no need to patch the
kernel with any mainstream distribution...

Regards,

-- 
Ciro Iriarte
http://cyruspy.wordpress.com
--

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: DNS load balancing

2010-05-11 Thread Ciro Iriarte
2010/5/11 Kenneth Marshall :
> On Tue, May 11, 2010 at 09:35:26AM -0300, Andre Nathan wrote:
>> Hello
>>
>> I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
>> setup is working fine, and I'm now considering the load balancing
>> options I have.
>>

By the way, did you test your setup with considerable load?, I was
really interested in this kind of solution, looking at various docs
and mail posts, main concern seems to be file locking

Regards,

-- 
Ciro Iriarte
http://cyruspy.wordpress.com
--

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Andre Nathan
On Tue, 2010-05-11 at 08:57 -0400, Ciro Iriarte wrote:
> LVS is quite simple to setup this days, there's no need to patch the
> kernel with any mainstream distribution...

Yeah, that was my second option, as I already use it for other services.
I was just wondering if I could come up with something more "stand
alone".

Thanks
Andre


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Andre Nathan
On Tue, 2010-05-11 at 09:16 -0400, Ciro Iriarte wrote:
> By the way, did you test your setup with considerable load?, I was
> really interested in this kind of solution, looking at various docs
> and mail posts, main concern seems to be file locking

I've tested DRBD and OCFS2 under heavy load, but not Cyrus yet.

>From what I've been reading, it should be fine if I avoid BerkeleyDB.
What I still haven't figured out is how to keep the proc directory and
the locks in the socket directory local to the cluster nodes. For the
socket names there are configuration options, so I could just choose
different names for each cluster node.

Best regards,
Andre


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Andy Bennett
Hi,

> I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
> setup is working fine, and I'm now considering the load balancing
> options I have.
> 
> I believe the simplest option would be to simply rely on DNS load
> balancing. However, for this to work, I need to consider what happens
> when one of the cluster nodes fails, regarding the clients which access
> the cluster:
> 
>  - Will IMAP and POP3 clients automatically try the second DNS entry if 
>connecting to the first one fails?
>  - Will the LMTP client also do this? I'm using the postfix LMTP client 
>for delivery.
> 
> Does any one have experience with this kind of setup?

I've not done this with Cyrus servers but to make DNS load balancing 
like this "failover safe" there are a couple of solutions.

I guess in DNS you have something like the following:

-
imap  A a.b.c.x
imap  A a.b.c.y
host1 A a.b.c.x
host2 A a.b.c.y
-




If you have a couple of spare IPs you can assign things like this instead:

-
imap  A a.b.c.x
imap  A a.b.c.y
host1 A a.b.c.p
host2 A a.b.c.q
-

Then use something like wackamole (http://www.backhand.org/wackamole/) 
to ensure that a.b.c.{x,y} are always being listened on by exactly 1 
machine each. a.b.c.{p,q} would be used to admin access to specific 
machines.

This option involves installing and configuring the wackamole software 
on each host.

DNS will give each client an arbitrary IP address. If the server 
listening on that IP address fails wackamole will move the IP from the 
failed host to another. This will cause all the connected clients to 
have to reconnect. New clients that come along whilst a node failure is 
in progress will not experience anything unusual but you might have to 
check the semantics when a new server is added to the pool.




The alternative is to delgate 'imap' as a subdomain in DNS thusly:

-
imap NS host1
imap NS host2
host1 A a.b.c.p
host2 A a.b.c.q
-

Then run bind on host1 and host2 to serve the imap zone. On host1 it 
would look like this:

-
@ A a.b.c.p
-

and on host2 it would look like this:

-
@ A a.b.c.q
-

You should set appropriately short TTLs on imap and the delegated zone.

This will mean that each client will randomly resolve to one of the 
machines. When a machine is down its DNS server will also be down so the 
lookup will timeout in the client's resolver and it will try the other 
NS servers listed in turn until it gets a server that will give it an A 
record.

In failure cases existing clients will wobble for a bit until their 
cache expires and then the connections will have to be reestablished. 
New clients will just take slightly longer to connect in some situations 
but that will (hopefully) pass mostly unnoticed by the users.








Regards,
@ndy

-- 
andy...@ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Vincent Fox
On 5/11/2010 6:40 AM, Andre Nathan wrote:
> What I still haven't figured out is how to keep the proc directory and
> the locks in the socket directory local to the cluster nodes. For the
> socket names there are configuration options, so I could just choose
> different names for each cluster node.
>
>
We symlink our proc and log directories out to
TMPFS directories local to each server.  There is
little sense to keeping proc & logs on disk IMO.





Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


email inaccessible through imap after reading

2010-05-11 Thread Martin Kraus
Hello.
  I'm having problem with emails being inaccessible through imap after reading
it in outlook. The email file is still in the INBOX if I grep for it's mail id, 
but no
imap client displays it. I've tried with mutt and pop3  but I couldn't find the 
email either.

This server uses cyrus 2.3.14. I've never had any similar problems on any of
my other servers. My guess is that outlook does something to the message to
hide it from displaying but I've got no idea how to check this.

Does anyone have any idea why would this happen?

Thanks
Martin Kraus

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: DNS load balancing

2010-05-11 Thread Andre Nathan
On Tue, 2010-05-11 at 09:12 -0700, Vincent Fox wrote:  
> We symlink our proc and log directories out to
> TMPFS directories local to each server.  There is
> little sense to keeping proc & logs on disk IMO.

Do you know if the log directory is used even when none of the databases
is set to berkeleydb?

Thanks,
Andre


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


installing 2.3.16 on slackware64-13

2010-05-11 Thread James Meara
Hi,

I'm trying to get cyrus imap running on new machine, I've compiled and 
installed it without errors but when I start master the imapd processes 
are dying immediately from what looks like a divide by zero error.

I'm going from 2.2.12 to 2.3.16 so I'm not entirely sure I've got the 
config right.

Here is my imap.conf

configdirectory: /srv/imap
partition-default: /srv/imap/spool
admins: root
sasl_pwcheck_method: auxprop saslauthd
allowanonymouslogin: 0
servername: mercury
allowplaintext: yes
reject8bit: no
sendmail: /usr/sbin/sendmail
tls_cert_file: /etc/ssl/imap.whitecube.com.cert.pem
tls_key_file: /etc/ssl/imap.whitecube.com.key.pem
tls_session_timeout: 0
altnamespace: 1
unixhierarchysep: 0
sievedir: /srv/imap/sieve
idlesocket: /var/imap/socket/idle
lmtpsocket: /var/imap/socket/lmtp

and cyrus.conf

# standard standalone server implementation

START {
  # do not delete this entry!
  recover   cmd="ctl_cyrusdb -r"

  # this is only necessary if using idled for IMAP IDLE
  idledcmd="idled"
}

# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
  # add or remove based on preferences
  imap  cmd="imapd -T 0" listen="imap" prefork=9
  imaps cmd="imapd -s -T 0" listen="imaps" prefork=2
#  pop3 cmd="pop3d" listen="pop3" prefork=0
#  pop3scmd="pop3d -s" listen="pop3s" prefork=0
  sieve cmd="timsieved" listen="sieve" prefork=1

  # these are only necessary if receiving/exporting usenet via NNTP
#  nntp cmd="nntpd" listen="nntp" prefork=0
#  nntpscmd="nntpd -s" listen="nntps" prefork=0

  # at least one LMTP is required for delivery
#  lmtp cmd="lmtpd" listen="lmtp" prefork=0
  lmtpunix  cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0

  # this is only necessary if using notifications
#  notify   cmd="notifyd" listen="/var/imap/socket/notify" 
proto="udp" prefork=1
}

EVENTS {
  # this is required
  checkpointcmd="ctl_cyrusdb -c" period=30

  # this is only necessary if using duplicate delivery suppression,
  # Sieve or NNTP
  delprune cmd="cyr_expire -E 3"at=0400

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

this is what I get from ps

cyrus 9661  7.0  0.0  51204  3932 pts/0S17:23   0:00 
/usr/cyrus/bin/master
cyrus 9666  0.0  0.0  85620  2500 pts/0S17:23   0:00 timsieved
cyrus 9669  0.0  0.0  85620  2500 pts/0S17:23   0:00 timsieved
cyrus10609  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10611  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10612  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10613  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10614  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10615  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10616  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10617  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10622  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 

cyrus10623  0.0  0.0  0 0 pts/0Z17:23   0:00 [imapd] 



and in  the logs

May 11 17:23:52 mercury1 master[9661]: process started
May 11 17:23:52 mercury1 ctl_cyrusdb[9662]: recovering cyrus databases
May 11 17:23:52 mercury1 ctl_cyrusdb[9662]: skiplist: checkpointed 
/srv/imap/mailboxes.db (18265 records, 1802644 bytes) in 0 seconds
May 11 17:23:52 mercury1 ctl_cyrusdb[9662]: skiplist: checkpointed 
/srv/imap/annotations.db (0 records, 144 bytes) in 0 seconds
May 11 17:23:52 mercury1 ctl_cyrusdb[9662]: done recovering cyrus databases
May 11 17:23:52 mercury1 master[9661]: ready for work
May 11 17:23:52 mercury1 ctl_cyrusdb[9663]: checkpointing cyrus databases
May 11 17:23:52 mercury1 kernel: imapd[9664] trap divide error ip:407487 
sp:7fff5fa64420 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9667] trap divide error ip:407487 
sp:7fff0c8c7c90 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9668] trap divide error ip:407487 
sp:7fffdd4ce590 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9670] trap divide error ip:407487 
sp:7fff511f9b90 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9671] trap divide error ip:407487 
sp:7fff821772f0 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9673] trap divide error ip:407487 
sp:7fff6f737320 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9675] trap divide error ip:407487 
sp:7fff30f1f7b0 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9672] trap divide error ip:407487 
sp:7c44a3d0 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel: imapd[9678] trap divide error ip:407487 
sp:7fffda1ffa50 error:0 in imapd[40+102000]
May 11 17:23:52 mercury1 kernel

Re: DNS load balancing

2010-05-11 Thread Vincent Fox
On 5/11/2010 5:35 AM, Andre Nathan wrote:
> Hello
>
> I'm setting up a two-machine cyrus cluster using OCFS2 over DRBD. The
> setup is working fine, and I'm now considering the load balancing
> options I have.
>
> I believe the simplest option would be to simply rely on DNS load
> balancing. However, for this to work, I need to consider what happens
> when one of the cluster nodes fails, regarding the clients which access
> the cluster:
>
>   - Will IMAP and POP3 clients automatically try the second DNS entry if
> connecting to the first one fails?
>   - Will the LMTP client also do this? I'm using the postfix LMTP client
> for delivery.
>
> Does any one have experience with this kind of setup?
>
>

DNS rollovers and particularly round-robin DNS solutions should
not be considered IMO in modern HA datacenter practice. May work
OK for a few hundred people  and departmental servers, shows all
it's warts for thousands.

The logjam created when thousands of connections EACH have to
timeout and rollover is not desirable.

If you are doing a failover (active/passive) cluster then bring up
a VIP for the service and have the VIP hostname be the official
client point of contact.  If you are doing active/active in some form
then a proper load-balancer in front of your mail-store can do health
checks and route client connections to servers known to be up.


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: email inaccessible through imap after reading

2010-05-11 Thread Michael Menge

Hi,

Quoting Martin Kraus :


Hello.
  I'm having problem with emails being inaccessible through imap  
after reading
it in outlook. The email file is still in the INBOX if I grep for  
it's mail id, but no
imap client displays it. I've tried with mutt and pop3  but I  
couldn't find the

email either.

This server uses cyrus 2.3.14. I've never had any similar problems on any of
my other servers. My guess is that outlook does something to the message to
hide it from displaying but I've got no idea how to check this.

If you use the delayed expunge feature of cyrus and the eMail gets  
deleted it stayes on the filesystem till cyr_expire removes them. See  
expunge_mode in imapd.conf



Does anyone have any idea why would this happen?



I guess Outlook is using POP and deletes the mail after download.

Check your logfiles and/or use telemetry log for that user.




Thanks
Martin Kraus

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html






M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen

smime.p7s
Description: S/MIME Signatur

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: email inaccessible through imap after reading

2010-05-11 Thread Martin Kraus
On Tue, May 11, 2010 at 06:44:47PM +0200, Michael Menge wrote:
> If you use the delayed expunge feature of cyrus and the eMail gets
> deleted it stayes on the filesystem till cyr_expire removes them.
> See expunge_mode in imapd.conf

I'm not using expunge mode delayed. Haven't been able to get it to work it
just segfaults when expunging.
 
> I guess Outlook is using POP and deletes the mail after download.
> 
> Check your logfiles and/or use telemetry log for that user.

outlook uses imap and I've tried to access that mailbox using mutt both
through imap and pop3 and I've also tried  squirrelmail. 
The message is there, I can see it on the filesystem but it doesn't show up
after being read.

Since I've never had any similar problems with other cyrus servers, I'm
inclined to say it is something outlook did to that message but I can't figure
out what. If it deleted that message, it wouldn't be on the filesystem. 

mk

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: installing 2.3.16 on slackware64-13

2010-05-11 Thread Dan White
On 11/05/10 17:23 +0100, James Meara wrote:
>Hi,
>
>I'm trying to get cyrus imap running on new machine, I've compiled and 
>installed it without errors but when I start master the imapd processes 
>are dying immediately from what looks like a divide by zero error.

>May 11 17:23:52 mercury1 kernel: imapd[9664] trap divide error ip:407487 
>sp:7fff5fa64420 error:0 in imapd[40+102000]
>May 11 17:23:52 mercury1 kernel: imapd[9667] trap divide error ip:407487 
>sp:7fff0c8c7c90 error:0 in imapd[40+102000]
>May 11 17:23:52 mercury1 kernel: imapd[9668] trap divide error ip:407487 
>sp:7fffdd4ce590 error:0 in imapd[40+102000]
>May 11 17:23:52 mercury1 kernel: imapd[9670] trap divide error ip:407487 
>sp:7fff511f9b90 error:0 in imapd[40+102000]

See http://cyrusimap.web.cmu.edu/imapd/install-upgrade.html

Have you tried reconstructing your mailboxes?

You can use the debug_command in imapd.conf to further trouble shoot.  From
Debian's README.Debian.debug.gz file:

Attaching debuggers to Cyrus, and getting traces


You can tell Cyrus services to run a debugging command just before they
start doing real work.  This can be used to run strace, ltrace and gdb or
ddd (for interactive debugging and back-tracing) quite easily.

Set the shell command to be run in /etc/imapd.conf, option debug_command.
Then, add the command line switch "-D" to the Cyrus services you want to
run the debug_command in /etc/cyrus.conf, and restart cyrmaster using
/etc/init.d/cyrus2.3 restart.

The debugging command must be given as a single line in the configuration
file.

To get a back-trace using gdb: debug_command: /usr/bin/gdb -batch -cd=/tmp
-x /usr/lib/cyrus/getbacktrace.gdb /usr/lib/cyrus/bin/%s %d
>/tmp/gdb-backtrace.cyrus.%1$s.%2$d <&- 2>&1 &

The above will produce a back-trace of every service run with -D that
segfaults in the files /tmp/gdb-backtrace.cyrus.*;
/usr/lib/cyrus/getbacktrace.gdb simply has the sequence of commands for
gdb: c (to continue running the service), bt (to get the back-trace if the
program didn't exit normally), quit (to quit gdb).

For strace, you can use: debug_command: /usr/bin/strace -tt -o
/tmp/strace.cyrus.%s.%d -p %2$d <&- 2>&1 &

Which will produce straces in /tmp/strace.cyrus.*

-- 
Dan White

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: email inaccessible through imap after reading

2010-05-11 Thread Michael Menge

Quoting Martin Kraus :


On Tue, May 11, 2010 at 06:44:47PM +0200, Michael Menge wrote:

If you use the delayed expunge feature of cyrus and the eMail gets
deleted it stayes on the filesystem till cyr_expire removes them.
See expunge_mode in imapd.conf


I'm not using expunge mode delayed. Haven't been able to get it to work it
just segfaults when expunging.


I guess Outlook is using POP and deletes the mail after download.

Check your logfiles and/or use telemetry log for that user.


outlook uses imap and I've tried to access that mailbox using mutt both
through imap and pop3 and I've also tried  squirrelmail.
The message is there, I can see it on the filesystem but it doesn't show up
after being read.

Since I've never had any similar problems with other cyrus servers, I'm
inclined to say it is something outlook did to that message but I  
can't figure

out what. If it deleted that message, it wouldn't be on the filesystem.



did you try an reconstruct on that mailbox?



M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen

smime.p7s
Description: S/MIME Signatur

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html