[Dovecot] Dovecot 2.0 beta4 and Expire Plugin
Hello,
there seems to be an error writing into the expire database defined by dict.
dict { expire = sqlite:/usr/dovecot/etc/dovecotbeta-dict-expire.conf } ... plugin { ... expire = AutoCleanSpam 1d expire_dict = proxy::expire }
with dovecotbeta-dict-expire.conf: connect = /test/addons/expire/expiresbeta.db
map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp
fields { username = $user mailbox = $mailbox } }
sqlite shows schema: CREATE TABLE expires ( username varchar(100) not null, mailbox varchar(255) not null, expire_stamp integer not null, primary key (username, mailbox) ); CREATE TRIGGER mergeexpires BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END;
Delivering of an email into folder AutoCleanSpam via sieve script works fine.
error-log:
Apr 08 12:57:05 lda(account1): Debug: sieve: executing compiled script /addons/sieve/account1.sieve Apr 08 12:57:05 lda(account1): Debug: expire: Mails expire in 86400 secs in mailbox: AutoCleanSpam
Apr 08 12:57:05 dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1270810625','account1','AutoCleanSpam')) failed: unable to open database file (14)
Apr 08 12:57:05 master: Error: service(dict): child 10936 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes) Apr 08 12:57:05 master: Error: service(dict): command startup failed, throttling
deliver-log:
Apr 08 12:57:05 lda(account1): Error: read(/var/run/dovecot//dict) failed: Remote disconnected Apr 08 12:57:05 lda(account1): Info: sieve: msgid=4BBDB681.10003@hu-berlin.de: stored mail into mailbox 'AutoCleanSpam'
If I use a non existing database filename in dovecotbeta-dict-expire.conf like
connect = /test/addons/expire/expiresbeta.dbbbbb
I see in the log dict: Error: sqlite: open(/test/addons/expire/expiresbeta.dbbbbb) failed: unable to open database file So I'm sure, having the rigth config file.
Moreover how to start expire-tool now? dovecot --exec-mail ... is no more valid.
Additional: /usr/dovecotbeta/sbin/dovecot --build-options Build options: ioloop=poll ipv6 openssl Mail storages: cydir dbox maildir mbox mdbox raw shared SQL drivers: sqlite Passdb: checkpassword ldap pam passwd passwd-file shadow sql Userdb: checkpassword ldap passwd prefetch passwd-file sql static
/usr/dovecotbeta/sbin/dovecot -n
# 2.0.beta4: /usr/dovecotbeta/etc/dovecot/dovecot.conf # OS: SunOS 5.9 sun4u auth_debug = yes auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345 67890 auth_verbose = yes base_dir = /var/run/dovecot/ debug_log_path = /var/log/dovecot-error default_client_limit = 6144 dict { expire = sqlite:/usr/dovecot/etc/dovecotbeta-dict-expire.conf } first_valid_gid = 20 first_valid_uid = 20 info_log_path = /var/log/dovecot-error listen = 172.19.5.17 log_path = /var/log/dovecot-error mail_access_groups = sysdov mail_debug = yes mail_gid = sysdov mail_location = dbox:%h:INDEX=/addons/index/%u:CONTROL=~/Control:LAYOUT=fs mail_privileged_group = sysdov mail_uid = sysdov mbox_write_locks = fcntl passdb { args = dovecot driver = pam } plugin { autocreate = AutoCleanSpam autocreate1 = Junk autocreate2 = Trash autocreate3 = Sent autocreate4 = Drafts autosubscribe = AutoCleanSpam autosubscribe1 = Junk autosubscribe2 = Trash autosubscribe3 = Sent autosubscribe4 = Drafts expire = AutoCleanSpam 1d expire_dict = proxy::expire sieve = /addons/sieve/%u.sieve } service pop3 { process_limit = 0 } ssl_cert =
-- Burckhard Schmidt
Hello,
I like to share the inbox "INBOX" itself to other users and not only folders. But it looks like INBOX is not shareable? I have tried both dbox and maildir. I have used TB, SquirrelMail, Roundcube. TB shoes the shared INBOX within the subscription dialog as subscripted but the per user file "subsricptions" does not contain an entry. Any other "normal" shared folder I can (un-)subscribe and the entry within "subsricptions" will be updated.
dovecot 1.2.11 configuration: mail_access_groups: sysdov mail_privileged_group: sysdov mail_uid: sysdov mail_gid: sysdov mail_location: dbox:~/dbox:INDEX=/addons/index/%u:CONTROL=~/control:LAYOUT=fs mail_plugins: autocreate expire acl imap_acl namespace: type: private separator: / inbox: yes list: yes subscriptions: yes namespace: type: shared separator: / prefix: FremdeOrdner/%%u/ location: dbox:%%h/dbox:CONTROL=~/control/FremdeOrdner/%%u:LAYOUT=fs list: yes plugin: ... acl_shared_dict: file:/addons/acl/shared-folder
user "user2" shares "INBOX" and folder "Drafts" to user "user1".
~user2/dbox/mailboxes/INBOX/dbox-Mails/dovecot-acl: user=user1 eilrwts ~user2/dbox/mailboxes/Drafts/dbox-Mails/dovecot-acl: user=user1 eilrwts ~user2/dbox/dovecot-acl-list: 1276766257 INBOX 1276762083 Drafts /addons/acl/shared-folder: shared/shared-boxes/user/user2/user1 1
Here some imap commands I have used to test it:
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN] Dovecot ready.
1 login user1 ******** 1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL RIGHTS=texk] Logged in
1 list "" "*"
- LIST (\HasNoChildren) "/" "Drafts"
- LIST (\HasNoChildren) "/" "Sent"
- LIST (\HasNoChildren) "/" "AutoCleanSpam"
- LIST (\HasNoChildren) "/" "Trash"
- LIST (\HasNoChildren) "/" "INBOX"
- LIST (\Noselect \HasChildren) "/" "FremdeOrdner"
- LIST (\Noselect \HasChildren) "/" "FremdeOrdner/user2"
- LIST (\HasNoChildren) "/" "FremdeOrdner/user2/Drafts" 1 OK List completed.
I'm right missing "FremdeOrdner/user2/INBOX" here? Or should an IMAP-Client always try to select an "INBOX" as long as "HasChildren" is shown?
1 examine FremdeOrdner/user2/Drafts
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 1 EXISTS
- 0 RECENT
- OK [UNSEEN 1] First unseen.
- OK [UIDVALIDITY 1273601955] UIDs valid
- OK [UIDNEXT 2] Predicted next UID
- OK [HIGHESTMODSEQ 3] Highest 1 OK [READ-ONLY] Select completed.
1 examine FremdeOrdner/user2/INBOX
- OK [CLOSED] Previous mailbox closed.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 3 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1273601954] UIDs valid
- OK [UIDNEXT 39] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest 1 OK [READ-ONLY] Select completed.
1 select FremdeOrdner/user2/INBOX
- OK [CLOSED] Previous mailbox closed.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
- 3 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1273601954] UIDs valid
- OK [UIDNEXT 39] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest 1 OK [READ-WRITE] Select completed.
============
Additional question I have seen the comment for shared folder and dbox: "You must not try to :INDEX= to have copies of index files." This is still valid and within version 2.0 also?
Regards
Burckhard Schmidt
On Thu, 2010-06-17 at 16:38 +0200, Burckhard Schmidt wrote:
But it looks like INBOX is not shareable? I have tried both dbox and maildir.
Yes, it had bugs. It's fixed now in v2.0 hg. (Backport to v1.2 would be too invasive.)
Additional question I have seen the comment for shared folder and dbox: "You must not try to :INDEX= to have copies of index files." This is still valid and within version 2.0 also?
Yes, it's valid. There should be a new feature to add support for per-user flags. The main index must be shared between all users (which would also contain shared flags), and then there could be another per-user index with private flags. I haven't much thought about how to do this yet.
Hello,
I have 2.0.beta6 (3156315704ef) on Solaris.
A user can login, if he makes logout imap-login will be killed with signal 11.
I tried both: passdb driver ldap and userdb driver ldap, or passdb driver shadow and userdb driver passwd.
processes
dovecot 20236 20235 0 14:40:28 ? 0:00 dovecot/anvil root 20237 20235 0 14:40:28 ? 0:00 dovecot/log root 20235 1 0 14:40:28 ? 0:00 /usr/dovecotBeta6/sbin/dovecot -c /usr/dovecotBeta6/etc/dovecot/dovecot.conf
Login: imap-login: Info: Login: user=<userx>, method=PLAIN, rip=..., lip=..., mpid=20565, TLS
dovecot 20236 20235 0 14:40:28 ? 0:00 dovecot/anvil root 20242 20235 0 14:41:59 ? 0:00 dovecot/config root 20244 20235 0 14:41:59 ? 0:00 dovecot/ssl-params nobody4 20241 20235 0 14:41:59 ? 0:00 dovecot/imap-login dovecot 20243 20235 0 14:41:59 ? 0:00 dovecot/auth root 20245 20244 1 14:41:59 ? 0:13 dovecot/ssl-params root 20237 20235 0 14:40:28 ? 0:00 dovecot/log root 20235 1 0 14:40:28 ? 0:00 /usr/dovecotBeta6/sbin/dovecot -c /usr/dovecotBeta6/etc/dovecot/dovecot.conf sysdov 20246 20235 0 14:42:08 ? 0:00 dovecot/imap
Logout: imap(userx): Info: Disconnected: Logged out byte... master: Error: service(imap-login): child 20241 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes) master: Warning: Killed with signal 15 (by pid=20250 uid=0 code=kill)
dovecot 20236 1 0 14:40:28 ? 0:00 dovecot/anvil root 20245 1 1 14:41:59 ? 1:39 dovecot/ssl-params root 20237 1 0 14:40:28 ? 0:00 dovecot/log
dovecot -n # 2.0.beta6 (3156315704ef): /usr/dovecotBeta6/etc/dovecot/dovecot.conf # OS: SunOS 5.10 sun4v auth_cache_ttl = 0 s auth_debug = yes auth_debug_passwords = yes auth_username_chars = abcdefghijklmnopqrstuvwxyz01234567890 auth_verbose = yes default_client_limit = 6244 default_login_user = nobody4 first_valid_gid = 20 first_valid_uid = 20 listen = 141.20.1.125 log_path = /var/log/dovecot mail_gid = sysdov mail_location = maildir:~/maildir:INDEX=/addons/index/%u:CONTROL=~/control:LAYOUT=fs mail_uid = sysdov namespace { inbox = yes ...
passdb { args = /usr/dovecotBeta6/etc/ldapauth.conf driver = ldap } ... service auth { client_limit = 6244 unix_listener auth-userdb { mode = 01204 } } ... userdb { args = /usr/dovecotBeta6/etc/ldapuser.conf driver = ldap }
configure: --prefix=/usr/dovecotBeta6 --exec-prefix=/usr/dovecotBeta6 CFLAGS="-I/opt/csw/include -I/usr/include/security" LDFLAGS="-L/opt/csw/lib" LIBS="-llber" --with-gssapi=no --with-sql=yes --with-pgsql=no --with-mysql=no --with-sqlite=yes --with-bsdauth=no --with-vpopmail=no -with-ssl=openssl -with-ssldir=/opt/csw/etc/ssl --with-ldap=yes --with-pam=yes --with-nss=no --with-gnu-ld
Install prefix . : /usr/dovecotBeta6 File offsets ... : 64bit I/O polling .... : poll I/O notifys .... : none SSL ............ : yes (OpenSSL) GSSAPI ......... : no passdbs ........ : static passwd passwd-file shadow pam checkpassword ldap sql : -bsdauth -sia -vpopmail userdbs ........ : static prefetch passwd passwd-file checkpassword ldap sql : -vpopmail -nss SQL drivers .... : sqlite : -pgsql -mysql
-- Burckhard Schmidt
On Thu, 2010-07-01 at 16:42 +0200, Burckhard Schmidt wrote:
imap(userx): Info: Disconnected: Logged out byte... master: Error: service(imap-login): child 20241 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
Can you get gdb backtrace? The easiest would be if you managed to attach gdb into the correct imap-login process:
<log in> gdb -p <pid of imap-login> cont <log out> bt full
Also it's possible that it's already been fixed. You could try latest nightly snapshot. http://dovecot.org/nightly/
Am 01.07.2010 16:49, schrieb Timo Sirainen:
On Thu, 2010-07-01 at 16:42 +0200, Burckhard Schmidt wrote:
imap(userx): Info: Disconnected: Logged out byte... master: Error: service(imap-login): child 20241 killed with signal 11 (core not dumped - set drop_priv_before_exec=yes)
Can you get gdb backtrace? The easiest would be if you managed to attach gdb into the correct imap-login process:
<log in> gdb -p<pid of imap-login> cont <log out> bt full
Attaching to process 20797 Retry #1: Retry #2: Retry #3: Retry #4: [New LWP 1] 0xfedcc568 in ?? () (gdb) cont Continuing.
Program received signal SIGSEGV, Segmentation fault. 0xfed57544 in ?? () (gdb) bt full #0 0xfed57544 in ?? () No symbol table info available.
I think no "good" result. I'll try next nithly.
Also it's possible that it's already been fixed. You could try latest nightly snapshot. http://dovecot.org/nightly/
-- Regards --- Burckhard Schmidt
On Thu, 2010-07-01 at 17:13 +0200, Burckhard Schmidt wrote:
gdb -p<pid of imap-login> .. Program received signal SIGSEGV, Segmentation fault. 0xfed57544 in ?? () (gdb) bt full #0 0xfed57544 in ?? () No symbol table info available.
I think no "good" result.
Yeah, not useful. I think with Solaris you need to do it like:
gdb /usr/dovecotBeta6/libexec/dovecot/imap-login <imap-login pid>
participants (2)
-
Burckhard Schmidt
-
Timo Sirainen