Hi,
I have found this strange problem. I'm working with Debian 6, dovecot 2.1.9 and vpopmail-auth.
LDA is configured and works fine but the problem is when the first message arrive "dovecot-lda" return a "Segmentation fault", the message is written to the user's Mailbox but the message remains, also, in the queue of qmail (deferral: Segmentation_fault/) and at the second attempt is delivered fine.
If disable ACL (acl and imap_acl from mail_plugins) in dovecot.conf "Segmentation fault" go away. Moreover, without ACL at the first delivery folders like Sent, Drafts, Trash, Spam appear immediately.
An example,
new user:
root@demo-vpop ~ # tree /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/ -a /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/ ├── cur ├── maildirsize ├── new └── tmp
root@demo-vpop ~ # cat testmail.txt | /usr/local/dovecot-2.1/libexec/dovecot/deliver -d cecchi2@qboxdns.it Segmentation fault
root@demo-vpop ~ # echo $? 139
root@demo-vpop ~ # tree /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/ -a /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/ ├── cur ├── dovecot-acl-list ├── dovecot.index.cache ├── dovecot.index.log ├── dovecot-uidlist ├── dovecot-uidvalidity ├── dovecot-uidvalidity.50599a7f ├── maildirsize ├── new │ └── 1348049535.M21758P19264.demo-vpop.cbsolt.net,S=2025,W=2071 └── tmp
dovecot log (with ulimit -c unlimited before starting Dovecot):
Sep 19 12:06:50 auth: Debug: Loading modules from directory: /usr/local/dovecot-2.1/lib/dovecot/auth Sep 19 12:06:50 auth: Debug: master in: USER 1 cecchi2@qboxdns.it service=lda Sep 19 12:06:50 auth-worker(18728): Debug: Loading modules from directory: /usr/local/dovecot-2.1/lib/dovecot/auth Sep 19 12:06:50 auth-worker(18728): Debug: vpopmail(cecchi2@qboxdns.it): lookup user=cecchi2 domain=qboxdns.it Sep 19 12:06:50 auth: Debug: master out: USER 1 cecchi2@qboxdns.it uid=89 gid=89 home=/home/vpopmail/domains/qboxdns.it/cecchi2 quota_rule=*:backend=10485760S Sep 19 12:06:50 dict: Info: mysql(localhost): Connected to database dovecot
lda log:
Sep 19 12:06:50 lda: Debug: Loading modules from directory: /usr/local/dovecot-2.1/lib/dovecot Sep 19 12:06:50 lda: Debug: Module loaded: /usr/local/dovecot-2.1/lib/dovecot/lib01_acl_plugin.so Sep 19 12:06:50 lda: Debug: Module loaded: /usr/local/dovecot-2.1/lib/dovecot/lib10_quota_plugin.so Sep 19 12:06:50 lda: Debug: auth input: cecchi2@qboxdns.it uid=89 gid=89 home=/home/vpopmail/domains/qboxdns.it/cecchi2 quota_rule=*:backend=10485760S Sep 19 12:06:50 lda: Debug: Added userdb setting: plugin/quota_rule=*:backend=10485760S Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Effective uid=89, gid=89, home=/home/vpopmail/domains/qboxdns.it/cecchi2 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota root: name=UserQuota backend=maildir args= Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota rule: root=UserQuota mailbox=* bytes=10485760 messages=0 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota rule: root=UserQuota mailbox=Trash bytes=+104857600 messages=0 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota root: name=User quota backend=dict args=:noenforcing:proxy::quota Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: dict quota: user=cecchi2@qboxdns.it, uri=proxy::quota, noenforcing=1 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Namespace inbox: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: maildir++: root=/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir, index=, control=, inbox=/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir, alt= Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: initializing backend with data: vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: acl username = cecchi2@qboxdns.it Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: owner = 1 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: Global ACL directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Namespace : type=shared, prefix=shared/%n/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/Maildir/shared/%u Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: shared: root=/usr/local/dovecot-2.1/var/run/dovecot, index=, control=, inbox=, alt= Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: initializing backend with data: vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: acl username = cecchi2@qboxdns.it Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl: owner = 0 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: Global ACL directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota root: name=UserQuota backend=maildir args= Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Quota root: name=User quota backend=dict args=:noenforcing:proxy::quota Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: dict quota: user=raw mail user, uri=proxy::quota, noenforcing=1 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: none: root=, index=, control=, inbox=, alt= Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Destination address: cecchi2@qboxdns.it (source: user@hostname) Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: Namespace : Using permissions from /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir: mode=0700 gid=-1 Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Info: msgid=5059979E.3080402@cecchi.biz: saved mail to INBOX Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/INBOX not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/dovecot-acl not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Drafts not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Drafts/dovecot-acl not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Spam not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Spam/dovecot-acl not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Trash not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Trash/dovecot-acl not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Sent not found Sep 19 12:06:50 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Sent/dovecot-acl not found
now works fine:
root@demo-vpop ~ # cat testmail.txt | /usr/local/dovecot-2.1/libexec/dovecot/deliver -d cecchi2@qboxdns.it
Sep 19 12:08:18 auth: Debug: master in: USER 1 cecchi2@qboxdns.it service=lda Sep 19 12:08:18 auth-worker(18763): Debug: Loading modules from directory: /usr/local/dovecot-2.1/lib/dovecot/auth Sep 19 12:08:18 auth-worker(18763): Debug: vpopmail(cecchi2@qboxdns.it): lookup user=cecchi2 domain=qboxdns.it Sep 19 12:08:18 auth: Debug: master out: USER 1 cecchi2@qboxdns.it uid=89 gid=89 home=/home/vpopmail/domains/qboxdns.it/cecchi2 quota_rule=*:backend=10485760S Sep 19 12:08:18 dict: Info: mysql(localhost): Connected to database dovecot
Sep 19 12:08:18 lda: Debug: Loading modules from directory: /usr/local/dovecot-2.1/lib/dovecot Sep 19 12:08:18 lda: Debug: Module loaded: /usr/local/dovecot-2.1/lib/dovecot/lib01_acl_plugin.so Sep 19 12:08:18 lda: Debug: Module loaded: /usr/local/dovecot-2.1/lib/dovecot/lib10_quota_plugin.so Sep 19 12:08:18 lda: Debug: auth input: cecchi2@qboxdns.it uid=89 gid=89 home=/home/vpopmail/domains/qboxdns.it/cecchi2 quota_rule=*:backend=10485760S Sep 19 12:08:18 lda: Debug: Added userdb setting: plugin/quota_rule=*:backend=10485760S Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Effective uid=89, gid=89, home=/home/vpopmail/domains/qboxdns.it/cecchi2 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota root: name=UserQuota backend=maildir args= Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota rule: root=UserQuota mailbox=* bytes=10485760 messages=0 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota rule: root=UserQuota mailbox=Trash bytes=+104857600 messages=0 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota root: name=User quota backend=dict args=:noenforcing:proxy::quota Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: dict quota: user=cecchi2@qboxdns.it, uri=proxy::quota, noenforcing=1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace inbox: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: maildir++: root=/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir, index=, control=, inbox=/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir, alt= Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: initializing backend with data: vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: acl username = cecchi2@qboxdns.it Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: owner = 1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: Global ACL directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : type=shared, prefix=shared/%n/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/Maildir/shared/%u Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: shared: root=/usr/local/dovecot-2.1/var/run/dovecot, index=, control=, inbox=, alt= Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: initializing backend with data: vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: acl username = cecchi2@qboxdns.it Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl: owner = 0 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: Global ACL directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota root: name=UserQuota backend=maildir args= Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Quota root: name=User quota backend=dict args=:noenforcing:proxy::quota Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: dict quota: user=raw mail user, uri=proxy::quota, noenforcing=1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: none: root=, index=, control=, inbox=, alt= Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Destination address: cecchi2@qboxdns.it (source: user@hostname) Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Info: msgid=5059979E.3080402@cecchi.biz: saved mail to INBOX Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/INBOX not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/dovecot-acl not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Drafts not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Drafts/dovecot-acl not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Drafts doesn't exist yet, using default permissions Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : Using permissions from /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir: mode=0700 gid=-1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Spam not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Spam/dovecot-acl not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Spam doesn't exist yet, using default permissions Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : Using permissions from /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir: mode=0700 gid=-1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Trash not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Trash/dovecot-acl not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Trash doesn't exist yet, using default permissions Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : Using permissions from /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir: mode=0700 gid=-1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls/Sent not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Sent/dovecot-acl not found Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Sent doesn't exist yet, using default permissions Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: Namespace : Using permissions from /home/vpopmail/domains/qboxdns.it/cecchi2/Maildir: mode=0700 gid=-1 Sep 19 12:08:18 lda(cecchi2@qboxdns.it): Debug: acl vfile: file /usr/local/dovecot-2.1/etc/dovecot/global-acls//.DEFAULT not found
# 2.1.9: /usr/local/dovecot-2.1/etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.5 auth_cache_size = 512 k auth_debug = yes auth_debug_passwords = yes auth_verbose = yes auth_worker_max_count = 60 default_login_user = nobody dict { acl = mysql:/usr/local/dovecot-2.1/etc/dovecot/dovecot-share-folder.conf quota = mysql:/usr/local/dovecot-2.1/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no dotlock_use_excl = no first_valid_gid = 89 first_valid_uid = 89 last_valid_gid = 89 last_valid_uid = 89 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot/dovecot.log mail_debug = yes mail_fsync = always mail_location = maildir:~/Maildir mail_nfs_index = yes mail_nfs_storage = yes mail_plugins = quota acl maildir_very_dirty_syncs = yes mmap_disable = yes namespace { list = children location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u prefix = shared/%%n/ separator = / subscriptions = no type = shared } namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } passdb { args = cache_key=%s%u webmail=192.168.113.215 driver = vpopmail } plugin { acl = vfile:/usr/local/dovecot-2.1/etc/dovecot/global-acls:cache_secs=300 acl_shared_dict = proxy::acl quota = maildir:UserQuota quota2 = dict:User quota::noenforcing:proxy::quota quota_rule2 = Trash:storage=+100M } protocols = imap pop3 sendmail_path = /var/qmail/bin/sendmail service auth { unix_listener auth-userdb { group = vchkpw mode = 0660 user = vpopmail } } service dict { unix_listener dict { group = vchkpw mode = 0660 user = vpopmail } } service imap-login { service_count = 0 } service pop3-login { service_count = 0 } ssl_cert =
Thanks
-- Alessio Cecchi is: @ ILS -> http://www.linux.it/~alessice/ on LinkedIn -> http://www.linkedin.com/in/alessice Assistenza Sistemi GNU/Linux -> http://www.cecchi.biz/ @ PLUG -> ex-Presidente, adesso senatore a vita, http://www.prato.linux.it