[Dovecot] Dovecot deliver Segmentation fault when arrive the first message

Alessio Cecchi alessio at skye.it
Wed Sep 19 13:54:33 EEST 2012


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 at demo-vpop ~ # tree 
/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/ -a
/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/
├── cur
├── maildirsize
├── new
└── tmp

root at demo-vpop ~ # cat testmail.txt | 
/usr/local/dovecot-2.1/libexec/dovecot/deliver -d cecchi2 at qboxdns.it
Segmentation fault

root at demo-vpop ~ # echo $?
139

root at 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 at 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 at qboxdns.it): 
lookup user=cecchi2 domain=qboxdns.it
Sep 19 12:06:50 auth: Debug: master out: USER 1 cecchi2 at 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 at 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 at qboxdns.it): Debug: Effective uid=89, 
gid=89, home=/home/vpopmail/domains/qboxdns.it/cecchi2
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota root: 
name=UserQuota backend=maildir args=
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota rule: 
root=UserQuota mailbox=* bytes=10485760 messages=0
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota rule: 
root=UserQuota mailbox=Trash bytes=+104857600 messages=0
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota root: name=User 
quota backend=dict args=:noenforcing:proxy::quota
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: dict quota: 
user=cecchi2 at qboxdns.it, uri=proxy::quota, noenforcing=1
Sep 19 12:06:50 lda(cecchi2 at 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 at 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 at 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 at qboxdns.it): Debug: acl: acl username = 
cecchi2 at qboxdns.it
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: acl: owner = 1
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: acl vfile: Global ACL 
directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls
Sep 19 12:06:50 lda(cecchi2 at 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 at qboxdns.it): Debug: shared: 
root=/usr/local/dovecot-2.1/var/run/dovecot, index=, control=, inbox=, alt=
Sep 19 12:06:50 lda(cecchi2 at 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 at qboxdns.it): Debug: acl: acl username = 
cecchi2 at qboxdns.it
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: acl: owner = 0
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: acl vfile: Global ACL 
directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota root: 
name=UserQuota backend=maildir args=
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Quota root: name=User 
quota backend=dict args=:noenforcing:proxy::quota
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: dict quota: user=raw 
mail user, uri=proxy::quota, noenforcing=1
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: none: root=, index=, 
control=, inbox=, alt=
Sep 19 12:06:50 lda(cecchi2 at qboxdns.it): Debug: Destination address: 
cecchi2 at qboxdns.it (source: user at hostname)
Sep 19 12:06:50 lda(cecchi2 at 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 at qboxdns.it): Info: 
msgid=<5059979E.3080402 at cecchi.biz>: saved mail to INBOX
Sep 19 12:06:50 lda(cecchi2 at 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 at 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 at qboxdns.it): Debug: acl vfile: file 
/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/dovecot-acl not found
Sep 19 12:06:50 lda(cecchi2 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at qboxdns.it): Debug: acl vfile: file 
/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/.Sent/dovecot-acl not 
found


now works fine:

root at demo-vpop ~ # cat testmail.txt | 
/usr/local/dovecot-2.1/libexec/dovecot/deliver -d cecchi2 at qboxdns.it

Sep 19 12:08:18 auth: Debug: master in: USER 1 cecchi2 at 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 at qboxdns.it): 
lookup user=cecchi2 domain=qboxdns.it
Sep 19 12:08:18 auth: Debug: master out: USER 1 cecchi2 at 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 at 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 at qboxdns.it): Debug: Effective uid=89, 
gid=89, home=/home/vpopmail/domains/qboxdns.it/cecchi2
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota root: 
name=UserQuota backend=maildir args=
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota rule: 
root=UserQuota mailbox=* bytes=10485760 messages=0
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota rule: 
root=UserQuota mailbox=Trash bytes=+104857600 messages=0
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota root: name=User 
quota backend=dict args=:noenforcing:proxy::quota
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: dict quota: 
user=cecchi2 at qboxdns.it, uri=proxy::quota, noenforcing=1
Sep 19 12:08:18 lda(cecchi2 at 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 at 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 at 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 at qboxdns.it): Debug: acl: acl username = 
cecchi2 at qboxdns.it
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: acl: owner = 1
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: acl vfile: Global ACL 
directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls
Sep 19 12:08:18 lda(cecchi2 at 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 at qboxdns.it): Debug: shared: 
root=/usr/local/dovecot-2.1/var/run/dovecot, index=, control=, inbox=, alt=
Sep 19 12:08:18 lda(cecchi2 at 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 at qboxdns.it): Debug: acl: acl username = 
cecchi2 at qboxdns.it
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: acl: owner = 0
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: acl vfile: Global ACL 
directory: /usr/local/dovecot-2.1/etc/dovecot/global-acls
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota root: 
name=UserQuota backend=maildir args=
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Quota root: name=User 
quota backend=dict args=:noenforcing:proxy::quota
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: dict quota: user=raw 
mail user, uri=proxy::quota, noenforcing=1
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: none: root=, index=, 
control=, inbox=, alt=
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Debug: Destination address: 
cecchi2 at qboxdns.it (source: user at hostname)
Sep 19 12:08:18 lda(cecchi2 at qboxdns.it): Info: 
msgid=<5059979E.3080402 at cecchi.biz>: saved mail to INBOX
Sep 19 12:08:18 lda(cecchi2 at 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 at 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 at qboxdns.it): Debug: acl vfile: file 
/home/vpopmail/domains/qboxdns.it/cecchi2/Maildir/dovecot-acl not found
Sep 19 12:08:18 lda(cecchi2 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 = </etc/ssl/certs/wildcard-cbsolt.pem
ssl_key = </etc/ssl/private/wildcard-cbsolt.key
userdb {
args = quota_template=quota_rule=*:backend=%q
driver = vpopmail
}
protocol lda {
log_path = /var/log/dovecot/lda.log
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
mail_max_userip_connections = 20
mail_plugins = quota acl imap_quota imap_acl
}
protocol pop3 {
mail_max_userip_connections = 5
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}

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




More information about the dovecot mailing list