[Dovecot] odd behavior with Dovecot LDA
Okay, to convince myself that quota handling was working okay with Dovecot 1.0-rc27 on Solaris 10, I tested sending a message to an account that was purposely over-quota. The account in question had a vacation message set up.
For the first test, there was no $HOME/.imap directory at all. I received the vacation message, but the message which was supposed to be delivered locally queued in Postfix (temporary failure).
For the second test, I created $HOME/.imap and $HOME/.imap/INBOX directories with the owner and group set to that of the user (just to make sure the code handled things the same). Again, I received the vacation message, but the message which was supposed to be delivered locally bounced back to me after Dovecot LDA crashed:
syst0005@peridot.tc.umn.edu: Command died with status 139: "/opt/dovecot/libexec/dovecot/deliver -f "$SENDER"". Command output: Segmentation Fault
It appears that Dovecot LDA assumes that if .imap/FOLDERNAME exists that the index files must also exist.. I wonder what other assumptions might cause segfaults.
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On 27.3.2007, at 22.40, Steven F Siirila wrote:
For the first test, there was no $HOME/.imap directory at all. I received the vacation message, but the message which was supposed to be delivered locally queued in Postfix (temporary failure).
Fixed: http://dovecot.org/list/dovecot-cvs/2007-March/008382.html
For the second test, I created $HOME/.imap and $HOME/.imap/INBOX directories with the owner and group set to that of the user (just to make sure the code handled things the same). Again, I received the vacation message, but the message which was supposed to be delivered locally bounced back to me after Dovecot LDA crashed:
syst0005@peridot.tc.umn.edu: Command died with status 139: "/opt/ dovecot/libexec/dovecot/deliver -f "$SENDER"". Command output:
Segmentation Fault
Could you get gdb backtrace? Although it's possible that it's already
fixed. I can't reproduce any out-of-quota problems with current CVS
code.
You could also try running it manually:
echo hello | deliver -d username
On Tue, Mar 27, 2007 at 11:02:28PM +0300, Timo Sirainen wrote:
On 27.3.2007, at 22.40, Steven F Siirila wrote:
For the first test, there was no $HOME/.imap directory at all. I received the vacation message, but the message which was supposed to be delivered locally queued in Postfix (temporary failure).
Fixed: http://dovecot.org/list/dovecot-cvs/2007-March/008382.html
In rc28 or the upcoming rc29?
For the second test, I created $HOME/.imap and $HOME/.imap/INBOX directories with the owner and group set to that of the user (just to make sure the code handled things the same). Again, I received the vacation message, but the message which was supposed to be delivered locally bounced back to me after Dovecot LDA crashed:
syst0005@peridot.tc.umn.edu: Command died with status 139: "/opt/ dovecot/libexec/dovecot/deliver -f "$SENDER"". Command output:
Segmentation FaultCould you get gdb backtrace? Although it's possible that it's already
fixed. I can't reproduce any out-of-quota problems with current CVS
code.
I have been trying to get a core, but haven't succeeded thus far. I have set "mail_drop_priv_before_exec = yes", but I'm not sure this applies to the LDA... I ran a find to locate the core, but there isn't one. I do have "ulimit -c unlimited" in effect, too.
You could also try running it manually:
echo hello | deliver -d username
Doing so yields this error:
Mar 28 13:41:37 myhostname deliver(myuser): net_connect(/var/opt/dovecot/run/dovecot/auth-master) failed: No such file or directory
Not sure how my environment is different than when Postfix calls deliver...
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On 28.3.2007, at 21.42, Steven F Siirila wrote:
On Tue, Mar 27, 2007 at 11:02:28PM +0300, Timo Sirainen wrote:
On 27.3.2007, at 22.40, Steven F Siirila wrote:
For the first test, there was no $HOME/.imap directory at all. I received the vacation message, but the message which was supposed to be delivered locally queued in Postfix (temporary failure).
Fixed: http://dovecot.org/list/dovecot-cvs/2007-March/008382.html
In rc28 or the upcoming rc29?
rc29
For the second test, I created $HOME/.imap and $HOME/.imap/INBOX directories with the owner and group set to that of the user (just to make sure the code handled things the same). Again, I received the vacation message, but the message which was supposed to be delivered locally bounced back to me after Dovecot LDA crashed:
syst0005@peridot.tc.umn.edu: Command died with status 139: "/opt/ dovecot/libexec/dovecot/deliver -f "$SENDER"". Command output: Segmentation Fault
Could you get gdb backtrace? Although it's possible that it's already fixed. I can't reproduce any out-of-quota problems with current CVS code.
I have been trying to get a core, but haven't succeeded thus far.
I have set "mail_drop_priv_before_exec = yes", but I'm not sure this
applies to the LDA... I ran a find to locate the core, but there isn't one.
I do have "ulimit -c unlimited" in effect, too.
mail_drop_priv_before_exec doesn't affect deliver. Also I don't know
if Postfix preserves ulimits.
You could also try running it manually:
echo hello | deliver -d username
Doing so yields this error:
Mar 28 13:41:37 myhostname deliver(myuser): net_connect(/var/opt/ dovecot/run/dovecot/auth-master) failed: No such file or directory
Not sure how my environment is different than when Postfix calls
deliver...
Is the deliver binary the same? What is the correct socket path?
Maybe they're using different config files.
On Wed, Mar 28, 2007 at 10:39:45PM +0300, Timo Sirainen wrote: . . .
You could also try running it manually:
echo hello | deliver -d username
Doing so yields this error:
Mar 28 13:41:37 myhostname deliver(myuser): net_connect(/var/opt/ dovecot/run/dovecot/auth-master) failed: No such file or directory
Not sure how my environment is different than when Postfix calls
deliver...Is the deliver binary the same? What is the correct socket path?
Maybe they're using different config files.
There is only one deliver binary on the host in question.
Here's our current dovecot -n output for the host in question:
# /etc/opt/dovecot/dovecot.conf syslog_facility: local6 protocols: imap imaps pop3 pop3s listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 ssl_cert_file: /etc/opt/openssl/certs/dovecot.pem ssl_key_file: /etc/opt/openssl/private/dovecot.pem shutdown_clients: no login_dir: /var/opt/dovecot/run/dovecot/login login_executable(default): /opt/dovecot/libexec/dovecot/imap-login login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login login_processes_count: 32 login_max_processes_count: 4096 max_mail_processes: 8192 first_valid_uid: 100 default_mail_env: mbox:~/:INBOX=/var/mail/%u mail_location: mbox:~/:INBOX=/var/mail/%u mail_full_filesystem_access: yes mbox_lazy_writes: no mail_executable(default): /opt/dovecot/libexec/dovecot/imap mail_executable(imap): /opt/dovecot/libexec/dovecot/imap mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3 mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle tb-extra-mailbox-sep imap_client_workarounds(pop3): outlook-idle pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv namespace: type: private separator: / location: mbox:~/:INBOX=/var/mail/%u inbox: yes hidden: yes auth default: username_format: %Lu verbose: yes debug: yes passdb: driver: pam args: session=yes * userdb: driver: passwd
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On 28.3.2007, at 22.50, Steven F Siirila wrote:
Mar 28 13:41:37 myhostname deliver(myuser): net_connect(/var/opt/ dovecot/run/dovecot/auth-master) failed: No such file or directory
Not sure how my environment is different than when Postfix calls deliver...
Oh. So you're not using the -d parameter with Postfix. Then run only:
echo hello|./deliver
as the user who you want to deliver the mail to.
On Tue, Mar 27, 2007 at 11:02:28PM +0300, Timo Sirainen wrote: . . .
On 27.3.2007, at 22.40, Steven F Siirila wrote:
For the second test, I created $HOME/.imap and $HOME/.imap/INBOX directories with the owner and group set to that of the user (just to make sure the code handled things the same). Again, I received the vacation message, but the message which was supposed to be delivered locally bounced back to me after Dovecot LDA crashed:
syst0005@peridot.tc.umn.edu: Command died with status 139: "/opt/ dovecot/libexec/dovecot/deliver -f "$SENDER"". Command output:
Segmentation FaultCould you get gdb backtrace? Although it's possible that it's already
fixed. I can't reproduce any out-of-quota problems with current CVS
code.
(gdb) bt #0 mail_cache_register_fields (cache=0x0, fields=0xbfd90, fields_count=9) at mail-cache-fields.c:72 #1 0x00045fc4 in index_storage_mailbox_init (ibox=0xbf9a8, name=0xbfd90 "", flags=12, move_to_memory=false) at index-storage.c:254 #2 0x0002ad70 in mbox_alloc (storage=0xae5e0, index=0xc23e0, name=0x83408 "INBOX", path=0xae678 "/var/mail/syst0006", flags=12) at mbox-storage.c:561 #3 0x0002af00 in mbox_open (storage=0xae5e0, name=0x83408 "INBOX", flags=12) at mbox-storage.c:677 #4 0x0002b11c in mbox_mailbox_open (_storage=0xae5e0, name=0x80588 "INBOX", input=0x0, flags=12) at mbox-storage.c:788 #5 0x00060134 in mailbox_open (storage=0xae5e0, name=0x80588 "INBOX", input=0x0, flags=12) at mail-storage.c:365 #6 0x0001d630 in deliver_save (storage=0xae5e0, mailbox=0x80588 "INBOX", mail=0xbec38, flags=0, keywords=0x0) at deliver.c:84 #7 0x0001e57c in main (argc=669592, argv=0xa3810) at deliver.c:677
--
Steven F. Siirila Office: Lind Hall, Room 130B Internet Services E-mail: sfs@umn.edu Office of Information Technology Voice: (612) 626-0244 University of Minnesota Fax: (612) 626-7593
On 28.3.2007, at 23.58, Steven F Siirila wrote:
Could you get gdb backtrace? Although it's possible that it's already fixed. I can't reproduce any out-of-quota problems with current CVS code.
(gdb) bt #0 mail_cache_register_fields (cache=0x0, fields=0xbfd90,
fields_count=9) at mail-cache-fields.c:72 #1 0x00045fc4 in index_storage_mailbox_init (ibox=0xbf9a8,
name=0xbfd90 "", flags=12, move_to_memory=false) at index-storage.c:254
Thanks. Although I found and fixed this one a few days ago :)
http://www.dovecot.org/list/dovecot-cvs/2007-March/008368.html
participants (2)
-
Steven F Siirila
-
Timo Sirainen