Re: [Dovecot] per-user quotas
Hello, Thanks for your replies so far. Still having issues with per-user quotas. To my Mysql virtual_users table I've added a column quota_kb and for a test user I've added in a value of 25 going for a 250 megabyte quota. I've tried various sql queries they're returning empty sets not pulling out the information needed. Thanks. Dave. On 10/12/12, Daniel Parthey daniel.part...@informatik.tu-chemnitz.de wrote: Hi Dave, David Mehler wrote: Thanks for your reply. I've written you directly as it is sounding like at least for now this isn't dovecot it's well a mysql issue with design. I don't have anything in my database setup with regards quota I've included it below. I've got one virtual mail user called vmail with UID/GID of 5000 who owns all the virtual mailboxes. If I'm understanding what I've read in the link, the dovecot wiki and your message since anything in a user section of Mysql will override the global configuration in 90-quota.conf, that being the case I should add an extra column to virtual users? Once that's done adjust the userdb query for dovecot to return quota information? Yes, the quota should be stored in an additional userdb column, or you need at least an SQL statement which takes a username and returns a quota rule. Quota of 0 is interpreted as unlimited by dovecot. As already said, if the value in the quota column for the user is 0, your SQL statement could also return a different value (default quota) instead of 0 (using MySQL CASE/ELSE statement). Here is a short documentation on how it is done with Tine 2.0 Groupware: http://www.tine20.org/wiki/index.php/Admins/Mailserver_integration (it is a simple example which does not support a default quota fallback, since Tine 2.0 writes the default quota as a value into the column when the user is created) Regards Daniel -- https://plus.google.com/103021802792276734820
Re: [Dovecot] [BUG] Lucene plugin breaks header substring search
On 16.10.2012, at 6.45, Dave Abrahams wrote: According to the IMAP spec if I do a search for TO isocpp.org it should find all the messages whose To: field contains the string isocpp.org, but dovecot is returning me an empty list. However, a search for TO t...@isocpp.org produces a long list of messages. This specific problem can be solved by: plugin { fts_lucene = whitespace_chars=@. } OK, Google tells me that's documented at http://wiki2.dovecot.org/Plugins/FTS/Lucene but I only found it now because I knew what to look for. I suggest doing something to make that more discoverable. That is the only page where there is any information about fts-lucene. I made it a bit clearer in that page now that whitespace_chars should be used as default. This might be good enough for me, but still doesn't make it conforming to the IMAP spec, right? IIUC the spec says you can search for arbitrary strings without regard to word boundaries. It doesn't conform to the IMAP spec, correct. But nobody cares about that anymore. Everyone violates it.
Re: [Dovecot] [BUG] Lucene plugin breaks header substring search
On 16.10.2012, at 6.51, Dave Abrahams wrote: plugin { fts_lucene = whitespace_chars=@. } Do I also need plugin { fts = lucene } or are these mutually exclusive, or...? It's not clear from http://wiki2.dovecot.org/Plugins/FTS/Lucene fts setting selects which backend to use. fts_lucene gives settings to that backend.
Re: [Dovecot] Maildir hardlinks
Def. Quota Timo Sirainen t...@iki.fi: On 4.10.2012, at 16.00, Benedetto Vassallo wrote: All works fine, but with the new version it seems that dovecot don't do hardlinks when deliver a message to multiple users. The hard linking is done only when the directory permissions match. mail_location = maildir:~/MailDir:LAYOUT=fs I tryed using lmtp directly issuing 'telnet localhost 24' and sending a test message to 3 recipients. Then issuing a 'ls -il' in the new directory of that users, I saw the inode was not the same. What are the permissions of the MailDir directory for user1/user2? ls -ld /home/user1/MailDir ls -ld /home/user2/MailDir Thank you for your reply. They are different groups: drwxr-xr-x 9 user1 grp1 4096 15 ott 14:52 /home/user1/MailDir/ drwxr-xr-x 5 user2 grp2 4096 4 ott 23:43 /home/user2/MailDir/ drwxr-xr-x 10 user3 grp3 4096 15 ott 14:52 /home/user3/MailDir/ I tryed to issue: chgrp -R mail /home/user1/MailDir chgrp -R mail /home/user2/MailDir chgrp -R mail /home/user3/MailDir but nothing changed. Any idea? Thank you. -- Benedetto Vassallo Sistema Informativo di Ateneo Settore Gestione Reti Hardware e Software U.O.B. Sviluppo e manutenzione dei sistemi Università degli studi di Palermo Phone: +3909123860056 Fax: +390916529124 - This message was sent using the University of Palermo web mail interface.
Re: [Dovecot] /var/run/dovecot/auth-userdb failed
Thank you very much Daniel, I solved the problem. In this moment I have a problem with a maildir, I used a format /home/vmail/%d/%u and the first user make maildir he is owner /home/vmail/%d and second user don't make a maildir. Now, I look for the solution. Best regards. 2012/10/14 Daniel Parthey daniel.part...@informatik.tu-chemnitz.de thefantaman wrote: I work on test server and if I send an email on log i read lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=8135(vmail) egid=8135(vmail) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner) unix_listener auth-userdb { mode = 0600 user = root group = root } } The problem is that LDA (local delivery agent or lmtp service) is not able to look up the destination mailbox in userdb. The socket /var/run/dovecot/auth-userdb is currently only readable or writable by user root since mode is set to 0600, not readable or writable by other groups. http://wiki2.dovecot.org/LDA#Virtual_users You'll need to set up a auth-userdb socket for dovecot-lda so it knows where to find mailboxes for the users. LDA is running under the virtual mailbox user and group vmail, so you need to grant this user or group access to /var/run/dovecot/auth-userdb. You could do this by using group memberships and set mode = 0660 or simply make it world-readable-writable with mode = 0666: unix_listener auth-userdb { mode = 0666 user = root group = root } Regards Daniel -- https://plus.google.com/103021802792276734820
Re: [Dovecot] Search for substring in header?
Am 10/16/2012 12:20 AM, schrieb Dave Abrahams: on Mon Oct 15 2012, Michael M Slusarz slusarz-AT-curecanti.org wrote: Quoting Dave Abrahams d...@boostpro.com: on Mon Oct 15 2012, Dave Abrahams dave-AT-boostpro.com wrote: on Sun Oct 14 2012, Michael M Slusarz slusarz-AT-curecanti.org wrote: Using 2.1.6 and 2.1.9 built --with-clucene --with-libstemmer, I get the same empty result with either of these two commands: UID SEARCH TO isocpp.org UID SEARCH TO isocpp.org Am I formatting the command wrongly? Incidentally, if I turn of fts_lucene and turn on fts_squat, I get the same result. Lucene for sure does not support subtext searching. Squat used to... but IIRC things may have changed for v2.1. Try the wiki. Sorry, but what does try the wiki mean? Which indexer are you using, that successfully finds the substring match? I don't know what Michael had in mind, but I also seemed to recall that the 'Squat' plugin used to be the only FTS plugin which suppotred substring matches. http://wiki2.dovecot.org/Plugins/FTS/Squat explains: The main difference between Squat indexes and the others is that Squat provides support for substring searches, while pretty much all other FTS indexes support only matching from the beginning of words. By strictly reading the IMAP RFC it requires substring matching, so to optimize regular TEXT and BODY searches you must use Squat with Dovecot v2.0. [..] However, almost all other commonly used IMAP servers no longer care about this requirement, so Dovecot v2.1 also no longer makes this distinction. I'm not sure how to read this, but I can imagine (and maybe that's what Michael was hinting at) that the Squat plugin for Dovecot = 2.1 no longer supports substring matches as required by the IMAP RFC whereas previous versions do. P.S.: I wish this list would have a Reply-To configured. :-) -- Frerich Raabe - ra...@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
Re: [Dovecot] Search for substring in header?
on Tue Oct 16 2012, Frerich Raabe raabe-AT-froglogic.com wrote: Am 10/16/2012 12:20 AM, schrieb Dave Abrahams: on Mon Oct 15 2012, Michael M Slusarz slusarz-AT-curecanti.org wrote: Quoting Dave Abrahams d...@boostpro.com: on Mon Oct 15 2012, Dave Abrahams dave-AT-boostpro.com wrote: on Sun Oct 14 2012, Michael M Slusarz slusarz-AT-curecanti.org wrote: Using 2.1.6 and 2.1.9 built --with-clucene --with-libstemmer, I get the same empty result with either of these two commands: UID SEARCH TO isocpp.org UID SEARCH TO isocpp.org Am I formatting the command wrongly? Incidentally, if I turn of fts_lucene and turn on fts_squat, I get the same result. Lucene for sure does not support subtext searching. Squat used to... but IIRC things may have changed for v2.1. Try the wiki. Sorry, but what does try the wiki mean? Which indexer are you using, that successfully finds the substring match? I don't know what Michael had in mind, but I also seemed to recall that the 'Squat' plugin used to be the only FTS plugin which suppotred substring matches. http://wiki2.dovecot.org/Plugins/FTS/Squat explains: The main difference between Squat indexes and the others is that Squat provides support for substring searches, while pretty much all other FTS indexes support only matching from the beginning of words. By strictly reading the IMAP RFC it requires substring matching, so to optimize regular TEXT and BODY searches you must use Squat with Dovecot v2.0. [..] However, almost all other commonly used IMAP servers no longer care about this requirement, so Dovecot v2.1 also no longer makes this distinction. I'm not sure how to read this, but I can imagine (and maybe that's what Michael was hinting at) that the Squat plugin for Dovecot = 2.1 no longer supports substring matches as required by the IMAP RFC whereas previous versions do. Well, it worked for me in 2.1.6 and 2.1.9. However, http://wiki2.dovecot.org/Plugins/FTS claims squat is obsolete in 2.1.x, my colleague is reporting (to me) crashes with squat during indexing, and Timo just posted that squat seems to be completely broken for some reason. -- Dave Abrahams BoostPro Computing Software DevelopmentTraining http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
Re: [Dovecot] Dovecot deliver Segmentation fault when arrive the first message
Il 16/10/2012 02:35, Timo Sirainen ha scritto: On 13.10.2012, at 15.38, Alessio Cecchi wrote: Il 2012-10-02 21:28 Timo Sirainen ha scritto: On 19.9.2012, at 16.07, Alessio Cecchi wrote: #1 0x7f2fc9fc41b4 in acl_backend_vfile_acllist_try_rebuild ( backend=0x1944240) at acl-backend-vfile-acllist.c:297 This should fix it: http://hg.dovecot.org/dovecot-2.1/rev/41aac09497ee Timo, with this patch works fine! 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
[Dovecot] Problem with quota update in dovecot 1.2
Hi A have a problem with quota2 table, working under postfixadmin. When I login into imap server with thunderbird client everything works fine, quota is update when i receive a message, but when I move message to trash or any other folder value for messages field in table quota2 increases +1 instead decreases or have still this same value. Only if I close my imap client value descending -2. I wish to table quota2 will be updated immediately after any operation on inbox. Is there any mistake in my configuration? Thanks for any advice. == dovecot -n print: # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-xen-686 i686 Debian 6.0.3 ext3 log_path: /var/log/dovecot/error.log info_log_path: /var/log/dovecot/info.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login first_valid_uid: 100 mail_privileged_group: Debian-exim mail_uid: 101 mail_gid: 103 mail_location: maildir:/var/mail/virtual/%d/%n/Maildir mail_cache_min_mail_count: 100 mail_debug: yes mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugins(default): autocreate quota imap_quota trash mail_plugins(imap): autocreate quota imap_quota trash mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 imap_client_workarounds(default): tb-extra-mailbox-sep imap_client_workarounds(imap): tb-extra-mailbox-sep imap_client_workarounds(pop3): imap_id_log(default): * imap_id_log(imap): * imap_id_log(pop3): lda: postmaster_address: postmas...@mydomain.com mail_plugins: quota log_path: /var/log/dovecot/lda-errors.log info_log_path: /var/log/dovecot/deliver.log auth default: mechanisms: plain login verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: prefetch userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: Debian-exim plugin: autocreate: INBOX autocreate2: Sent autocreate3: Trash autocreate4: Drafts autocreate5: Junk autocreate6: Spam autosubscribe: INBOX autosubscribe2: Sent autosubscribe3: Trash autosubscribe4: Drafts autosubscribe5: Junk autosubscribe6: Spam quota: dict:user::proxy::quotadict quota_rule: Trash:storage=+20%% quota_rule2: Spam:ignore quota_rule3: Drafts:storage=+5%% quota_rule4: Sent:storage=+15%% quota_rule5: Junk:storage=+10%% quota_warning: storage=100%% quota-exceeded 100 %u quota_warning2: storage=95%% quota-warning 95 %u quota_warning3: storage=90%% quota-warning 90 %u quota_warning4: storage=85%% quota-warning 85 %u quota_warning5: storage=80%% quota-warning 80 %u quota_warning6: storage=75%% quota-warning 75 %u quota_warning7: storage=70%% quota-warning 70 %u quota_warning8: storage=65%% quota-warning 65 %u trash: /etc/dovecot/dovecot-trash.conf mail_log_events: delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mail_log_group_events: no mail_log_fields: uid box msgid size subject from dict: quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf = cat /etc/dovecot/dovecot-sql.conf driver = mysql connect = host=localhost dbname=eximdb user=eximdbadm password=* default_pass_scheme = PLAIN password_query = \ SELECT username as user, domain, password \ FROM mailbox WHERE username= '%u' AND active = 1 user_query = \ SELECT CONCAT('/var/mail/virtual/', maildir) AS home, 101 AS uid, 103 AS gid, concat('dict:storage=', CAST(ROUND(quota / 1024) AS CHAR), '::proxy::quotadict') AS quota, CONCAT('*:storage=', CAST(quota AS CHAR), 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' = cat /etc/dovecot/dovecot-dict-quota.conf connect = host=localhost dbname=eximdb user=eximdbadm password=* map { pattern = priv/quota/storage table = quota2 username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota2 username_field = username value_field = messages } == cat /etc/dovecot/dovecot-trash.conf 1 Trash 2 Spam 3 Sent 4 Draft
Re: [Dovecot] Problem with quota update in dovecot 1.2
On 10/16/2012 8:39 AM, tower wrote: Hi A have a problem with quota2 table, working under postfixadmin. When I login into imap server with thunderbird client everything works fine, quota is update when i receive a message, but when I move message to trash or any other folder value for messages field in table quota2 increases +1 instead decreases or have still this same value. Only if I close my imap client value descending -2. I wish to table quota2 will be updated immediately after any operation on inbox. Is there any mistake in my configuration? Thanks for any advice. Are you sure the client isn't just copying it to the other folder. When you exit, you may be expunging inbox (deleting the marked message) and emptying trash (deleting the copied message). Jack
Re: [Dovecot] CAS Authentication
Hi, Hi.I'm very sorry for the repost but I forgot the subject. So, I'm using dovecot 2.0.18 and I'm trying to authenticate through a CAS server (until now authentication was through MS Active Directory). I could not find anywhere some examples, so here is what i have done so far. -install phpcas and pam_cas -edit /etc/pam.d/dovecot authsufficient /lib/security/pam_cas.so -simap://webmail.mydomain.com -f /etc/pam_cas.conf -edit /etc.pam_cas.conf host mycas.mydomain.com port 443 uriValidate /cas/proxyValidate ssl on proxy ??? trusted_ca /etc/cert/certificate.pem debug on - and finally dovecot.conf which I'm sure is complety wrong userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } passdb { driver = pam args = cache_key=%u dovecot } Could you try with failure_show_msg=yes on passdb args ? You can try without the proxy line in pam_cas.conf and a static userdb with allow_all_users=yes (in place of ldap configuration). Hope this can help. You have some logs in /var/log/auth.log (depends of your distrib). -- Guillaume de Lafond Aqua Ray
Re: [Dovecot] Problem with quota update in dovecot 1.2
On 10/16/2012 03:48 PM, Jack Bates wrote: On 10/16/2012 8:39 AM, tower wrote: Hi A have a problem with quota2 table, working under postfixadmin. When I login into imap server with thunderbird client everything works fine, quota is update when i receive a message, but when I move message to trash or any other folder value for messages field in table quota2 increases +1 instead decreases or have still this same value. Only if I close my imap client value descending -2. I wish to table quota2 will be updated immediately after any operation on inbox. Is there any mistake in my configuration? Thanks for any advice. Are you sure the client isn't just copying it to the other folder. When you exit, you may be expunging inbox (deleting the marked message) and emptying trash (deleting the copied message). Jack Yes, now I see, that messages still is in folder from which I move it. In thunderbird I do drag and drop (FYI). Is there any switch in dovecot configuration which treats message as deleted from folder, from which I move that message?
Re: [Dovecot] Plugin hooks in login process
In data martedì 16 ottobre 2012 03:41:14, Timo Sirainen ha scritto: On 15.10.2012, at 16.13, Simone Lazzaris wrote: Problem is, if I execute the update on the backend, I miss the information regarding the original IP, as I only see the IP of the proxies. This is easy to solve: Set login_trusted_networks setting to point to your proxies, and you'll see the original IP. Thanks, it works as a charm. Just one more thing. I wasn't be able to find this option in the wiki, and also now that I know the meaning, I can't successfully google for it. Maybe the docs needs some love ? I hate tamper the developers for something I should have found by myself on the first place. Looking in the dovecot source code, I noticed that there aren't any hooks in the execution path used by the proxies; I am missing something ? I am the only one missing the presence of this hooks in the auth/proxy process ? The login processes aren't really meant to have any plugins. I see. Well, thanks anyway. -- Simone Lazzaris | Responsabile aree datacenter e VoIP Interactive Network srl | via Roggia Vignola 9, 24047 Treviglio (BG) Tel. 0363 1970352 | Fax 0363.1971971 | www.interactive.eu signature.asc Description: This is a digitally signed message part.
[Dovecot] Per user quotas
Hi All, I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it! I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user. I believe I need to add to a passwd file, but I have added to that and nothing has changed. # dovecot -n # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-686 i686 Debian 6.0.5 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s ssl_cert_file: /etc/ssl/certs/postfix.pem ssl_key_file: /etc/ssl/private/postfix.key login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login mail_privileged_group: mail mail_location: maildir:~/mail:LAYOUT=fs:INBOX=~/mail/ mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 lda: mail_plugins: quota auth default: mechanisms: plain login passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix plugin: quota: maildir:user quota quota_rule: *:storage=200M quota_rule2: Trash:storage=10%% quota_rule2: SPAM:ignore quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 quota_exceeded_message: Quota exceeded, Please delete some emails Any help gratefully received Dave _ This email has been scanned for malicious content. _
Re: [Dovecot] Problem with quota update in dovecot 1.2
On 10/16/2012 9:00 AM, tower wrote: Yes, now I see, that messages still is in folder from which I move it. In thunderbird I do drag and drop (FYI). Is there any switch in dovecot configuration which treats message as deleted from folder, from which I move that message? Not to my knowledge, but someone else may know more. I setup the Trash folder with a +100MB quota per the wiki so that it could handle deleting emails when quota was near full. Jack
Re: [Dovecot] CAS Authentication
Thanks for the reply. I have already tried successfully the setup without proxing the cas tickets and setting dovecot to login with a master password. The problem is that I need a password file with all the users and also I need the proxy feature for other applications. From: de Lafond Guillaume gdelafond+dove...@aquaray.com To: b m stocto...@yahoo.com; Dovecot Mailing List dovecot@dovecot.org Sent: Tuesday, October 16, 2012 4:56 PM Subject: Re: [Dovecot] CAS Authentication Hi, Hi.I'm very sorry for the repost but I forgot the subject. So, I'm using dovecot 2.0.18 and I'm trying to authenticate through a CAS server (until now authentication was through MS Active Directory). I could not find anywhere some examples, so here is what i have done so far. -install phpcas and pam_cas -edit /etc/pam.d/dovecot auth sufficient /lib/security/pam_cas.so -simap://webmail.mydomain.com -f /etc/pam_cas.conf -edit /etc.pam_cas.conf host mycas.mydomain.com port 443 uriValidate /cas/proxyValidate ssl on proxy ??? trusted_ca /etc/cert/certificate.pem debug on - and finally dovecot.conf which I'm sure is complety wrong userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } passdb { driver = pam args = cache_key=%u dovecot } Could you try with failure_show_msg=yes on passdb args ? You can try without the proxy line in pam_cas.conf and a static userdb with allow_all_users=yes (in place of ldap configuration). Hope this can help. You have some logs in /var/log/auth.log (depends of your distrib). -- Guillaume de Lafond Aqua Ray
[Dovecot] real_rip variable addition for dovecot 2.1.10
Timo, Please check the code. I didn't add it, but a real_lip might be useful for some people as well. Also, I notice that pop3-proxy is doing a different xsession than the imap proxy. Is there an xsession standard that is different between the two, or just an oversight in the code? Both send the remote address/port, but only imap proxy sends the local address/port. This patch declares long variable %{real_rip} so that a backend server can declare a different login_log_format_elements login_log_format_elements = user=%u method=%m rip=%r lip=%l pip=%{real_rip} mpid=%e %c This is primarily useful for backend servers to log both the rip, lip, and in case of xsession, the real rip. I haven't done extensive testing yet, but as long as nothing does anything weird elsewhere in the code, it should be good. http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patch dovecot: pop3-login: Login: user=test, method=PLAIN, rip=192.168.1.5, lip=::1, pip=::1, mpid=8665, secured Jack Bates
Re: [Dovecot] LMTP userdb lookup
On 10/4/12 9:58 AM, Timo Sirainen wrote: On 4.10.2012, at 17.41, l...@airstreamcomm.net wrote: protocol lmtp { userdb { .. } } protocol !lmtp { userdb { .. } } Forgot to mention I am running 2.0.17. The above works in v2.1. And I am getting the following error: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one From a previous post it appears that Dovecot cannot run without a global lookups specified: http://www.dovecot.org/list/dovecot/2012-March/064407.html Per the suggestion in the old post I created an empty passwdfile and included it in the auth-passwdfile which seems to have alleviated the issue, however this seems like a sub-optimal solution. Is this still the case, or is there a way to tell Dovecot that there is no global lookups? The !lmtp version avoids that fatal problem. So the solution is: upgrade. Timo, I upgraded to 2.1 and configured as recommended, however I am still getting an error: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one Doveconf -n: # 2.1.1: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-279.5.2.el6.x86_64 x86_64 CentOS release 6.3 (Final) auth_debug = yes auth_verbose = yes disable_plaintext_auth = no mail_debug = yes mail_fsync = always mail_location = maildir:~/Maildir mail_nfs_index = yes mail_nfs_storage = yes mbox_write_locks = fcntl mmap_disable = yes namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Sent Messages { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } service imap-login { inet_listener imap { port = 143 } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service pop3-login { inet_listener pop3 { port = 110 } } ssl_cert = /etc/pki/dovecot/certs/mail.crt ssl_key = /etc/pki/dovecot/private/mail.key protocol !lmtp { passdb { args = /etc/dovecot/imappop.conf.ext driver = sql } userdb { args = /etc/dovecot/imappop.conf.ext driver = sql } } protocol lmtp { passdb { args = /etc/dovecot/lmtp.conf.ext driver = sql } userdb { args = /etc/dovecot/lmtp.conf.ext driver = sql } }
Re: [Dovecot] real_rip variable addition for dovecot 2.1.10
Still have some problems with the patch. will have to research it more. Worked fine on localhost, but isn't logging at all for foreign hosts in a production environment. Jack On 10/16/2012 3:43 PM, Jack Bates wrote: Timo, Please check the code. I didn't add it, but a real_lip might be useful for some people as well. Also, I notice that pop3-proxy is doing a different xsession than the imap proxy. Is there an xsession standard that is different between the two, or just an oversight in the code? Both send the remote address/port, but only imap proxy sends the local address/port. This patch declares long variable %{real_rip} so that a backend server can declare a different login_log_format_elements login_log_format_elements = user=%u method=%m rip=%r lip=%l pip=%{real_rip} mpid=%e %c This is primarily useful for backend servers to log both the rip, lip, and in case of xsession, the real rip. I haven't done extensive testing yet, but as long as nothing does anything weird elsewhere in the code, it should be good. http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patch dovecot: pop3-login: Login: user=test, method=PLAIN, rip=192.168.1.5, lip=::1, pip=::1, mpid=8665, secured Jack Bates
[Dovecot] Difference between Indexing and Rescan in FTS
I've had squat running on dovecot 2.0 and have been updating all users mailbox indexes nighty via cron with this command: doveadm -v search -A text xyzzyx I've just updated to 2.1 and I'm migrating to lucene indexes, but reading the documentation I'm having a hard time understanding the semantic differences between indexing and rescanning. If I were to continue to run an all user all mailbox index every night, would that be appropriate? Would running this every night avoid the need to ever rescan? Should I run rescan instead of index? Should I run both rescan and index? In which order? Best Regards, FredK
[Dovecot] doveadm purge -A via doveadm-proxy director fails after some users
# 2.1.10: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-44-server x86_64 Ubuntu 10.04.4 LTS doveadm -c /etc/dovecot-director/dovecot-director.conf -D purge -A shows the following message in the log when iterating the 49th user: Oct 17 00:47:17 10.129.3.233 dovecot: doveadm: Error: purge: invalid option -- 'e' Oct 17 00:47:17 10.129.3.233 dovecot: doveadm(someu...@example-ll.org): Error: doveadm purge: Client sent unknown parameter: ? Any ideas on how this error gets triggered? Regards Daniel -- https://plus.google.com/103021802792276734820
[Dovecot] how to best import Evolution/Thunderbird mail into dovecot?
Hi. I'm migrating all my mail archive (some 60 GB) from Evolution (which is really a broken piece of software) into dovecot. Now I face the problem how to do this best... Evolution (which is still a old 2.32.x version) itself uses mbox files, in a special hierarchical structure to allow subfolders and that like. It also stores it's own status info in X-Evolution and X-Evolution-Source mail headers. Unfortunately,... much of the mail was earlier from a Thunderbird installation, which uses it's own status headers (X-Mozilla*) that were not recognised by Evolution. I have no idea which mbox subformat was always used throughout the different programs and versions... 1) Any way to check for that? To make things worse... Thunder(burden) seems to have used a modified From_ line syntax... ^From -address date$ Ideally I'd like migrate all mail into dovecot (for storage reasons again, mbox) retaining the different status flags (read, forwarded, etc.) and getting rid of the proprietary headers (of course only when they were. First thing I tried was to simply copy mail within Evolution (i.e. draggingdropping it from the local folders to the IMAP folders from dovecot). - that preserves the status from Evolution, but doesn't restore that from Thunderbird - it clutters up the information of all From_ lines... address date becomes address of my default evolution account now - neither does it handle the special Thunderbird From_ lines - neither does it remove the Thunderbird or the X-Evolution-Source headers - if Evolution has already had corrupted index files (and this is extremely likely... as it happens even immediately during recreating all of them)... so I may loose mail So my idea was that I need a program that: - can parse all the different mbox formats (those that use the quoted From style and those that use Conent-Length) - can differentiate message headers from body (so that I can drop the proprietary headers and replace them by what dovecot uses as headers) - must of course understand multiline message headers 2) Any idea for a tool like that? The meaning of the X-Evolution and X-Mozilla* headers are easy to find on the web so I can convert them. So I basically just need a tool that parses all kinds of mbox formats... allow me to drop/add headers... and spits out the rest unmodified. 3) dovecot uses some special headers like X-UID and X-IMAPD... will it create these on it's own, the first time it processes the new mbox file? I mean these headers won't be there after creation. 4) Should I drop out (during) conversion... any other mail headers.. that dovecot uses as it's own? Thanks, Chris. smime.p7s Description: S/MIME cryptographic signature
Re: [Dovecot] real_rip variable addition for dovecot 2.1.10
Umm, yeah. Setting your rsyslog to pipe certain IP matches to another file really screws things up when you change the log to include that IP. Hours of work before I figured out that it was logging just fine but to another file. lol Jack On 10/16/2012 5:51 PM, Jack Bates wrote: Still have some problems with the patch. will have to research it more. Worked fine on localhost, but isn't logging at all for foreign hosts in a production environment. Jack On 10/16/2012 3:43 PM, Jack Bates wrote: Timo, Please check the code. I didn't add it, but a real_lip might be useful for some people as well. Also, I notice that pop3-proxy is doing a different xsession than the imap proxy. Is there an xsession standard that is different between the two, or just an oversight in the code? Both send the remote address/port, but only imap proxy sends the local address/port. This patch declares long variable %{real_rip} so that a backend server can declare a different login_log_format_elements login_log_format_elements = user=%u method=%m rip=%r lip=%l pip=%{real_rip} mpid=%e %c This is primarily useful for backend servers to log both the rip, lip, and in case of xsession, the real rip. I haven't done extensive testing yet, but as long as nothing does anything weird elsewhere in the code, it should be good. http://www.brightok.net/jbates/dovecot-2.1.10-real-ip.patch dovecot: pop3-login: Login: user=test, method=PLAIN, rip=192.168.1.5, lip=::1, pip=::1, mpid=8665, secured Jack Bates
Re: [Dovecot] how to best import Evolution/Thunderbird mail into dovecot?
Hi again... Things are even much much worse... (oh how I hate Evolution right now). I found a bug in Evolution, where it apparently corrupts all mail by incorrectly (not) quoting From_ lines in headers/bodies... It quotes lines matching ^From (.*)$ as From \1 but it does not quote at all already quoted From_ lines, i.e. ^+From .*$. Now that means AFAICS, that it's not possible to repair that corruption (you'll see my happiness about this, when reading the offensive bug report): Details here: https://bugzilla.gnome.org/show_bug.cgi?id=686258 I'm not sure how this affects any of my migration/conversion plans... any ideas? Thanks, a desperate Chris. smime.p7s Description: S/MIME cryptographic signature
Re: [Dovecot] Difference between Indexing and Rescan in FTS
On 10/16/2012 6:14 PM, Fred Kilbourn wrote: I've had squat running on dovecot 2.0 and have been updating all users mailbox indexes nighty via cron with this command: doveadm -v search -A text xyzzyx I've just updated to 2.1 and I'm migrating to lucene indexes, but reading the documentation I'm having a hard time understanding the semantic differences between indexing and rescanning. If I were to continue to run an all user all mailbox index every night, would that be appropriate? Would running this every night avoid the need to ever rescan? 2 sets of indexes. dovecot indexes FTS indexes Performing the cron search will update the FTS indexes, although you should read up on 2.1's doveadm index command. The dovecot indexes should stay in sync. However, if they do lose track of the FTS indexes, you can do a rescan to sync them back up. Except for corruption or index changes made outside of dovecot, the two sets of indexes should stay in sync. Jack
Re: [Dovecot] Per user quotas
On 10/16/2012 11:39 AM, David Travers wrote: Hi All, I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it! I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user. I believe I need to add to a passwd file, but I have added to that and nothing has changed. user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M Example given on http://wiki.dovecot.org/UserDatabase/ExtraFields Note that the extra fields are prefixed with userdb_ when placed in a passwd file. Also, watch your quota_rule numbering. You have 2 rules with the same number (quota_rule2 for Trash and SPAM). In the passwd file, you are replacing the rule specified by number (no number technically being the first). Jack
Re: [Dovecot] Difference between Indexing and Rescan in FTS
-Original Message- From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On Behalf Of Jack Bates Sent: Tuesday, October 16, 2012 9:44 PM To: dovecot@dovecot.org Subject: Re: [Dovecot] Difference between Indexing and Rescan in FTS On 10/16/2012 6:14 PM, Fred Kilbourn wrote: I've had squat running on dovecot 2.0 and have been updating all users mailbox indexes nighty via cron with this command: doveadm -v search -A text xyzzyx I've just updated to 2.1 and I'm migrating to lucene indexes, but reading the documentation I'm having a hard time understanding the semantic differences between indexing and rescanning. If I were to continue to run an all user all mailbox index every night, would that be appropriate? Would running this every night avoid the need to ever rescan? 2 sets of indexes. dovecot indexes FTS indexes Performing the cron search will update the FTS indexes, although you should read up on 2.1's doveadm index command. The dovecot indexes should stay in sync. However, if they do lose track of the FTS indexes, you can do a rescan to sync them back up. Except for corruption or index changes made outside of dovecot, the two sets of indexes should stay in sync. Jack Thanks Jack, So here are my takeaways, let me know if I'm wrong: - The FTS index is the actual search data - The dovecot index holds, among other information, which messages are indexed by FTS - The FTS index still doesn't update automatically, so my nightly cronjob should keep it in order - The dovecot index should stay in order under normal circumstances, and issuing a resync command shouldn't be needed unless something bad happens Assuming my understanding above is correct, how about these questions, to further clarify my original questions: - As a system administrator, what signs should I look for that a resync is needed? (aside from user complaints) - What exact impact does running the resync command have? - Is it worthwhile to resync periodically as a maintenance task? - Or, does resyncing reset all FTS indexing that has been done, causing it to have to be done again from scratch? And, I did catch the revision in the user docs for updating indexes. I plan on updating my maintenance script accordingly. Thanks, Fred
Re: [Dovecot] Difference between Indexing and Rescan in FTS
On 17.10.2012, at 2.14, Fred Kilbourn wrote: I've had squat running on dovecot 2.0 and have been updating all users mailbox indexes nighty via cron with this command: doveadm -v search -A text xyzzyx doveadm index is a bit more efficient. I've just updated to 2.1 and I'm migrating to lucene indexes, but reading the documentation I'm having a hard time understanding the semantic differences between indexing and rescanning. doveadm fts rescan makes sure that 1) all of the old messages are indexed and 2) there are no extra (already deleted) messages indexed. So it's basically repairing fts index. You probably shouldn't run it automatically, or at least not very often.