[Dovecot] Multiple Concurrent IMAP Connections For Same User
Hi
I've been using courier for some time, but have just built a new box and am using dovecot (V1.2.9), Ubuntu 10.04LTS. I have a question regarding multiple concurrent imap connections and how to get dovecot to behave in the same way that courier does. I have searched the wiki, but find little relevant to my specific issue.
Courier-Imap Behaviour
If I have thunderbird pointed at the 'Inbox' folder via IMAP, then connect another IMAP client to the same mail account (in this case an iPhone), and then delete an email using the iphone, then after a couple of seconds, the inbox shown by Thunderbird updates, removing the now deleted email. It does this without my having to touch Thunderbird.
Dovecot behaviour
Performing the same test on a different mailbox, this time hosted via Dovecot, I again see the two views, one in Thunderbird and one on the iPhone, but when I delete the email on the iPhone, the change is not reflected in the view on Thunderbird. If I select the email on Thunderbird, then it has no content. If I restart thunderbird, the deleted email is still shown. I have to delete (the already deleted) the email also in thunderbird before it finally dissapears.
How can I get the courier behaviour where the inbox in one email client automagically reflects the changes made to that inbox in another client? If I am better sticking to Courier to get this functionality, thats fine, but if I can configure the behaviour I desire and still retail the benefits of dovecot then thats even better!
Kind Regards
Nigel
On 26/01/2011 11:47, Nigel Webber wrote:
Hi
I've been using courier for some time, but have just built a new box and am using dovecot (V1.2.9), Ubuntu 10.04LTS. I have a question regarding multiple concurrent imap connections and how to get dovecot to behave in the same way that courier does. I have searched the wiki, but find little relevant to my specific issue.
Courier-Imap Behaviour
If I have thunderbird pointed at the 'Inbox' folder via IMAP, then connect another IMAP client to the same mail account (in this case an iPhone), and then delete an email using the iphone, then after a couple of seconds, the inbox shown by Thunderbird updates, removing the now deleted email. It does this without my having to touch Thunderbird.
Dovecot behaviour
Performing the same test on a different mailbox, this time hosted via Dovecot, I again see the two views, one in Thunderbird and one on the iPhone, but when I delete the email on the iPhone, the change is not reflected in the view on Thunderbird. If I select the email on Thunderbird, then it has no content. If I restart thunderbird, the deleted email is still shown. I have to delete (the already deleted) the email also in thunderbird before it finally dissapears.
How can I get the courier behaviour where the inbox in one email client automagically reflects the changes made to that inbox in another client? If I am better sticking to Courier to get this functionality, thats fine, but if I can configure the behaviour I desire and still retail the benefits of dovecot then thats even better!
I use dovecot.
I don't have an iPhone, but use the Android mail application.
I can't replicate your problem.
Either it's iPhone specific, or something to do with your dovecot configuration.
Am 26.01.2011 11:47, schrieb Nigel Webber:
Hi
I've been using courier for some time, but have just built a new box and am using dovecot (V1.2.9), Ubuntu 10.04LTS. I have a question regarding multiple concurrent imap connections and how to get dovecot to behave in the same way that courier does. I have searched the wiki, but find little relevant to my specific issue.
Courier-Imap Behaviour
If I have thunderbird pointed at the 'Inbox' folder via IMAP, then connect another IMAP client to the same mail account (in this case an iPhone), and then delete an email using the iphone, then after a couple of seconds, the inbox shown by Thunderbird updates, removing the now deleted email. It does this without my having to touch Thunderbird.
Dovecot behaviour
Performing the same test on a different mailbox, this time hosted via Dovecot, I again see the two views, one in Thunderbird and one on the iPhone, but when I delete the email on the iPhone, the change is not reflected in the view on Thunderbird. If I select the email on Thunderbird, then it has no content. If I restart thunderbird, the deleted email is still shown. I have to delete (the already deleted) the email also in thunderbird before it finally dissapears.
How can I get the courier behaviour where the inbox in one email client automagically reflects the changes made to that inbox in another client? If I am better sticking to Courier to get this functionality, thats fine, but if I can configure the behaviour I desire and still retail the benefits of dovecot then thats even better!
Kind Regards
Nigel
first show your conf to make sure what you configured dovecot
and i tested same scenario many times with tb and android k9 mail imap dovecot 2.0x i see it working like expected at deleting moving mail for sure there always might be time, time drifts by differnt network speeds and refreshing imap cons
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
I should have mentioned that this is not iPhone specific, the same behaviour may be observed for 2 simultanious connections from 2 separate machines running Thunderbird.
TLS/SSL is used on both.
dovecot config file below:
Nigel
# 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab069.5 x86_64 Ubuntu 10.04 LTS log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: maildir:~/Maildir mailbox_idle_check_interval: 5 mbox_write_locks: fcntl dotlock auth default: mechanisms: plain login passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth-client mode: 432 user: postfix group: postfix
On 26/01/2011 12:29, Nigel Webber wrote:
I should have mentioned that this is not iPhone specific, the same behaviour may be observed for 2 simultanious connections from 2 separate machines running Thunderbird.
TLS/SSL is used on both.
dovecot config file below:
mbox_write_locks: fcntl dotlock
try reducing mbox_write_locks to just fcntl
-- Best Regards,
Giles Coochey NetSecSpec Ltd NL T-Systems Mobile: +31 681 265 086 NL Mobile: +31 626 508 131 GIB Mobile: +350 5401 6693 Email/MSN/Live Messenger: giles@coochey.net Skype: gilescoochey
On 26/01/2011 13:08, Giles Coochey wrote:
On 26/01/2011 12:29, Nigel Webber wrote:
I should have mentioned that this is not iPhone specific, the same behaviour may be observed for 2 simultanious connections from 2 separate machines running Thunderbird.
TLS/SSL is used on both.
dovecot config file below:
mbox_write_locks: fcntl dotlock
try reducing mbox_write_locks to just fcntl
And if you're using postfix... you may need to make changes there...
http://wiki.dovecot.org/MboxLocking
Postfix
Postfix has two different ways to deliver to mboxes. One is the "mailbox" transport and another one is the "virtual" transport.
# postconf|grep mailbox_delivery_lock mailbox_delivery_lock = fcntl, dotlock # postconf|grep virtual_mailbox_lock virtual_mailbox_lock = fcntl
In the above case, if you used the "mailbox" transport, you'd have to change Dovecot's configuration to mbox_write_locks = fcntl dotlock or vice versa for Postfix.
If you used the "virtual" transport, it doesn't really matter if the "dotlock" is missing, since the "fcntl" is common with Dovecot and Postfix.
-- Best Regards,
Giles Coochey NetSecSpec Ltd NL T-Systems Mobile: +31 681 265 086 NL Mobile: +31 626 508 131 GIB Mobile: +350 5401 6693 Email/MSN/Live Messenger: giles@coochey.net Skype: gilescoochey
On 26.1.2011, at 12.47, Nigel Webber wrote:
How can I get the courier behaviour where the inbox in one email client automagically reflects the changes made to that inbox in another client?
Try talking IMAP protocol manually:
telnet localhost 143 a login user pass b select inbox c idle
Then do changes in another client. Are any written to the telnet session?
mailbox_idle_check_interval is the only setting related to this, and since you have set it to 5 seconds it really should be sending changes. If no changes are sent, I guess it's a bug in v1.2.9.
I know that this is a somewhat old thread but I do have some useful input.
Basically, this seems to be a Thunderbird problem (or at least an interaction problem between Thunderbird and Dovecot).
Before Thunderbird version 3 there wasn't a problem, the mailbox within Thunderbird would sync correctly. As of version 3 they seem to have changed their mailbox header list caching code and it gets horribly confused when mails disappear from the mailbox without it doing so. The only way to fix the view within the program is the rebuild the (Thunderbird) index.
This is not the only problem TB3 has with Dovecot. Quite often if there are large attachments TB doesn't fully load the attachments (and sometimes not even the mail itself). I've found changing TBs setting so that it only uses one connection to the server rather than the default 5 helps mitigate this.
I'm not sure why TB3 has such a hard time when talking to Dovecot as no other clients have any difficulty and TB2 never did.
Steve
P.S. Our system is a Solaris 10 x86 box running Dovecot 1.2.x with Maildir++ folders.
IT Systems Administrator, E-Mail:- steve@earth.ox.ac.uk Department of Earth Sciences, Tel:- +44 (0)1865 282110 Oxford University, South Parks Road, Oxford, UK. Fax:- +44 (0)1865 272072
Ok, this is too weird. Not ten seconds ago I sent a message to the list about what could be exactly this problem. I'd been fighting with it for ages but only today became annoyed enough to send a message about it.
So telling Thunderbird to only use one server connection solves this problem?
-Dave
On 3/5/11 11:04 AM, Stephen Usher wrote:
I know that this is a somewhat old thread but I do have some useful input.
Basically, this seems to be a Thunderbird problem (or at least an interaction problem between Thunderbird and Dovecot).
Before Thunderbird version 3 there wasn't a problem, the mailbox within Thunderbird would sync correctly. As of version 3 they seem to have changed their mailbox header list caching code and it gets horribly confused when mails disappear from the mailbox without it doing so. The only way to fix the view within the program is the rebuild the (Thunderbird) index.
This is not the only problem TB3 has with Dovecot. Quite often if there are large attachments TB doesn't fully load the attachments (and sometimes not even the mail itself). I've found changing TBs setting so that it only uses one connection to the server rather than the default 5 helps mitigate this.
I'm not sure why TB3 has such a hard time when talking to Dovecot as no other clients have any difficulty and TB2 never did.
Steve
P.S. Our system is a Solaris 10 x86 box running Dovecot 1.2.x with Maildir++ folders.
-- Dave McGuire Port Charlotte, FL
Stephen Usher put forth on 3/5/2011 10:04 AM:
I know that this is a somewhat old thread but I do have some useful input.
Basically, this seems to be a Thunderbird problem (or at least an interaction problem between Thunderbird and Dovecot).
Before Thunderbird version 3 there wasn't a problem, the mailbox within Thunderbird would sync correctly. As of version 3 they seem to have changed their mailbox header list caching code and it gets horribly confused when mails disappear from the mailbox without it doing so. The only way to fix the view within the program is the rebuild the (Thunderbird) index.
This is not the only problem TB3 has with Dovecot. Quite often if there are large attachments TB doesn't fully load the attachments (and sometimes not even the mail itself). I've found changing TBs setting so that it only uses one connection to the server rather than the default 5 helps mitigate this.
I'm not sure why TB3 has such a hard time when talking to Dovecot as no other clients have any difficulty and TB2 never did.
I don't believe it's an issue of Tbird talking to Dovecot, and I don't believe it's a Dovecot issue. I believe it's a combination of the TB GLODA system and local folder synchronization. I recommend you disable both of these, close TB, then manually delete all local cached folder/message copies and the gloda database in the user profile, then launch TB. And never reenable local sync or GLODA. This should fix your problem. And make sure *all* IMAP clients accessing the mailbox expunge on exit, including your smart phone, etc.
-- Stan
On 05/03/2011 18:04, Stan Hoeppner wrote:
I don't believe it's an issue of Tbird talking to Dovecot, and I don't believe it's a Dovecot issue. I believe it's a combination of the TB GLODA system and local folder synchronization. I recommend you disable both of these, close TB, then manually delete all local cached folder/message copies and the gloda database in the user profile, then launch TB. And never reenable local sync or GLODA. This should fix your problem. And make sure *all* IMAP clients accessing the mailbox expunge on exit, including your smart phone, etc.
Turning off all caching and synchronisation makes no difference. It's the first thing I did, especially as at work the connection to the mail server is fast and the home directory for my account is a network drive. (i.e. the caching and copying of e-mail is actually *SLOWER* than direct access.)
The same effect can be seen on all platforms TB3 runs upon and whether or not the users data is stored locally or on a network drive.
Steve
IT Systems Administrator, E-Mail:- steve@earth.ox.ac.uk Department of Earth Sciences, Tel:- +44 (0)1865 282110 Oxford University, South Parks Road, Oxford, UK. Fax:- +44 (0)1865 272072
Stephen Usher put forth on 3/5/2011 12:57 PM:
On 05/03/2011 18:04, Stan Hoeppner wrote:
I don't believe it's an issue of Tbird talking to Dovecot, and I don't believe it's a Dovecot issue. I believe it's a combination of the TB GLODA system and local folder synchronization. I recommend you disable both of these, close TB, then manually delete all local cached folder/message copies and the gloda database in the user profile, then launch TB. And never reenable local sync or GLODA. This should fix your problem. And make sure *all* IMAP clients accessing the mailbox expunge on exit, including your smart phone, etc.
Turning off all caching and synchronisation makes no difference.
Did you disable GLODA?
-- Stan
Stan Hoeppner put forth on 3/5/2011 1:34 PM:
Stephen Usher put forth on 3/5/2011 12:57 PM:
On 05/03/2011 18:04, Stan Hoeppner wrote:
I don't believe it's an issue of Tbird talking to Dovecot, and I don't believe it's a Dovecot issue. I believe it's a combination of the TB GLODA system and local folder synchronization. I recommend you disable both of these, close TB, then manually delete all local cached folder/message copies and the gloda database in the user profile, then launch TB. And never reenable local sync or GLODA. This should fix your problem. And make sure *all* IMAP clients accessing the mailbox expunge on exit, including your smart phone, etc.
Turning off all caching and synchronisation makes no difference.
Did you disable GLODA?
Also, did you delete the sync copies and the GLODA sqlite index file from the user profile? IIRC, TB will still read the files if they exist, even after disabling their parent function. TB just won't write to them any more. Yes, it's stupid, I agree. But I recall running into this problem and needing to delete all the cached mbox files and the sqlite db to get everything working correctly.
Specifically answering your "change" question, the one big difference between TB 3 and TB 2 is GLODA, and there have been a large number of problems with it. I noticed some of them on day one and disabled it.
I use both TB and RoundCube. With both open, I can delete a group of messages in RC in an IMAP subfolder and the messages automatically disappear from my TB view in about 5 seconds, and remain gone. I just performed a test deleting a group of 8 messages via RC in an IMAP subfolder containing list mail from linux-ide. It works fine the other way around as well, though I must manually refresh RC as it's a stateless web app. I just deleted 6 messages in TB, and simply clicking the folder in RC showed the messages were gone. Deleting a message via RC in INBOX required punching the Get Mail button in TB to reveal the message had been deleted. Not sure why the INBOX case required a manual refresh. The messages are all is still gone, after closing and opening TB again.
I don't recall ever having the problem you describe, using TB 3.0 through TB 3.1.9, and Dovecot 1.0.15 through 1.2.15. My point is that TB and Dovecot can be configured properly to eliminate this problem you're having.
-- Stan
participants (7)
-
Dave McGuire
-
Giles Coochey
-
Nigel Webber
-
Robert Schetterer
-
Stan Hoeppner
-
Stephen Usher
-
Timo Sirainen