[Dovecot] mdbox, mdbox_rotate_size 2m default
Anyone else test using different values? Was 2M chosen as a default based on anything specific? Is there any kind of known range where performance starts to go downhill if its greater than x or less than y? Im curious if there would be any obvious reason why I shouldnt set it to 5-10 megs
[Dovecot] dsync segmentation fault
dsync -u bran...@olypen.com mirror mdbox~/mdbox Segmentation fault Took me 3 tries before I noticed the missing colon after mdbox
[Dovecot] Haha wow, thats freakin cool... mdbox
It didnt really click until I had a ls -ald * on watch while I moved messages around folders using mdbox... I moved about 200 first to an Archive folder, and scratched my head wondering why i didnt see any new m.* files being created after the move. So then I moved some 5k other messages from other folders to my archive folder... Then it dawned on me, how damn cool, the data never changes, dovecot just updates its index of what folder the message is in?! That is awesome! Also, I ended up answering my own question on the 2m mdbox_rotate_size, if a 10 meg email comes through it will write a 10 meg file, so thats cool too.
Re: [Dovecot] Haha wow, thats freakin cool... mdbox
Brandon Lamb put forth on 7/18/2010 2:22 AM: It didnt really click until I had a ls -ald * on watch while I moved messages around folders using mdbox... I moved about 200 first to an Archive folder, and scratched my head wondering why i didnt see any new m.* files being created after the move. So then I moved some 5k other messages from other folders to my archive folder... Then it dawned on me, how damn cool, the data never changes, dovecot just updates its index of what folder the message is in?! That is awesome! What happens when these indexes become corrupted, get accidentally deleted, or have the permissions accidentally changed in a way that they become unreadable by Dovecot? Does Dovecot still report the messages as being in the correct folder? -- Stan
Re: [Dovecot] Questions about dbox (sdbox?), mdbox
On 07/18/2010 03:50 AM Brandon Lamb wrote: So I had another thought, if I have a user that has 500 megs of mail but its mostly large attachments, with the default mailfile size at 2 megs this means a 25 meg attachment is going to have to write to and read from 13 files every time? Interesting theory. ;-) But happily wrong. Messages with a size 2m will get their own storage file. Regards, Pascal -- The trapper recommends today: http://kopfkrebs.de/mitarbeiter/mitarbeiter_der_woche.html
[Dovecot] Unable to get Dovecot LDA/deliver working
I want to setup Dovecot LDA, but I don't understand what I'm doing anymore. I have to note that I'm a Linux beginner. I've been trying now for several months and I'm about to give up. Till so far I'm having no result. :-( My current setup is done as described at http://www.linuxmail.info. We use Postfix 2.3.3 (with Postgrey, Spamassassin and ClamAV), Dovecot 1.2.11 and OpenLDAP 2.4.1 on CentOS 5.5. All incoming e-mail are delivered by Postfix in the users' maildir. We use this as a base for SOGo, our groupware solution and it runs smoothly. I have to setup a new mailserver, because we're standardising on Debian. My employer wants to have new functions like out-of-office-replies and forwarding. I want to make use of sieve. Unfortunately I don't know anyone who can help me. My problem is that I don't understand how the delivery process is working. I've read much documentation from Postfix and Dovecot, but I find it too difficult to understand. What do I understand? I know that I have to make changes in /etc/dovecot, /etc/postfix/main.cf and /etc/postfix/master.cf as described at http://wiki.dovecot.org/LDA. /etc/dovecot.conf # OS: Linux 2.6.18-028stab064.7 i686 CentOS release 5.5 (Final) reiserfs base_dir: /var/run/dovecot/ protocols: imap imaps pop3 pop3s managesieve ssl: no version_ignore: yes login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login mail_location: maildir:/home/vmail/%u/Maildir mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): managesieve_logout_format(default): bytes=%i/%o managesieve_logout_format(imap): bytes=%i/%o managesieve_logout_format(pop3): bytes=%i/%o managesieve_logout_format(managesieve): bytes ( in=%i : out=%o ) lda: postmaster_address: postmas...@domain.nl mail_plugins: cmusieve mail_plugin_dir: /usr/lib/dovecot/lda deliver_log_format: msgid=%m: %$ -- FROM=%f SUBJECT=%s log_path: /var/log/dovecot-deliver.log info_log_path: /var/log/dovecot-deliver.log syslog_facility: mail sendmail_path: /usr/lib/sendmail rejection_subject: Rejected: %s rejection_reason: Your message to %t was automatically rejected:%n%r auth_socket_path: /usr/local/var/run/dovecot-auth-master auth default: mechanisms: plain login username_format: %Lu passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: static args: uid=500 gid=500 home=/home/vmail/%u socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: vmail plugin: sieve: /var/sieve-scripts/%u.sieve sieve_dir: %h/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/ /etc/postfix/main.cf virtual_mailbox_domains = /etc/postfix/domains ## Plain text file with the domains virtual_mailbox_base = /home/vmail virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf virtual_alias_maps = ldap:/etc/postfix/ldap-groups.cf virtual_uid_maps = static:500 virtual_gid_maps = static:500 dovecot_destination_recipient_limit = 1 #virtual_transport = dovecot ## Commented out to deliver by Postfix /etc/postfix/ldap-users.cf server_host = localhost search_base = dc=domain,dc=com version = 3 query_filter = ((objectclass=mailUser)(mail=%s)) result_attribute = uid result_format = %s/Maildir/ /etc/postfix/ldap-groups.cf server_host = localhost search_base = dc=domain,dc=com version = 3 query_filter = ((objectclass=mailGroup)(mail=%s)) leaf_result_attribute = mail special_result_attribute = member /etc/postfix/master.cf dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d username I hope someone can help me, because many people on the internet say that it is easy. If anyone needs more information or anyone can help me, please contact me. Best, Frank --- LS: I know that I'm using Hotmail, but I want to post this anonymously.
Re: [Dovecot] Unable to get Dovecot LDA/deliver working
On Sun, 18 Jul 2010 19:37:01 +0200 Frank van Amsterdam frank122...@hotmail.com articulated: {snip} Next time, post the output of: postconf -n dovecot -n Please include log entries to show what your problem is. BTW, your version of Postfix is seriously deprecated. Would it be possible to update to the latest stable version before continuing with this venture? -- Jerry ✌ dovecot.u...@seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __
[Dovecot] Arghh, dovecot-2 and lda
I cannot seem to get exim/lda working... In my exim log i just see these 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index Now I have all the debugging on as far as i can tell, and exim is obviously being returned some value from dovecot because it knows about the maildir that i return from sql, but yet there is zero being logged in debug or anything else. If I run the dovecot-lda from the command line with the same then it works and i get logs entered command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped dovecot -n # 2.0.rc2: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian squeeze/sid auth_cache_negative_ttl = 30 s auth_cache_size = 4096 auth_cache_ttl = 30 s auth_debug = yes auth_default_realm = olypen.com auth_mechanisms = plain login auth_username_format = %Lu auth_verbose = yes auth_worker_max_count = 60 base_dir = /var/run/dovecot debug_log_path = /var/log/dovecot/debug.log default_client_limit = 1024 default_internal_user = mail default_login_user = mail default_vsz_limit = 1073741824 deliver_log_format = %s from %f %$ dict { expire = mysql:/etc/dovecot/conf.d/dovecot-dict-expire.conf.ext } disable_plaintext_auth = no dotlock_use_excl = yes first_valid_gid = 8 first_valid_uid = 8 info_log_path = /var/log/dovecot/info.log last_valid_gid = 8 last_valid_uid = 8 log_path = /var/log/dovecot/dovecot.log log_timestamp = %Y-%m-%d %H:%M:%S login_log_format = %s login_log_format_elements = (%u) (%r) mail_access_groups = mail mail_debug = yes mail_fsync = never mail_gid = 8 mail_location = maildir:~/:INDEX=~/dovecot-index mail_log_prefix = %Ls %u: mail_max_userip_connections = 4 mail_plugins = quota mail_privileged_group = mail mail_uid = 8 mailbox_idle_check_interval = 60 s maildir_very_dirty_syncs = yes mdbox_rotate_size = 10485760 namespace { hidden = no inbox = yes location = prefix = separator = / type = private } passdb { args = /etc/dovecot/conf.d/dovecot-sql.conf.ext driver = sql } plugin { auth_socket_path = /var/run/dovecot/auth-master autocreate = Trash autocreate2 = Spam autocreate3 = Spam.Delivered autocreate4 = Spam.Removed autocreate5 = Sent autocreate6 = Drafts autosubscribe = Trash autosubscribe2 = Sent expire = Trash 30d expire2 = Trash/* 30d expire3 = Spam 14d expire4 = Spam/Removed 6h expire5 = Spam/Delivered 2d expire6 = Deleted* 30d expire7 = Archive 30d expire_dict = proxy::expire qoute_rule5 = Spam.Delivered:ignore quota = maildir:User quota quota_rule2 = Trash:ignore quota_rule3 = Deleted Items:ignore quota_rule4 = Spam:ignore quota_rule6 = Spam.Removed:ignore quota_warning = storage=95%% /etc/dovecot/quota-warning.sh 95 quota_warning2 = storage=80%% /etc/dovecot/quota-warning.sh 80 trash = /etc/dovecot/conf.d/dovecot-trash.conf.ext zlib_save = bz2 zlib_save_level = 6 } protocols = imap pop3 service auth { executable = /usr/local/libexec/dovecot/auth unix_listener auth-client { group = mail mode = 0666 user = mail } unix_listener auth-master { group = mail mode = 0666 user = mail } unix_listener auth-userdb { group = mail mode = 0666 user = mail } vsz_limit = 536870912 } service imap-login { client_limit = 512 executable = /usr/local/libexec/dovecot/imap-login process_limit = 20 process_min_avail = 4 service_count = 0 user = dovecot vsz_limit = 134217728 } service imap { drop_priv_before_exec = no executable = /usr/local/libexec/dovecot/imap vsz_limit = 536870912 } service pop3-login { client_limit = 512 executable = /usr/local/libexec/dovecot/pop3-login process_limit = 20 process_min_avail = 4 service_count = 0 user = dovecot vsz_limit = 134217728 } service pop3 { drop_priv_before_exec = no executable = /usr/local/libexec/dovecot/pop3 vsz_limit = 536870912 } ssl_cert = /etc/dovecot/ssl/dovecot-cert.pem ssl_key = /etc/dovecot/ssl/dovecot-key.pem userdb { driver = prefetch } userdb { args = /etc/dovecot/conf.d/dovecot-sql.conf.ext driver = sql } valid_chroot_dirs = /mail verbose_proctitle = yes protocol lda { auth_socket_path = /var/run/dovecot/auth-userdb info_log_path = /var/log/dovecot/deliver.log lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot/deliver.log mail_fsync = optimized mail_plugin_dir = /usr/local/lib/dovecot/lda mail_plugins = $mail_plugins postmaster_address = postmas...@olypen.com quota_full_tempfail = yes rejection_reason = Your message to %t with subject of %s was automatically rejected:%n%r rejection_subject = Mailbox Full: %s sendmail_path = /usr/sbin/exim } protocol imap { imap_client_workarounds = delay-newmail
Re: [Dovecot] Arghh, dovecot-2 and lda
On 18.7.2010, at 19.57, Brandon Lamb wrote: 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index .. command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 Why are you giving -k parameter? I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped It looks like you're returning maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory.
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index .. command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 Why are you giving -k parameter? I dont remember, its something I had entered at some point long ago, i'll remove it I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped It looks like you're returning maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory. I know that was my thought too! But below are the fields in mysql, and there are also no logs being entered to give me hints at what might be wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda from the command line?? home: /mail/mail2/b/olypen.com/brandon maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index and dovecot-sql.conf-ext # Password query password_query = SELECT 8 AS userdb_uid, \ 8 AS userdb_gid, \ password, \ CONCAT(username, '@', domain) AS user, \ mail_pop.home AS userdb_home, \ mail_pop.maildir AS userdb_mail, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS userdb_sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 # User query user_query = SELECT mail_pop.home AS home, \ mail_pop.maildir AS mail, \ 8 AS uid, \ 8 AS gid, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 And the directory: server:/mail/mail2/b/olypen.com/brandon# ls -al total 8 drwxrwx--- 4 mail mail 32 Jul 18 00:54 . drwxrwx--- 3 mail mail 20 Jul 18 00:53 .. drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir drwx-w 4 mail mail 4096 Jul 18 01:20 mdbox
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index .. command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 Why are you giving -k parameter? I dont remember, its something I had entered at some point long ago, i'll remove it I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped It looks like you're returning maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory. I know that was my thought too! But below are the fields in mysql, and there are also no logs being entered to give me hints at what might be wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda from the command line?? home: /mail/mail2/b/olypen.com/brandon maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index and dovecot-sql.conf-ext # Password query password_query = SELECT 8 AS userdb_uid, \ 8 AS userdb_gid, \ password, \ CONCAT(username, '@', domain) AS user, \ mail_pop.home AS userdb_home, \ mail_pop.maildir AS userdb_mail, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS userdb_sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 # User query user_query = SELECT mail_pop.home AS home, \ mail_pop.maildir AS mail, \ 8 AS uid, \ 8 AS gid, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 And the directory: server:/mail/mail2/b/olypen.com/brandon# ls -al total 8 drwxrwx--- 4 mail mail 32 Jul 18 00:54 . drwxrwx--- 3 mail mail 20 Jul 18 00:53 .. drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir drwx-w 4 mail mail 4096 Jul 18 01:20 mdbox I also just now tried changing the maildir field to absolute paths and now I still get : No such file or directory: failed to chdir to maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index And still nothing in dovecot's logs showing that exim even talked to it..
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 12:17 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index .. command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 Why are you giving -k parameter? I dont remember, its something I had entered at some point long ago, i'll remove it I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped It looks like you're returning maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory. I know that was my thought too! But below are the fields in mysql, and there are also no logs being entered to give me hints at what might be wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda from the command line?? home: /mail/mail2/b/olypen.com/brandon maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index and dovecot-sql.conf-ext # Password query password_query = SELECT 8 AS userdb_uid, \ 8 AS userdb_gid, \ password, \ CONCAT(username, '@', domain) AS user, \ mail_pop.home AS userdb_home, \ mail_pop.maildir AS userdb_mail, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS userdb_sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 # User query user_query = SELECT mail_pop.home AS home, \ mail_pop.maildir AS mail, \ 8 AS uid, \ 8 AS gid, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 And the directory: server:/mail/mail2/b/olypen.com/brandon# ls -al total 8 drwxrwx--- 4 mail mail 32 Jul 18 00:54 . drwxrwx--- 3 mail mail 20 Jul 18 00:53 .. drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir drwx-w 4 mail mail 4096 Jul 18 01:20 mdbox I also just now tried changing the maildir field to absolute paths and now I still get : No such file or directory: failed to chdir to maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index And still nothing in dovecot's logs showing that exim even talked to it.. Curious, I just changed the maildir field to /mail/mail2/b/olypen.com/brandon/Maildir and now it delivered, curious! Its like it didnt understand the mailbox type or something?
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 12:27 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:17 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote: On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index .. command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d $local_p...@$domain -m $acl_m1 Why are you giving -k parameter? I dont remember, its something I had entered at some point long ago, i'll remove it I am returning a home and mail with userdb, the directory does exist, owned by mail.mail... Im stumped It looks like you're returning maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory. I know that was my thought too! But below are the fields in mysql, and there are also no logs being entered to give me hints at what might be wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda from the command line?? home: /mail/mail2/b/olypen.com/brandon maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index and dovecot-sql.conf-ext # Password query password_query = SELECT 8 AS userdb_uid, \ 8 AS userdb_gid, \ password, \ CONCAT(username, '@', domain) AS user, \ mail_pop.home AS userdb_home, \ mail_pop.maildir AS userdb_mail, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS userdb_sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 # User query user_query = SELECT mail_pop.home AS home, \ mail_pop.maildir AS mail, \ 8 AS uid, \ 8 AS gid, \ CONCAT('*:storage=', quota, 'M') AS quota_rule, \ '~/dovecot.sieve' AS sieve \ FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id) WHERE username = '%n' AND domain = '%d' AND mail_pop.status = 'enabled' LIMIT 1 And the directory: server:/mail/mail2/b/olypen.com/brandon# ls -al total 8 drwxrwx--- 4 mail mail 32 Jul 18 00:54 . drwxrwx--- 3 mail mail 20 Jul 18 00:53 .. drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir drwx-w 4 mail mail 4096 Jul 18 01:20 mdbox I also just now tried changing the maildir field to absolute paths and now I still get : No such file or directory: failed to chdir to maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index And still nothing in dovecot's logs showing that exim even talked to it.. Curious, I just changed the maildir field to /mail/mail2/b/olypen.com/brandon/Maildir and now it delivered, curious! Its like it didnt understand the mailbox type or something? So I switched mysql back to sending full path for home, and maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap works just fine, it seems like just lda doesnt understand the returned mail field
Re: [Dovecot] Arghh, dovecot-2 and lda
So I switched mysql back to sending full path for home, and maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap works just fine, it seems like just lda doesnt understand the returned mail field I meant maildir:~/maildir and mdbox:~/mdbox for *mail* field not home
Re: [Dovecot] Arghh, dovecot-2 and lda
On 18.7.2010, at 20.40, Brandon Lamb wrote: So I switched mysql back to sending full path for home, and maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap works just fine, it seems like just lda doesnt understand the returned mail field What does lda log with mail_debug=yes and auth_debug=yes?
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 12:47 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 20.40, Brandon Lamb wrote: So I switched mysql back to sending full path for home, and maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap works just fine, it seems like just lda doesnt understand the returned mail field What does lda log with mail_debug=yes and auth_debug=yes? Nothing, thats why Im scratching my head... If I return maildir:~/maildir or maildir:~/fullpath NOTHING is logged, but exim logs the error about no file or directory. But if I return just fullpath for mail, then it delivers mail AND logs debugging. seems like maybe it bails out before writing a log or something.
Re: [Dovecot] Arghh, dovecot-2 and lda
On 18.7.2010, at 19.57, Brandon Lamb wrote: In my exim log i just see these 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index Actually, there is no such error message in Dovecot code. It's exim that logs this error..
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 1:02 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: In my exim log i just see these 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index Actually, there is no such error message in Dovecot code. It's exim that logs this error.. Right but that means exim is talking to dovecot-lda because it is getting the maildir:~/maildir value, no way exim could no that unless dovecot told it. So then there SHOULD be a log in debug or deliver from lda if exim got that showing *something* right?
Re: [Dovecot] Arghh, dovecot-2 and lda
On 18.7.2010, at 21.28, Brandon Lamb wrote: On Sun, Jul 18, 2010 at 1:02 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: In my exim log i just see these 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index Actually, there is no such error message in Dovecot code. It's exim that logs this error.. Right but that means exim is talking to dovecot-lda because it is getting the maildir:~/maildir value, no way exim could no that unless dovecot told it. So then there SHOULD be a log in debug or deliver from lda if exim got that showing *something* right? Or is it possible that Exim looks up mail field as a home directory from the database? I think this error happens before dovecot-lda is even run (it's chdiring before running it).
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 1:33 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 21.28, Brandon Lamb wrote: On Sun, Jul 18, 2010 at 1:02 PM, Timo Sirainen t...@iki.fi wrote: On 18.7.2010, at 19.57, Brandon Lamb wrote: In my exim log i just see these 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com R=router_pop T=dovecot_deliver defer (2): No such file or directory: failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index Actually, there is no such error message in Dovecot code. It's exim that logs this error.. Right but that means exim is talking to dovecot-lda because it is getting the maildir:~/maildir value, no way exim could no that unless dovecot told it. So then there SHOULD be a log in debug or deliver from lda if exim got that showing *something* right? Or is it possible that Exim looks up mail field as a home directory from the database? I think this error happens before dovecot-lda is even run (it's chdiring before running it). But I thought exim just pipes the mail to dovecot-lda and then dovecot-lda looks up the user info, home and mail location and actually writes the file, exim doesnt do any database lookups or am I totally in the dark? OH! Well damn, look I have a router_home_directory, so... hm, do I assume exim passes this to dovecot-lda somehow as an environment variable or something? I swear I looked at this like 50 times last night... router_pop: debug_print= R: dovecot_deliver for $local_p...@$domain driver = accept transport = dovecot_deliver local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('', '${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') ) AND SQL_POP.status != 'disabled' router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = '${quote_mysql:$domain}' LIMIT 1}} user = 8 group = 8
Re: [Dovecot] Arghh, dovecot-2 and lda
Or is it possible that Exim looks up mail field as a home directory from the database? I think this error happens before dovecot-lda is even run (it's chdiring before running it). But I thought exim just pipes the mail to dovecot-lda and then dovecot-lda looks up the user info, home and mail location and actually writes the file, exim doesnt do any database lookups or am I totally in the dark? OH! Well damn, look I have a router_home_directory, so... hm, do I assume exim passes this to dovecot-lda somehow as an environment variable or something? I swear I looked at this like 50 times last night... router_pop: debug_print= R: dovecot_deliver for $local_p...@$domain driver = accept transport = dovecot_deliver local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('', '${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') ) AND SQL_POP.status != 'disabled' router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = '${quote_mysql:$domain}' LIMIT 1}} user = 8 group = 8 Look its MAGIC! Removed the route_home_directory line and BAM! I have my mail! Dood you rock! I seriously need to buy one of those dinner bells to ring at work for stuff like this that has been a 5 hour struggle =P
Re: [Dovecot] Arghh, dovecot-2 and lda
On Sun, Jul 18, 2010 at 1:40 PM, Brandon Lamb brandonl...@gmail.com wrote: Or is it possible that Exim looks up mail field as a home directory from the database? I think this error happens before dovecot-lda is even run (it's chdiring before running it). But I thought exim just pipes the mail to dovecot-lda and then dovecot-lda looks up the user info, home and mail location and actually writes the file, exim doesnt do any database lookups or am I totally in the dark? OH! Well damn, look I have a router_home_directory, so... hm, do I assume exim passes this to dovecot-lda somehow as an environment variable or something? I swear I looked at this like 50 times last night... router_pop: debug_print= R: dovecot_deliver for $local_p...@$domain driver = accept transport = dovecot_deliver local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('', '${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') ) AND SQL_POP.status != 'disabled' router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND domain = '${quote_mysql:$domain}' LIMIT 1}} user = 8 group = 8 Look its MAGIC! Removed the route_home_directory line and BAM! I have my mail! Dood you rock! I seriously need to buy one of those dinner bells to ring at work for stuff like this that has been a 5 hour struggle =P You may want to add some hint about this on the wiki, something to the effect of watching whether your router passes a home directory if you are expecting the userdb field to be used, etc
[Dovecot] Proxy IMAP/POP/ManageSieve/SMTP in a large cluster enviroment
Hi to all in the list, we are trying to do some tests lab for a large scale mail system having this requirements: - Scale to maybe 1million users(Only for testing). - Server side filters. - User quotas. - High concurrency. - High performance and High Availability. We plan to test this using RHEL5 and maybe RHEL6. As a storage we are going to use an HP EVA 8400 FC(8 GB/s) We defined this functional roles. 1- Outgoing SMTP gateway servers. - Load balanced with Piranha LVS using Direct Routing. - ( n servers)RHEL5/6 using Postfix Latest version Amavisd-new Clamav Spamassasin maybe some other filters. 2- Incomming SMTP gateway servers. - Load balanced with Piranha LVS using Direct Routing. - RHEL5/6 using Postfix Latest version Amavisd-new Clamav Spamassasin( n servers) maybe some other filters. 3- Webmail Cluster farm. - Load balanced with Piranha LVS using Direct Routing. - ( n servers)RHEL5/6 using RHCS Active/Active. Apache2 PHP5 Horde. 4- Openldap load balanced openldap cluster. - Load balanced with Piranha LVS using Direct Routing. - ( n servers)RHEL5/6 using Openldap. 5- IMAP/POP/ManageSieve/SMTP Proxy or Director. - Load balanced with Piranha LVS using Direct Routing. - ( n servers)RHEL5/6 using Dovecot - Postfix(Director or Proxy). 6- Mail backend. - ( n servers)RHEL5/6 using Dovecot. Now for functional role 6 Mail Backend we have some dilemmas. - Recommended scalable filesystem to use for such scenario(Clustered or not). -GFS2?? We have very bad experiences with GFS1 and maildir, GFS2 doesn't seems to improve this also. Using some techniques for session afinity with a backend server seems to help with the locking problems of GFS and the cache. Using GFS many IMAP SMTP servers can in parallel write or read to user mailboxes, if GFS can perform well we prefer this, will have to proxy o use director for the cache problem. - Ext4, Ext3 well tested with many setups but only one backend server can access one ext4 lun, so we have to proxy a user always to a ip backend address or VIP in a case of failure cluster software has to move the server to another node, the cluster service is formed by a IP Address and one or many Luns wich moves from node to node in a case of failure. - Recommended scalable method for partition divition. - Directory Hashing(How it actually works the theory behind this), we see the wiki but we need to understand the theory to balance the directory structure. - Using some criteria ex Lun1(a-h users), Lun2(i-m users) - Proxy or Director is a must for a Clustered Filsystem or for the solution of a user belonging to one server. - In case we use a Proxy with dovecot we know we can use it with IMAP/POP but are not sure for ManageSieve and more important for SMTP. The question is, how can we proxy for the same user IMAP/POP/ManageSieve and SMTP delivery to mailbox at the same time, can the incoming mail gateways send the email to the proxy servers and dovecot proxy the request for smtp or lmtp appply the same proxy criteria that uses for the protocols IMAP and POP and send the email to the correct backend server and this server do the final delivery?? I mean proxy all the protocols for a user IMAP/POP/SMTP-LMTP?? Any example... Right now we have doubts on this stuff, we are really going to appreciate any help or advice on this... best regards
Re: [Dovecot] Proxy IMAP/POP/ManageSieve/SMTP in a large cluster enviroment
Hello, just my comment on you topic: if I'd design such setup, I'd expect, that sooner or later some additional flexibility is needed, that there will be same tasks you never thought about in advance. I'm not sure, if in such case I'd rely on Postfix. Postfix might be fast, but it is by no means as flexibile as Exim is. Missing performance (of Exim, if this matters) you can buy using more servers. Missing flexibility you can't get easily. Just my two cents - and because you asked ☺ -- Heiko signature.asc Description: Digital signature
Re: [Dovecot] Proxy IMAP/POP/ManageSieve/SMTP in a large cluster enviroment
BTW, and I'm not sure, if you still need amavis, as direct scanning (using clamav or some other scanner) will be faster. Same is for Spamassassin, as long as you use it as filter and not just as some evaluator. -- Heiko signature.asc Description: Digital signature
Re: [Dovecot] Unable to get Dovecot LDA/deliver working
I've added some more information. This is the error. 2010-07-18T03:15:55.870734+02:00 h1690529 postfix/pipe[20360]: CC8F2AEC087: to=t...@domain.com, relay=dovecot, delay=0.03, delays=0.01/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure) I don't have any clue what this warning/error means. I was 'playing' with /etc/postfix/master.cf. dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${us...@${nexthop} I've tried several parameters like -d username, -m mailbox or -d ${user}. 2010-07-18T03:43:27.569493+02:00 h1690529 postfix/pipe[3723]: 81238AEC087: to=t...@domain.com, relay=dovecot, delay=0.04, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (delivered via dovecot service) It looks like it was delivered properly, but it wasn't. I was written to /home/vmail/Maildir instead of /home/vmail/test/Maildir. All incoming e-mail was delivered to /home/vmail/Maildir if i used deliver -d username -m mailbox My LDAP tree looks like this and it's very simple. dc=domain,dc=com +contacts (Thunderbird contacts) +groups (mainly Posix groups for applications) +users (real users and mailing lists) So the DN of the user 'test' is uid=test,ou=users,dc=domain,dc=com I want e-mail sent to t...@domain.com or for example test.test.t...@domain being delivered in the maildir of the user 'test'. I'm almost sure it has something to do with the deliver parameters. What can it be? I'm planning to build a new server. I've done it before. Everytime I make the same mistake again. That's something what I want to prevent. Thanks again in advance, Frank -- From: Daniel Luttermann dan...@dlutt.de Sent: Sunday, July 18, 2010 8:55 PM To: dovecot@dovecot.org Subject: Re: [Dovecot] Unable to get Dovecot LDA/deliver working Frank van Amsterdam wrote on 18.07.2010: I want to setup Dovecot LDA, but I don't understand what I'm doing anymore. I have to note that I'm a Linux beginner. I've been trying now for several months and I'm about to give up. Till so far I'm having no result. :-( My current setup is done as described at http://www.linuxmail.info. We use Postfix 2.3.3 (with Postgrey, Spamassassin and ClamAV), Dovecot 1.2.11 and OpenLDAP 2.4.1 on CentOS 5.5. All incoming e-mail are delivered by Postfix in the users' maildir. We use this as a base for SOGo, our groupware solution and it runs smoothly. I have to setup a new mailserver, because we're standardising on Debian. My employer wants to have new functions like out-of-office-replies and forwarding. I want to make use of sieve. Unfortunately I don't know anyone who can help me. If you would like to use Sieve you should use the Dovecot LDA instead of the Postfix LDA virtual. You can also use the ManageSieve service so that users can create their own Sieve scripts. Some clients supports it like Horde Ingo, Thunderbird with plugin... When you use Debian (Lenny) you should use Dovecot from backports (current: 1.2.11) instead of the stable repository. The Postfix version that comes with Debian Lenny (2.5.5) is OK so it's not needed to update. I think the easiest way to implement the Dovecot LDA is to use virtual_transport or transport_maps if you use virtual users or within mailbox_command for system users - but this depends on your environment/configuration. My problem is that I don't understand how the delivery process is working. I've read much documentation from Postfix and Dovecot, but I find it too difficult to understand. Hmm, there's not much to say about that... If you use virtual_tranport or transport_maps then Postfix sends the mail to the Dovecot LDA. The Dovecot LDA handles further delivery of the mail. What do I understand? I know that I have to make changes in /etc/dovecot, /etc/postfix/main.cf and /etc/postfix/master.cf as described at http://wiki.dovecot.org/LDA. For Postfix all relevant informations are here: http://wiki.dovecot.org/LDA/Postfix -- Daniel
Re: [Dovecot] Unable to get Dovecot LDA/deliver working
On 19.7.2010, at 0.42, Frank van Amsterdam wrote: 2010-07-18T03:15:55.870734+02:00 h1690529 postfix/pipe[20360]: CC8F2AEC087: to=t...@domain.com, relay=dovecot, delay=0.03, delays=0.01/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure) I don't have any clue what this warning/error means. It means you haven't found the real error message. http://wiki.dovecot.org/LDA#logging
Re: [Dovecot] Haha wow, thats freakin cool... mdbox
Daniel Luttermann put forth on 7/18/2010 1:05 PM: Stan Hoeppner wrote on 18.07.2010: What happens when these indexes become corrupted, get accidentally deleted, or have the permissions accidentally changed in a way that they become unreadable by Dovecot? Does Dovecot still report the messages as being in the correct folder? during my tests I've copied and deleted some mails, copied whole mdbox-files etc. and after some time the IMAP session was dropped by Dovecot. In the logfile I've found this: Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Error: Corrupted transaction log file /home/vmail/dlutt.de/testuser/mdbox/mailboxes/Papierkorb/dbox-Mails/dovecot.index.log seq 2: file size shrank (sync_offset=14724) Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Error: Index /home/vmail/dlutt.de/testuser/mdbox/mailboxes/Papierkorb/dbox-Mails/dovecot.index: Lost log for seq=2 offset=14724 Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Warning: fscking index file /home/vmail/dlutt.de/testuser/mdbox/mailboxes/Papierkorb/dbox-Mails/dovecot.index Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Warning: mdbox /home/vmail/dlutt.de/testuser/mdbox/storage: rebuilding indexes Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Error: /home/vmail/dlutt.de/testuser/mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index reset, view is now inconsistent Jul 18 17:36:18 tux dovecot: imap(testu...@dlutt.de): Disconnected: IMAP session state is inconsistent, please relogin. bytes=119/850 After a relogin all mails were available and readable without manually fixing the index. Don't know if this always successful but it seems that Dovecot can rebuild the index without problems. That's not the scenario I described. You manipulated mail files which Dovecot had already indexed, and Dovecot rebuilt the indexes when I saw the file locations had changed. The key here is that you manually, physically, moved files around to different directories. All Dovecot must do at that point is look at where those files now reside, and rebuild the index according to their current location. What I was asking is what happens when you manually delete the index file out from underneath Dovecot? If files never got moved, but the index file says they're in dir X when they physically reside in dir Y, how does Dovecot recover and correctly recreate the index? At this point Dovecot has no information about the files having been moved because the index file which contains this Y -- X mapping information is now gone, deleted. -- Stan