<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
In my unified murder configuration (cyrus imapd 2.3.7) with 2 imap
servers and 1 mupdate server, I have a unwanted behaviour when LMTP
tries to deliver mail for a mailbox that is not available.<br>
<br>
Lets says I have a user, "user2", whoses mailboxes are on "imap2".<br>
<br>
Scenario 1 :<br>
======<br>
- mupdate UP<br>
- imap1 UP<br>
- imap2 UP<br>
<br>
<ul>
<li>When mupdate, imap1 and imap2 are running, everything goes well.
Even when I deliver mail via LMTP to "imap1", who doesn't own
"users2"'s mailboxes. "imap1" then connects to "imap2" and correctly
delivers the mail.</li>
</ul>
==> OK<br>
<br>
Scenario 2 :<br>
=======<br>
- mupdate UP<br>
- imap1 DOWN, then UP for less than 10 minutes<br>
- imap2 DOWN<br>
<br>
Now I shut down both "imap1""imap2", and restart ONLY imap1. The
mupdate server is always running and has never been shut down.<br>
<ul>
<li>Again, I send an email for "user2" via LMTP to "imap1", the
mailbox being hosted on "imap2".</li>
</ul>
<ul>
<li>Instead of returning a soft error (4XX) as I would have expected,
imap1 returns a hard error (5XX) to the SMTP/LMTP server, and the mail
is lost!</li>
</ul>
==> Incoming Mail lost<br>
<br>
Here are log transcripts:<br>
<br>
- On the LMTP server (Postfix 2.0.x):<br>
<br>
Sep 14 11:50:29 galia postfix/lmtp[24424]: 80E8473F35:
to=<a class="moz-txt-link-rfc2396E" href="mailto:user2@xxxxx.com"><user2@xxxxx.com></a>, relay=imap1[10.12.17.44], delay=1154,
status=bounced (host imap1[10.12.17.44] said: 550-Mailbox unknown.
Either there is no mailbox associated with this 550-name or you do not
have authorization to see it. 550 5.1.1 User unknown (in reply to RCPT
TO command))<br>
<br>
- On "imap1":<br>
<br>
Sep 14 11:50:28 imap1 cyrus/lmtp[26411]: connection from
galia.srv.in.karavel.com [10.12.17.31]<br>
Sep 14 11:50:28 imap1 cyrus/master[26548]: about to exec
/usr/lib/cyrus/bin/lmtpd<br>
Sep 14 11:50:28 imap1 cyrus/lmtp[26411]: login:
galia.srv.in.karavel.com [10.12.17.31] postman DIGEST-MD5 User logged in<br>
Sep 14 11:50:28 imap1 cyrus/lmtp[26548]: executed<br>
Sep 14 11:50:28 imap1 cyrus/lmtp[26411]: kick_mupdate: can't connect to
target: Connection refused<br>
Sep 14 11:50:28 imap1 cyrus/lmtp[26411]: verify_user(user.user2)
failed: Mailbox does not exist<br>
Sep 14 11:53:09 imap1 cyrus/master[26353]: process 26411 exited, status
0<br>
<br>
<br>
Scenario 3 :<br>
======<br>
- mupdate UP<br>
- imap1 UP for more than 10 minutes<br>
- imap2 DOWN<br>
<br>
This time, if I wait *a few minutes* before resending a mail to "user2"
via LMTP on "imap1". I do get a soft error, as expected.<br>
<br>
==> Incoming Mail deferred.<br>
<br>
Here are the new log transcripts:<br>
<br>
- On the LMTP server:<br>
<br>
Sep 14 11:59:54 galia postfix/lmtp[25497]: CDB3573D48:
to=<a class="moz-txt-link-rfc2396E" href="mailto:user2@xxxx.com"><user2@xxxx.com></a>, relay=imap1[10.12.17.44], delay=0,
status=deferred (host imap1[10.12.17.44] said: 451 4.4.3 Remote server
unavailable (in reply to end of DATA command))<br>
<br>
- On the "imap1" server:<br>
<br>
Sep 14 11:59:53 imap1 cyrus/master[26560]: about to exec
/usr/lib/cyrus/bin/lmtpd<br>
Sep 14 11:59:53 imap1 cyrus/lmtp[26530]: connection from
galia.srv.in.karavel.com [10.12.17.31]<br>
Sep 14 11:59:53 imap1 cyrus/lmtp[26560]: executed<br>
Sep 14 11:59:53 imap1 cyrus/lmtp[26530]: login:
galia.srv.in.karavel.com [10.12.17.31] postman DIGEST-MD5 User logged in<br>
Sep 14 11:59:53 imap1 cyrus/lmtp[26530]: connect(imap2) failed:
Connection refused<br>
<br>
Question:<br>
======<br>
<br>
Can anybody tell me what went wrong and why "imap1" wasn't aware of the
existence of mailboxes on "imap2" just after startup?<br>
<br>
I have another question, related to imapd startup :<br>
- I have 13000 mailboxes on "imap1" and 14000 mailboxes on "imap2".<br>
- When I start "imap1", it kicks "ctl_mboxlist -m" before spawning
other processes. This mailbox synchronisation process is very slow and
takes at least 4 minutes. <br>
<br>
Why is this "ctl_mbox_list -m" so slow? Is this related to the fact
that even when "imap1" is up and running, it still isn't fully
operational before at least 10 minutes?<br>
<br>
Here is some info on my configuration. I can provide more info if
needed.<br>
- All 3 servers running Debian stable+testing + home compiled Cyrus
Imapd 2.3.7<br>
- They all have bi-XEON with at least 3 Gb of RAM<br>
- Server load is very low, as this is a test environnment<br>
- 13000 mailboxes on imap1, 14000 on imap2<br>
- 1200 total users, stored in LDAP<br>
- Database formats:<br>
ANNOTATION skiplist<br>
DUPLICATE berkeley-nosync<br>
MBOX skiplist<br>
PTS berkeley<br>
QUOTA quotalegacy<br>
SEEN skiplist<br>
SUBS flat<br>
TLS berkeley-nosync<br>
<br>
Regards<br>
<pre class="moz-signature" cols="72">--
Farzad FARID <a class="moz-txt-link-rfc2396E" href="mailto:ffarid@pragmatic-source.com"><ffarid@pragmatic-source.com></a>
Architecte Open Source / Pragmatic Source
<a class="moz-txt-link-freetext" href="http://www.pragmatic-source.com/">http://www.pragmatic-source.com/</a></pre>
</body>
</html>