[Dovecot] limit number of simultaneous lmtp deliveries ?

2011-09-05 Thread Jan-Frode Myklebust
We have quite a few frontend mail gateways that deliver incoming
email trough our dovecot director (lmtp proxy) to the backend lmtp
servers, and are seeing this logged on the frontend mail gateways:

Sep  5 10:51:56 mailgw1 postfix/lmtp[23443]: 0E2F41C01A: 
to=m...@example.com, relay=loadbalancers.example.com[192.168.42.15]:24, 
delay=61, delays=0.02/0.3/31/30, dsn=4.4.0, status=deferred (host 
loadbalancers.example.com[192.168.42.15] said: 451 4.4.0 Remote server not 
answering (DATA output timeout) (in reply to end of DATA command))

It's a bit unclear to me if this leads to duplicate deliveries, or just
delayed deliveries, but -- is there any way to limit the number of
simultanous deliveries on either the dovecot director or the backend
lmtp-servers ? 

Will process_limit=10 work for service lmtp? 


  -jf


[Dovecot] User tries to move folder, then looses it

2011-09-05 Thread Spyros Tsiolis
Hello,

Well, this is kind of difficult to explain.
I have this user that keeps making mistakes on his pc and sometimes I don't 
know if I should
believe her or not.

Anywhoo, this time round, she managed to loose  a whole folder on Thunderbird.
She claims she tried to move the folder from a tree directory structure (see : 
sub-sub-folder)
she created for herself to another place underneath root.

Additionaly, she managed to mangle things up since she used on TB characters 
like 

/  \ and  . So thunderbird refuses to access those sub-folders on the 
folder tree
and I cannot rename them (in order to have later access).

Here's dovecot info :

--

# 1.2.16: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-194.17.4.el5 i686 CentOS release 5.5 (Final) ext3
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot/dovecot.log
info_log_path: /var/log/dovecot/dovecot-info.log
ssl_parameters_regenerate: 48
verbose_ssl: yes
login_dir: /var/run/dovecot//login
login_executable: /usr/local/dovecot/libexec/dovecot/imap-login
login_greeting: * Dovecot ready *
login_max_processes_count: 64
mail_location: maildir:/var/MailRoot/domains/%d/%n/Maildir
mail_plugins: zlib
auth default:
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: passwd-file
    args: /etc/dovecot/passwd
  passdb:
    driver: pam
  userdb:
    driver: static
    args: uid=vmail gid=vmail home=/home/vmail/%u
  userdb:
    driver: passwd
--


TIA,

s.



 

I merely function as a channel that filters 
music through the chaos of noise
- Vangelis

Re: [Dovecot] Possible signed/unsigned bug in libdovecot-storage (2:2.0.14 )

2011-09-05 Thread Kui Zhang
On Sun, Sep 4, 2011 at 8:45 AM, Timo Sirainen t...@iki.fi wrote:
 On Sat, 2011-09-03 at 02:29 -0700, Kui Zhang wrote:
   Message has been copied too many times (32767+1)
 it is mdbox, file size 10M

 I dont know if the message was ever copy that many times. I dont know
 any way to tell.

 I'm pretty sure the message has been copied that many times. Possibly
 related to some lazy-expunge bug.. You could check this manually by:

 I was able to trigger the error message with following.
 a uid copy 726974 inbox_2

 First you'll need to find map_uid of the message:

 map_uid=`doveadm dump ~/mdbox/mailboxes/INBOX/dbox-Mails/|grep -A 10 
 uid=726974|grep -w map_uid|awk '{print $4}'`

 Next you can check that the reference count for the message really is
 32767:


The ref counter was 32767.


 doveadm dump ~/mdbox/storage|grep -A 5 uid=$map_uid | grep -w ref

 And finally check where that message has actually been copied to:

 printf '#!/bin/sh\necho $1;doveadm dump $1 | grep map_uid.*\\b$2\\$ | wc 
 -l\n'  /tmp/find.sh
 find ~/mdbox -name dbox-Mails -exec /tmp/find.sh {} $map_uid \;



The message was copied to a secondary folder. The action match one of
the client side filter rules.

I found 3k other messages with same problem. They all have delete flag.

I upgraded dovecot the night before. I seen plugin errors during
upgrade, in the pass. Do you think client made multiple copies during
plugin upgrade? I will turn on debug logging for next upgrade.

What else can I do, in order to track down the problem?


thanks
KuiZ




Re: [Dovecot] Possible signed/unsigned bug in libdovecot-storage (2:2.0.14 )

2011-09-05 Thread Timo Sirainen
On 5.9.2011, at 13.11, Kui Zhang wrote:

 First you'll need to find map_uid of the message:
 
 map_uid=`doveadm dump ~/mdbox/mailboxes/INBOX/dbox-Mails/|grep -A 10 
 uid=726974|grep -w map_uid|awk '{print $4}'`
 
 Next you can check that the reference count for the message really is
 32767:
 
 The ref counter was 32767.

Well, see what happens if you try to rebuild the dbox indexes. Does the counter 
shrink or is it the same? If it stays the same, the message was actually copied 
32767 times somewhere..

doveadm force-resync -u user@domain INBOX

 I upgraded dovecot the night before. I seen plugin errors during
 upgrade, in the pass. Do you think client made multiple copies during
 plugin upgrade? I will turn on debug logging for next upgrade.

Having 32767 copies of the message is a bit strange. Debug logging won't show 
anything, but you could enable mail_log plugin and it'll log about each copy 
operation.



Re: [Dovecot] v2.1.alpha1 released

2011-09-05 Thread Frank Elsner
On Sun, 04 Sep 2011 18:34:13 +0300 Timo Sirainen wrote:
 On Thu, 2011-09-01 at 21:09 +0200, Frank Elsner wrote:
  But when I stop dovecot I get
  
  Sep  1 17:08:17 seymour dovecot: master: Warning: Killed with signal 15 (by 
  pid=7896 uid=0 code=kill)
  Sep  1 17:08:17 seymour dovecot: anvil: Panic: file master-service.c: line 
  584 (master_service_client_connection_de
  stroyed): assertion failed: (service-total_available_count  0)
 
 http://hg.dovecot.org/dovecot-2.1/rev/66453d942761 should fix this.

Works.


--Frank Elsner


[Dovecot] 2.1.alpha1: SIGSEGV on EXPUNGE

2011-09-05 Thread Lutz Preßler
Hi,

I upgraded my test installation from Debian lenny with latest
2.0.14 auto builds to squeeze with v2.1.alpha1 (amd64) auto builds.
(From /var/log/mail.log:
  Sep  5 12:34:45 pressler dovecot: master: Dovecot v2.1.alpha1 starting up 
(core dumps disabled)
No hg hash tag in log output anymore?)

Now the imap processes segfault on every EXPUNGE command:

Excerpt from telnet session:
0 store 1585:1585 flags \Deleted
* 1585 FETCH (FLAGS (\Deleted))
0 OK Store completed.
0 expunge

Log output:
Sep  5 15:40:59 pressler dovecot: imap(2580, lpmail): delete: box=INBOX, 
uid=34722, msgid=e1r0zjw-00frf7...@intern.sernet.de, size=1980, vsize=2031, 
from=Lutz Pressler lutz.press...@sernet.de, flags=(\Deleted)
Sep  5 15:41:22 pressler dovecot: imap(2580, lpmail): expunge: box=INBOX, 
uid=34722, msgid=e1r0zjw-00frf7...@intern.sernet.de, size=1980, vsize=2031, 
from=Lutz Pressler lutz.press...@sernet.de, flags=(\Deleted)
Sep  5 15:41:22 pressler dovecot: master: Error: service(imap): child 2580 
killed with signal 11 (core dumps disabled)

Also happens with mail_log plugin disabled.

Any idea? Configuration on request (or tests with core dumps enabled).

Regards,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] 2.1.alpha1: SIGSEGV on EXPUNGE

2011-09-05 Thread Timo Sirainen
On 5.9.2011, at 17.00, Lutz Preßler wrote:

 (From /var/log/mail.log:
  Sep  5 12:34:45 pressler dovecot: master: Dovecot v2.1.alpha1 starting up 
 (core dumps disabled)
 No hg hash tag in log output anymore?)

You have exactly the alpha1 version without any further commits.

 Sep  5 15:41:22 pressler dovecot: master: Error: service(imap): child 2580 
 killed with signal 11 (core dumps disabled)
 
 Any idea? Configuration on request (or tests with core dumps enabled).

gdb backtrace is always very helpful in figuring out crashes. 
http://dovecot.org/bugreport.html



Re: [Dovecot] limit number of simultaneous lmtp deliveries ?

2011-09-05 Thread Timo Sirainen
On Mon, 2011-09-05 at 11:05 +0200, Jan-Frode Myklebust wrote:
 We have quite a few frontend mail gateways that deliver incoming
 email trough our dovecot director (lmtp proxy) to the backend lmtp
 servers, and are seeing this logged on the frontend mail gateways:
 
   Sep  5 10:51:56 mailgw1 postfix/lmtp[23443]: 0E2F41C01A: 
 to=m...@example.com, relay=loadbalancers.example.com[192.168.42.15]:24, 
 delay=61, delays=0.02/0.3/31/30, dsn=4.4.0, status=deferred (host 
 loadbalancers.example.com[192.168.42.15] said: 451 4.4.0 Remote server not 
 answering (DATA output timeout) (in reply to end of DATA command))
 
 It's a bit unclear to me if this leads to duplicate deliveries, or just
 delayed deliveries, 

Possibly randomly either one. I'll need to start looking into these LMTP
proxy bugs some day.. Although for 2.0.14 I improved the error messages
a little. Is this from 2.0.14 or earlier?

 but -- is there any way to limit the number of
 simultanous deliveries on either the dovecot director or the backend
 lmtp-servers ? 
 
 Will process_limit=10 work for service lmtp? 

It'll work for both directory and backend, yes. Although each lmtp
process can also handle multiple clients. So you might also want to set
client_limit=1. Actually that could be a good idea to try in any case to
see if it helps with these problems.





[Dovecot] Mail files?

2011-09-05 Thread Knute Johnson
I have a Ubuntu server running dovecot 1.2.9 with mail in mbox.  There 
are mail files in /var/mail/user and there are mail files in 
/home/user/mail that correspond to the IMAP folders.  In the config file 
details below it shows mail_location: mbox:~/mail:INBOX=/var/mail/%u, 
does that put the INBOX in /var/mail?  Is INBOX in /var/mail/user to 
allow local delivery or something?  If I was using POP3 instead would 
all the mail be in the INBOX?


Can I backup these files by just copying and if a file is destroyed, 
copy them back?


# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-33-generic i686 Ubuntu 10.04.3 LTS
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps
ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
mail_max_userip_connections: 16
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/mail/%u
mbox_write_locks: fcntl dotlock
imap_capability: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND 
UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 ESEARCH 
ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS

auth default:
  passdb:
driver: pam
  userdb:
driver: passwd

Thanks,

--

Knute Johnson
knute2...@knutejohnson.com


Re: [Dovecot] Mail files?

2011-09-05 Thread Jakob Curdes

Am 05.09.2011 19:52, schrieb Knute Johnson:
I have a Ubuntu server running dovecot 1.2.9 with mail in mbox.  There 
are mail files in /var/mail/user and there are mail files in 
/home/user/mail that correspond to the IMAP folders.  In the config 
file details below it shows mail_location: 
mbox:~/mail:INBOX=/var/mail/%u, does that put the INBOX in /var/mail?

yes.
  Is INBOX in /var/mail/user to allow local delivery or something?  If 
I was using POP3 instead would all the mail be in the INBOX?
.. or on your local PC. If you do not want the /var/mail delivery, why 
not just change the mail_location to point to the home dir only?


Can I backup these files by just copying and if a file is destroyed, 
copy them back?

Yes, as they are plain mbox format.

cheers jc





# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-33-generic i686 Ubuntu 10.04.3 LTS
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps
ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
mail_max_userip_connections: 16
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/mail/%u
mbox_write_locks: fcntl dotlock
imap_capability: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND 
UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 ESEARCH 
ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS

auth default:
  passdb:
driver: pam
  userdb:
driver: passwd

Thanks,





Re: [Dovecot] Mail files?

2011-09-05 Thread Knute Johnson

On 9/5/2011 10:59 AM, Jakob Curdes wrote:

Is INBOX in /var/mail/user to allow local delivery or something? If I
was using POP3 instead would all the mail be in the INBOX?

.. or on your local PC. If you do not want the /var/mail delivery, why
not just change the mail_location to point to the home dir only?


I would also have to change where the program that sendmail uses to 
deliver mail delivers the mail, correct?


Thanks very much,

--


Knute Johnson


Re: [Dovecot] Mail files?

2011-09-05 Thread Jakob Curdes

.. or on your local PC. If you do not want the /var/mail delivery, why

not just change the mail_location to point to the home dir only?


I would also have to change where the program that sendmail uses to 
deliver mail delivers the mail, correct?

Yes, often this is procmail.

You can set this in the respective config file with

MAILDIR=$HOME

Attention: Maildir here just is the mailbox location, procmail assumes 
the mbox format by default. If you actually use the Maildir _/format/_,

you must specify

MAILDIR=$HOME/



HTH,
Jakob Curdes



Re: [Dovecot] Mail files?

2011-09-05 Thread Knute Johnson

On 9/5/2011 1:31 PM, Jakob Curdes wrote:

.. or on your local PC. If you do not want the /var/mail delivery, why

not just change the mail_location to point to the home dir only?


I would also have to change where the program that sendmail uses to
deliver mail delivers the mail, correct?

Yes, often this is procmail.

You can set this in the respective config file with

MAILDIR=$HOME

Attention: Maildir here just is the mailbox location, procmail assumes
the mbox format by default. If you actually use the Maildir _/format/_,
you must specify

MAILDIR=$HOME/



HTH,
Jakob Curdes




Thanks very much Jakob.  I'm still trying to figure out what program is 
actually doing the local delivery.  I'll post results when I figure that 
one out.


Thanks again,

--


Knute Johnson