Re: Dovecot logrotation - old journal files are still in use
Hi Aki was right, full path to doveadm binary solve the issue. Now logs are renewed. Thank you very much Thanks to all for your time Denis 14.03.2019, 09:44, "Denis V Razumovskiy" : > Hi all > > Cannot understand, does it a bug or just a misconfiguration. In my Dovecot > there are 3 files of logging (debug, info and .log) > While executing logrotation, the new files are created, but old ones, namely > dovecot.*.1 are still in use by the process > > I use next logrotate config for dovecot: > /var/log/dovecot.log /var/log/dovecot.info /var/log/dovecot.debug { > daily > rotate 14 > missingok > notifempty > compress > delaycompress > sharedscripts > postrotate > doveadm log reopen > chmod 666 /var/log/dovecot.log > chmod 666 /var/log/dovecot.info > chmod 666 /var/log/dovecot.debug > endscript > } > > Here is the logger process in memory: > root 19140 0.0 0.0 4140 1576 ? S Mar12 0:06 dovecot/log > > Here the files it uses after the daily logrotation: > # lsof -p19140 |grep log > ... > log 19140 root 33w REG 9,3 811 417675 > /var/log/dovecot.log.1 > log 19140 root 34w REG 9,3 2842123 417681 > /var/log/dovecot.info.1 > log 19140 root 35w REG 9,3 14853918 417683 > /var/log/dovecot.debug.1 > ... > > On manually issuing 'doveadm log reopen` used files are changed to > # lsof -p19140 |grep dovecot\\\. > ... > log 19140 root 33w REG 9,3 0 417651 /var/log/dovecot.log > log 19140 root 34w REG 9,3 121374 417690 > /var/log/dovecot.info > log 19140 root 35w REG 9,3 916153 417691 > /var/log/dovecot.debug > > as it is expected to be > What can be the root of the issue? > > I use Dovecot as LDA for Postfix with system users, mbox mail format. System > Slackware 12.0 x86, Postfix 2.4.5, Dovecot 2.2.36. Interconnect > Postfix-Dovecot was made via mailbox_command > Dovecot compiled from sources > > Logging configuration (file conf.d/10-logging.conf) contains the following: > > log_path = /var/log/dovecot.log > info_log_path = /var/log/dovecot.info > debug_log_path = /var/log/dovecot.debug > > auth_verbose = yes > auth_verbose_passwords = yes > auth_debug = yes > mail_debug = yes > verbose_ssl = yes > > plugin { > } > > Could the fact, that Postfix require Dovecot logs to be accessible someway, > result in such a weird behavior? To allow other processes to access Dovecot > logs I had to chmod 0666 all the current logs while integrating Dovecot into > Postfix delivery (please see `chmod' commands in the logrotate config above) > > Thank you > Denis Razoumovskiy С уважением, Денис Разумовский
Dovecot logrotation - old journal files are still in use (second attempt)
Hi all Sorry, it is the second attempt due to wrong format of the first message. In my Dovecot there are 3 files of logging (debug, info and .log) While executing logrotation, the new files are created, but the previos ones, namely dovecot.*.1 are still in use by the process Here is the logger process in memory: root 19140 0.0 0.0 4140 1576 ? S Mar12 0:06 dovecot/log Here the files it uses after the daily logrotation had happened: # lsof -p19140 |grep log ... log 19140 root 33w REG9,3 811 417675 /var/log/dovecot.log.1 log 19140 root 34w REG9,3 2842123 417681 /var/log/dovecot.info.1 log 19140 root 35w REG9,3 14853918 417683 /var/log/dovecot.debug.1 ... After the manual issue 'doveadm log reopen` command the files are changed to # lsof -p19140 |grep dovecot\\\. ... log 19140 root 33w REG9,3 0 417651 /var/log/dovecot.log log 19140 root 34w REG9,3 121374 417690 /var/log/dovecot.info log 19140 root 35w REG9,3 916153 417691 /var/log/dovecot.debug as it is expected to be. I use the logrotate config for dovecot instance: /var/log/dovecot.log /var/log/dovecot.info /var/log/dovecot.debug { daily rotate 14 missingok notifempty compress delaycompress sharedscripts postrotate doveadm log reopen chmod 666 /var/log/dovecot.log chmod 666 /var/log/dovecot.info chmod 666 /var/log/dovecot.debug endscript } At the same time, dovecot itself still uses previous logs: # lsof |grep var\/log\/dovecot\. dovecot 19138 root8w REG9,3 12962 417613 /var/log/dovecot.log.1 (deleted) dovecot 19138 root9w REG9,3 4097250 416836 /var/log/dovecot.info.1 (deleted) dovecot 19138 root 10w REG9,3 23816347 417603 /var/log/dovecot.debug.1 (deleted) What can be the root of the issue? I use Dovecot as LDA for Postfix with system users, mbox mail format. System Slackware 12.0 x86, Postfix 2.4.5, Dovecot 2.2.36. Interconnect Postfix-Dovecot has been made via `mailbox_command = ...' Dovecot was compiled from sources Logging configuration (file conf.d/10-logging.conf) contains the following: log_path = /var/log/dovecot.log info_log_path = /var/log/dovecot.info debug_log_path = /var/log/dovecot.debug auth_verbose = yes auth_verbose_passwords = yes auth_debug = yes mail_debug = yes verbose_ssl = yes plugin { } Could the fact, that Postfix require Dovecot logs to be accessible someway, result in such a weird behavior? To allow other processes to access Dovecot logs I had to chmod 0666 all the current logs while integrating Dovecot into Postfix delivery (please see `chmod' commands in the logrotate config above) Please ignore my previos post https://dovecot.org/pipermail/dovecot/2019-March/115075.html Thank you Denis Razoumovskiy
Dovecot logrotation - old journal files are still in use
Hi all Cannot understand, does it a bug or just a misconfiguration. In my Dovecot there are 3 files of logging (debug, info and .log)While executing logrotation, the new files are created, but old ones, namely dovecot.*.1 are still in use by the process I use next logrotate config for dovecot:/var/log/dovecot.log /var/log/dovecot.info /var/log/dovecot.debug { daily rotate 14 missingok notifempty compress delaycompress sharedscripts postrotate doveadm log reopen chmod 666 /var/log/dovecot.log chmod 666 /var/log/dovecot.info chmod 666 /var/log/dovecot.debug endscript}Here is the logger process in memory:root 19140 0.0 0.0 4140 1576 ? S Mar12 0:06 dovecot/log Here the files it uses after the daily logrotation:# lsof -p19140 |grep log...log 19140 root 33w REG 9,3 811 417675 /var/log/dovecot.log.1log 19140 root 34w REG 9,3 2842123 417681 /var/log/dovecot.info.1log 19140 root 35w REG 9,3 14853918 417683 /var/log/dovecot.debug.1...On manually issuing 'doveadm log reopen` used files are changed to# lsof -p19140 |grep dovecot\\\log 19140 root 33w REG 9,3 0 417651 /var/log/dovecot.loglog 19140 root 34w REG 9,3 121374 417690 /var/log/dovecot.infolog 19140 root 35w REG 9,3 916153 417691 /var/log/dovecot.debug as it is expected to beWhat can be the root of the issue? I use Dovecot as LDA for Postfix with system users, mbox mail format. System Slackware 12.0 x86, Postfix 2.4.5, Dovecot 2.2.36. Interconnect Postfix-Dovecot was made via mailbox_commandDovecot compiled from sources Logging configuration (file conf.d/10-logging.conf) contains the following:log_path = /var/log/dovecot.loginfo_log_path = /var/log/dovecot.infodebug_log_path = /var/log/dovecot.debugauth_verbose = yesauth_verbose_passwords = yesauth_debug = yesmail_debug = yesverbose_ssl = yesplugin {}Could the fact, that Postfix require Dovecot logs to be accessible someway, result in such a weird behavior? To allow other processes to access Dovecot logs I had to chmod 0666 all the current logs while integrating Dovecot into Postfix delivery (please see `chmod' commands in the logrotate config above) Thank youDenis Razoumovskiy
[Dovecot] Problem with virtual user mailbox initialization
Hello, I'm trying to set up a postfix/dovecot server where postfix hands over incoming mail to dovecot using lmtp virtual transport via a Unix socket. Dovecot is then supposed to write the mail to /var/mail/// using a virtual users setup. It seems to work except for failing when the mailbox is supposed to be initially created: Jun 22 03:25:04 lmtp(2400, dka...@foo.org): Error: user dka...@foo.org: Initialization failed: Namespace '': mkdir(/var/mail/foo.org/dkasak) failed: Permission denied (euid=5000(postman) egid=5000(postman) missing +w perm: /var/mail, we're not in group 6(mail), dir owned by 0:6 mode=0775) As can be seen from the error message, I've set mail_uid and mail_gid to account/group postman. /var/mail/ is empty and owned by root:mail so I've also set mail_privileged_group = mail. I was under the impression that mail_privileged_group is used precisely for these situations (when dotlocking or initial creation of the mailbox fail due to insufficient privileges), but it still doesn't work. If I either set mail_gid = mail, or set mail_access_groups = mail, or create foo.org/ owned by postman:postman by hand, it works as expected. Here is the complete configuration: # 2.2.2: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 9.1-RELEASE-p4 i386 ufs base_dir = /var/run/dovecot/ mail_gid = postman mail_location = maildir:/var/mail/%d/%n/:LAYOUT=fs mail_privileged_group = mail mail_uid = postman managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave 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 = separator = / type = private } passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users driver = passwd-file } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap lmtp service auth-worker { user = $default_internal_user } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service imap-login { inet_listener imap { port = 143 } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } ssl = required ssl_cert =
Re: [Dovecot] postfix, dovecot, samba, winbind
Am 28.02.2013 um 19:00 schrieb Bob Miller : > It has been a few months since I worked out all the settings to > authenticate against samba's AD, but I think you can solve your problem > by putting a home argument in your userdb{} stanza. If that doesn't > work, and assuming you are authenticating using ldap lookups, let me > know and I can share more of how I set things up… Hi Bob, thanks for your reply. How do I set up the home argument? When I put it into the args= line dovecot doesn't find my config file. If I put a home= line it doesn't work either. In the dovecot wiki I could only find an example with home= for a static userdb config. Thanks!
[Dovecot] postfix, dovecot, samba, winbind
Hello List, we're currently working on the migration of our LDAP/Samba3-Domain to Samba4-Active-Directory. So far everything works fine. Postfix can deliver Mails using ProxyAddresses-Information from the AD and Dovecot delivers the mail. Unfortunately when Postfix tells Dovecot to deliver the mail he submit the username without the AD-Domain part: Feb 28 17:17:59 tpdc postfix/pickup[30396]: 5DDAE2C0C2B: uid=0 from= Feb 28 17:17:59 tpdc postfix/cleanup[30402]: 5DDAE2C0C2B: message-id=<20130228161759.5ddae2c0...@mx0.concepts-and-training.de> Feb 28 17:17:59 tpdc postfix/qmgr[30395]: 5DDAE2C0C2B: from=, size=463, nrcpt=1 (queue active) Feb 28 17:17:59 tpdc dovecot: lda(dwitt): msgid=<20130228161759.5ddae2c0...@mx0.concepts-and-training.de>: saved mail to INBOX Feb 28 17:17:59 tpdc postfix/local[30404]: 5DDAE2C0C2B: to=, orig_to=, relay=local, delay=0.24, delays=0.1/0.01/0/0.13, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver) Feb 28 17:17:59 tpdc postfix/qmgr[30395]: 5DDAE2C0C2B: removed So Dovecot saves the Mail to "/var/mail/dwitt/", which is fine for me. The Problem kicks in when I try to read my Mail. Dovecot uses "TESTDOM\dwitt" as username and so he didn't find the Mailbox and create a new one in "/var/mail/TESTDOM\dwitt". I tried to fix it with auth_username_translation and auth_username_format but it doesn't work. Any ideas? Thanks!
Re: [Dovecot] Dovolená
Hello all, On Mon, Dec 26, 2011 at 12:45 PM, wrote: > > V případě nutnosti volejte na mobil. > > Indeed, it sounds like a call to action ;-) Merry Christmas to everyone! --- wbr, Denis.
[Dovecot] dovecot2 on Snow Leopard trouble
Hello list, I have one task to complete - to install and configure imap server on Mac Mini OS X 10.6.8. I'm not new to dovecot, so the favorite imap server is dovecot. Are there any special settings running dovecot on OS X ? I've compiled dovecot 2.0.13 with mysql5 and openssl via macports. Configured virtual users from mysql and turned on all debug, but when I connect to this server via MUA I'm receiving the message "Mailbox locked. Next try in XX seconds" or something like that. No errors in dovecot.log, clean auth process, correct data (passwords,spool dirs) from mysql. Same configuration works on Linux,FreeBSD and Solaris like a charm. What can be a problem running on OS X ?
Re: [Dovecot] Please help with Quota dict mysql configuration
Finally i've figured out this thing. Thanks for your assistance. Suddenly i've found your old post regarding same problem: http://www.mail-archive.com/dovecot@dovecot.org/msg16388.html +searching user_query in dovecot wiki found same description there http://wiki2.dovecot.org/Quota/Configuration?highlight=%28user_query%29 i dont know why i have seen this before. i can say one more thing. in quota.conf next string has no sense coz it's overided by sql query and quota is set by postfix admin. i had other headache for an hour while figured this out. no sense quota_rule = *:storage=1G:messages=1 (maybe for system users and/or users which are not binded to sql) what ever other quota_rule numbers for global settings but not quota_rule. so thanks again moving to next problems with other plugins like expire...there is no expire table in sql
Re: [Dovecot] Please help with Quota dict mysql configuration
Hm, it looks very straighforward and not so flexible. i want get this string get working. some missconfiguration of arguments and syntax. i dont wanna mannually insert amount of message or bytes, if it's possible i would like everything to be read from database quota.conf Hope developers would see this thread and help also i understood aalmost all strings in query concat('/home/vmail/', maildir) as home - virtual users home directory concat('maildir:/home/vmail/', maildir) as mail - virtualusers maildirectory floor(quota/1000) - seems to be minimal quota for user. users quota devided by 1000 so for now i've tried to do next query string changed quota to quota_rule user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, concat('dict:storage=',floor(quota/1000),' proxy::quotadict') AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' plugin { quota = dict:User quota::proxy::quotadict quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M } dict { quotadict = mysql:/etc/dovecot/conf.d/sql/dovecot-dict-sql.conf # expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf } and now error Jun 24 13:19:59 imap: Debug: Added userdb setting: mail=maildir:/home/vmail/office.dev/test/ Jun 24 13:19:59 imap: Debug: Added userdb setting: plugin/quota_rule=dict:storage=10240 proxy::quotadict Jun 24 13:19:59 imap(t...@office.dev): Debug: Effective uid=1001, gid=12, home=/home/vmail/office.dev/test/ Jun 24 13:19:59 imap(t...@office.dev): Debug: Quota root: name=User quota backend=dict args=:proxy::quotadict Jun 24 13:19:59 imap(t...@office.dev): Warning: quota root User quota rule dict:storage=10240 proxy::quotadict: obsolete configuration for rule 'storage=10240 proxy' should be changed to 'storage=+10240 proxy' Jun 24 13:19:59 imap(t...@office.dev): Debug: Quota rule: root=User quota mailbox=dict bytes=+10240 messages=0 Jun 24 13:19:59 imap(t...@office.dev): Error: user t...@office.dev: Initialization failed: Failed to initialize quota: Invalid quota root quota: Invalid rule dict:storage=10240 proxy::quotadict: Invalid rule limit value: storage=10240 proxy Jun 24 13:19:59 imap(t...@office.dev): Error: Invalid user settings. Refer to server log for more information. Jun 24 13:19:59 imap-login: Info: Login: user=, method=PLAIN, rip=192.168.0.11, lip=192.168.0.31, mpid=5742, TLS Jun 24 13:19:59 imap-login: Warning: SSL alert: where=0x4008, ret=256: warning close notify [192.168.0.11] > > Here it is. > > # Database driver: mysql, pgsql > driver = mysql > > # Currently supported schemes include PLAIN, PLAIN-MD5, DIGEST-MD5, and > CRYPT. > default_pass_scheme = CRYPT > > # Database options > connect = host=192.xxx.xxx.xxx dbname=postfix user=postfix > password=mypostfixpassword > > password_query = select password \ > from mailbox where username = '%u' \ > and active = '1' > > user_query = select maildir, \ > concat('*:messages=5:bytes=', quota) as quota_rule \ > from mailbox where username = '%u' and active = '1' > > > Gr > Johan >
Re: [Dovecot] Please help with Quota dict mysql configuration
After doing some configrations i got errors with quota and my setup is brocken now: dict: dict { quotadict = mysql:/etc/dovecot/conf.d/sql/dovecot-dict-sql.conf # expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf } dovecot-dict-sql.conf: connect = host=localhost dbname=postfix user=postfix password=postfixadmin 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 } quota plugin config: plugin { quota = dict:User quota::proxy::quotadict quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M } user_query field: user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, concat('dict:storage=',floor(quota/1000),' proxy::quotadict') AS quota FROM mailbox WHERE username = '%u' AND active = '1' Errors log: dovecot.log: Jun 24 11:41:24 imap: Debug: Loading modules from directory: /usr/lib/dovecot Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib11_imap_quota_plugin.so Jun 24 11:41:24 imap: Debug: Module loaded: /usr/lib/dovecot/lib20_autocreate_plugin.so Jun 24 11:41:24 imap: Debug: Added userdb setting: mail=maildir:/home/vmail/office.dev/test/ Jun 24 11:41:24 imap: Debug: Added userdb setting: plugin/quota=dict:storage=10240 proxy::quotadict Jun 24 11:41:24 imap(t...@office.dev): Debug: Effective uid=1001, gid=12, home=/home/vmail/office.dev/test/ Jun 24 11:41:24 imap(t...@office.dev): Debug: Quota root: name=storage=10240 proxy backend=dict args=:quotadict Jun 24 11:41:24 imap(t...@office.dev): Debug: Quota rule: root=storage=10240 proxy mailbox=* bytes=1073741824 messages=0 Jun 24 11:41:24 imap(t...@office.dev): Debug: Quota rule: root=storage=10240 proxy mailbox=Trash bytes=+104857600 messages=0 Jun 24 11:41:24 imap(t...@office.dev): Debug: dict quota: user=t...@office.dev, uri=quotadict, noenforcing=0 Jun 24 11:41:24 imap(t...@office.dev): Error: Dictionary URI is missing ':': quotadict Jun 24 11:41:24 imap(t...@office.dev): Error: user t...@office.dev: Initialization failed: Failed to initialize quota: Quota root storage=10240 proxy: init() failed Jun 24 11:41:24 imap(t...@office.dev): Error: Invalid user settings. Refer to server log for more information. Jun 24 11:41:24 imap-login: Info: Login: user=, method=PLAIN, rip=192.168.0.11, lip=192.168.0.31, mpid=4611, TLS Jun 24 11:41:24 imap-login: Warning: SSL alert: where=0x4008, ret=256: warning close notify [192.168.0.11] # doveadm quota recalc doveadm(root): Error: chdir(/root/) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +x perm: /root, euid is not dir owner) doveadm(root): Error: chdir(/root) failed: Permission denied doveadm(root): Error: net_connect_unix(/var/run/dovecot//dict) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +r perm: /var/run/dovecot//dict, euid is not dir owner) why this command working in my home /root dir ? i have done next thing after: service dict { unix_listener dict { mode = 0660 user = vmail group = mail } } now i'm getting only next: ~]# doveadm quota recalc doveadm(root): Error: chdir(/root/) failed: Permission denied (euid=1001(vmail) egid=12(mail) missing +x perm: /root, euid is not dir owner) doveadm(root): Error: chdir(/root) failed: Permission denied Whats wrong. Please help.
Re: [Dovecot] Please help with Quota dict mysql configuration
Thanks for your samples, they would help me so much! My config is commented because i didn't know how to properly configure it, didn't understand theory to start doing things on practice. can you show me your dovecot-mysql.conf as well ? it should be final peace of puzzle for me. i'm interested in this two almost different user_query lines: user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1' user_query = SELECT maildir, 1001 AS uid, 1001 AS gid, CONCAT('dict:storage=',floor(quota/1000),' proxy::quota') as quota FROM mailbox WHERE username = '%u' AND active='1' first one provided from dovecot wiki and second one from postfixadmin docs regarding dovecot configuration. may i use user_query like this? : user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, CONCAT('dict:storage=',floor(quota/1000),' proxy::quota') AS quota FROM mailbox WHERE username = '%u' AND active = '1' seems like this line doing some nice customization showing quota in kilobytes and not in bytes. or if someone could explain what does this string means. also what does this line means ?: concat('maildir:/home/vmail/', maildir) as mail string about home i understood dovecot reads users home dir from this line. And i dont understand if why should i indicate in 10-mail.conf next string: mail_location = maildir:/home/vmail/%d/%u If it is overided by user_query from mysql? Also what is meaning of quota(2) table. does dovecot reading configuration from there or just stores usage information ? Also what does this string mean?: pattern = priv/quota/messages what privileges those who reads the, or where are they indicated ? Thanks in advance. Denis. > Maybe stupid, but are these plugin examples really from your dovecot.conf > file ? > If so remove the # before the quota lines! > > this is my part from dovecot.conf (only relavant quota parts.) > > quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota.conf > > plugin { > # Quota config > quota = dict:User quota::noenforcing:proxy::quotadict > quota_rule = *:storage=1G > quota_rule2 = Trash:storage=+100M > quota_warning = storage=95%% quota-warning 95 %u > quota_warning2 = storage=90%% quota-warning 90 %u > quota_warning3 = storage=80%% quota-warning 80 %u > #OTHER Plugins > > > } > > service quota-warning { > executable = script /usr/local/bin/quota-warning.sh > user = vmail > unix_listener quota-warning { > user = vmail > } > } > > protocol imap { > imap_client_workarounds = delay-newmail tb-extra-mailbox-sep > imap_idle_notify_interval = 120 s > imap_logout_format = bytes=%i/%o > imap_max_line_length = 65536 > mail_plugins = quota imap_quota autocreate acl imap_acl mail_log notify fts > fts_squat > } > > protocol lmtp { > auth_socket_path = /var/run/dovecot/auth-master > mail_plugins = sieve quota acl mail_log notify > postmaster_address = postmas...@yourdomain.com > sendmail_path = /usr/local/sbin/sendmail > } > > Above protocol lmtp could be protocol lda in your case > > This is my dovecot-dict-quota.conf file > > # Dovecot 2.0.x > connect = host=192.xxx.xxx.xxx dbname=postfix user=postfix > password=mypostfixpasswd > 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 > } > > This is my /usr/local/bin/quota-warning.sh file > > #!/usr/local/bin/bash > PERCENT=$1 > USER=$2 > cat << EOF | /usr/local/libexec/dovecot/deliver -d $USER -o > "plugin/quota=maildir:User quota:noenforcing" > From: supp...@yourdomain.com > Subject: quota warning > > Uw mailbox is momenteel voor $PERCENT% gevult. > Verwijder oude mail, of vraag een verruiming van uw quota aan. > > Your mailbox is now $PERCENT% full. > Please remove some old mail, or ask for a larger quota. > > Skrzynka pocztowa jest w tym momencie w $PERCENT% zapelniona. > Usun stare wiadomosci,albo przenies w inny folder. > > EOF > > Hope this helps. > > Regards, > Johan Hendriks > Double L Automatisering
[Dovecot] Please help with Quota dict mysql configuration
Hello So what i have: centos 5.6 postfix 2.3.3 dovecot 2.0.13 postfixadmin 2.3.3 roundcube 0.5.3 All general things are working right now i can send receive email with ssl connections etc... Now i'm trying to configure additional options like quota and some other plugins like sieve, trash, expire and deleted-to-trash. Configuration of quota is on first place. I have read wiki regarding quota config , dict config but can't make things running. Hope there are normal sample configs you can share with me. I'm total noob in sql, so it's very difficult for me to arrange stuff in a way i need. My configs: dict { quota = mysql:/etc/dovecot/conf.d/sql/dovecot-dict-sql.conf # expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf } dovecot-dict-sql.conf sample i took from postfixadmin docs provided with package, also changed table to quota2 as suggested for dovecot 2: driver = mysql connect = host=localhost dbname=postfix user=postfix password=postfixadmin default_pass_scheme = MD5-CRYPT table = quota2 select_field = current where_field = path username_field = username my sql.conf i took it from tutorial on your wiki : LDA postfix postfixadmin: driver = mysql connect = host=localhost dbname=postfix user=postfix password=postfixadmin user_query = SELECT concat('/home/vmail/', maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 1001 AS uid, 12 AS gid, concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1' #user_query = SELECT maildir, 1001 AS uid, 1001 AS gid, CONCAT('dict:storage=',floor(quota/1000),' proxy::quota') as quota FROM mailbox WHERE username = '%u' AND active='1' password_query = SELECT username as user, password, concat('/home/vmail/', maildir) as userdb_home, concat('maildir:/home/vmail/', maildir) as userdb_mail, 1001 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1' The second user_query string i took from postfixadmin docs. But i dont know how to aply it. If it is better to use with mysql/postfixadmin and after this all i dont how to configure quota.conf (90-quota.conf): plugin { #quota = dirsize:User quota #quota = maildir:User quota #quota = dict:User quota::proxy::quota #quota = fs:User quota } # Multiple quota roots are also possible, for example this gives each user # their own 100MB quota and one shared 1GB quota within the domain: plugin { #quota = dict:user::proxy::quota #quota2 = dict:domain:%d:proxy::quota_domain #quota_rule = *:storage=102400 #quota2_rule = *:storage=1048576 } Please help me with configuration. I really stuck with this thing. And yes i've tried to find solutions on mailing list, but no luck. I want per domain/user quota in mysql. Also space usage to be shown in roundcube. Hope to get proper help ... And sorry... Thanks in advance.
Re: [Dovecot] SSL comunication problems with client side.
i want users to login with username and password, but be sure that whole traffic betwen clint/server would be encrypted. after reading mailing list and google finally just a momment ago i have fixed problem with certs and this 2 options. my problem was in crl and i didnt understood how is should follow cacert. here is mini howto for openssl usage on mail server. please include in wiki, it will help many others!!! 0. prepare environment for openssl mkdir /etc/pki/CA/newcerts mkdir /etc/pki/CA/crl cd /etc/pki/CA echo 01 > serial touch index.txt echo 01 > crlnumber ln -s /etc/pki/tls/openssl.cnf openssl.cnf Edit /etc/pki/tls/openssl.cnf change CA directory to /etc/pki/CA change nsComment to whatever you want change other settings you want (default variables for certs) 1. Make your own CA openssl req -new -x509 -extensions v3_ca -utf8 -newkey rsa:2048 -sha1 -keyout private/cakey.pem -out cacert.pem -days 3650 -config ./openssl.cnf 2. Make default CRL openssl ca -gencrl -crlexts crl_ext -md sha1 -utf8 -config ./openssl.cnf -crldays 30 -out crl/crl.pem 3. combine your root cert with default empty CRL cat cacert.pem ./crl/crl.pem > cacrl.pem 4. make request for mail server certificate mkdir mail openssl req -new -nodes -newkey rsa:2048 -sha1 -utf8 -out mail/mail.req -keyout mail/mail.key -config ./openssl.cnf 5. issue certificate openssl ca -out mail/mail.pem -md sha1 -utf8 -days 3650 -config ./openssl.cnf -infiles mail/mail.req 6. convert root certificate to DER format openssl x509 -in cacert.pem -outform DER -out company.root.cert.der 7. convert mail cert into windows readable format PKCS#12. (or convert it to same .der format to secure key file) openssl pkcs12 -export -out mail/mail.p12 -inkey mail/mail.key -in mail/mail.pem -name "MyCompany Mail Server" 8. Give company.root.cert.der and mail.p12 certs to client for integration with his application (outlook, thunderbird, etc ...) 9. Edit your Dovecot ssl configuration and tell him location of cert files. ssl_cert = wrote: > On 6/13/2011 8:44 AM, Denis Iskandarov wrote: >> >> I've tried next thing: >> ssl = required >> ssl_verify_client_cert = no >> auth_ssl_require_client_cert = no >> >> And began getting emails. >> Successful logs attached. But i cant understand if data was passed with >> TLS. >> How can i enable those 2 options "ssl_verify_client_cert", >> "auth_ssl_require_client_cert" and get em working ? > > So do you want the client to authenticate with a certificate, or a username > and password? > > If you set up SSL on the server then things will be encrypted between the > client and server similar to how HTTPS works (only the server presents a > certificate). > > ssl_verify_client_cert, and auth_ssl_require_client_cert also expects for > the client to present its own certificate to the server. So there would be > a certificate for the server and one for each client in that case. > > Willie >
Re: [Dovecot] SSL comunication problems with client side.
again me. i got idea that i need crl but i didn't understand where it should be located? (and yes i read wiki but still...) from config above u can see my certs location: ssl_ca =
Re: [Dovecot] SSL comunication problems with client side.
ent56dev dovecot: imap-login: Warning: SSL: where=0x10, ret=1: before/accept initialization [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: before/accept initialization [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client hello A [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write server hello A [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write certificate A [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write server done A [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [192.168.0.11] Jun 13 14:40:37 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client key exchange A [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read finished A [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write change cipher spec A [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write finished A [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x20, ret=1: SSL negotiation finished successfully [192.168.0.11] Jun 13 14:40:38 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=1: SSL negotiation finished successfully [192.168.0.11] On Mon, Jun 13, 2011 at 5:42 PM, Denis Iskandarov wrote: > I can get messages without SSL with no problems. but i need to setup > server accept only SSL secured connections. > I think my configuration is very proper, but cant find "obvious" problem. > Postfix 2.3.3 + dovecot 2.0.13-1_129.el5 + PostfixAdmin 2.3.3 > I made own CA. configured postfix and dovecot with same cert key ca. > Same public cert i gave for client just converted it to PKCS#12. > I cant undestand valid and invalid certs strings in long, they look same. > You can check logs and config bellow. > > Also some other questions regarding SSL: > 1. How to make client MUA (thunderbird) automatically retrieve > certificate ? My thunderbird cant do it by itself so i'm importing > mail cert by myself. > 2. If i want to setup Roundcube/Squirrelmail webmail clients with TLS > support (https) i have to provide them with same certificates as > dovecot and postfix have. Or in this case i can use whatever > certificate dedicated for with "virtualhost"? > > > > dovecot-deliver.log: > Jun 13 13:26:42 imap-login: Info: Invalid certificate: unable to get > certificate CRL: /C=GE/ST=Tbilisi/O=Caucasus Digital Network/OU=Mail > Server/CN=mx.office.dev/emailAddress=hostmas...@office.dev > Jun 13 13:26:42 imap-login: Info: Invalid certificate: unable to get > certificate CRL: /C=GE/ST=Tbilisi/L=Tbilisi/O=Caucasus Digital > Network/OU=Caucasus Digital Network/CN=Caucasus Digital > Network/emailAddress=hostmas...@office.dev > Jun 13 13:26:42 imap-login: Info: Valid certificate: > /C=GE/ST=Tbilisi/L=Tbilisi/O=Caucasus Digital Network/OU=Caucasus > Digital Network/CN=Caucasus Digital > Network/emailAddress=hostmas...@office.dev > Jun 13 13:26:42 imap-login: Info: Valid certificate: > /C=GE/ST=Tbilisi/O=Caucasus Digital Network/OU=Mail > Server/CN=mx.office.dev/emailAddress=hostmas...@office.dev > Jun 13 13:26:42 auth: Info: PLAIN(?,192.168.0.11): Client didn't > present valid SSL certificate > Jun 13 13:26:42 auth: Info: LOGIN(?,192.168.0.11): Client didn't > present valid SSL certificate > Jun 13 13:26:42 auth: Info: PLAIN(?,192.168.0.11): Client didn't > present valid SSL certificate > Jun 13 13:26:42 imap-login: Info: Disconnected (client sent an invalid > cert): method=PLAIN, rip=192.168.0.11, lip=192.168.0.31, TLS > > > maillog. > Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: > where=0x10, ret=1: before/accept initialization [192.168.0.11] > Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: > where=0x2001, ret=1: before/accept initialization [192.168.0.11] > Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: > where=0x2001, ret=1: SSLv3 read client hello A [192.168.0.11] > Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: > where=0x2001, ret=1: SSLv3 write server hello A
[Dovecot] virtual users with postfix+dovecot plugin usage question
I'm interested in if i should enable plugins only in LDA as i understood that with postfix dovecot works only like LDA. For example i wanna use autocreate plugin for imap user i have enabled in both IMAP and LDA sections. Is it right or i had to configure it only in LDA section ? Than how quota and imap_quota work in imap section ? For what is it there if lda controls user maildirs ? Dovecot 2.0.13 protocol lda { mail_plugins = quota autocreate } protocol imap { imap_client_workarounds = delay-newmail mail_plugins = quota imap_quota autocreate } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
[Dovecot] SSL comunication problems with client side.
I can get messages without SSL with no problems. but i need to setup server accept only SSL secured connections. I think my configuration is very proper, but cant find "obvious" problem. Postfix 2.3.3 + dovecot 2.0.13-1_129.el5 + PostfixAdmin 2.3.3 I made own CA. configured postfix and dovecot with same cert key ca. Same public cert i gave for client just converted it to PKCS#12. I cant undestand valid and invalid certs strings in long, they look same. You can check logs and config bellow. Also some other questions regarding SSL: 1. How to make client MUA (thunderbird) automatically retrieve certificate ? My thunderbird cant do it by itself so i'm importing mail cert by myself. 2. If i want to setup Roundcube/Squirrelmail webmail clients with TLS support (https) i have to provide them with same certificates as dovecot and postfix have. Or in this case i can use whatever certificate dedicated for with "virtualhost"? dovecot-deliver.log: Jun 13 13:26:42 imap-login: Info: Invalid certificate: unable to get certificate CRL: /C=GE/ST=Tbilisi/O=Caucasus Digital Network/OU=Mail Server/CN=mx.office.dev/emailAddress=hostmas...@office.dev Jun 13 13:26:42 imap-login: Info: Invalid certificate: unable to get certificate CRL: /C=GE/ST=Tbilisi/L=Tbilisi/O=Caucasus Digital Network/OU=Caucasus Digital Network/CN=Caucasus Digital Network/emailAddress=hostmas...@office.dev Jun 13 13:26:42 imap-login: Info: Valid certificate: /C=GE/ST=Tbilisi/L=Tbilisi/O=Caucasus Digital Network/OU=Caucasus Digital Network/CN=Caucasus Digital Network/emailAddress=hostmas...@office.dev Jun 13 13:26:42 imap-login: Info: Valid certificate: /C=GE/ST=Tbilisi/O=Caucasus Digital Network/OU=Mail Server/CN=mx.office.dev/emailAddress=hostmas...@office.dev Jun 13 13:26:42 auth: Info: PLAIN(?,192.168.0.11): Client didn't present valid SSL certificate Jun 13 13:26:42 auth: Info: LOGIN(?,192.168.0.11): Client didn't present valid SSL certificate Jun 13 13:26:42 auth: Info: PLAIN(?,192.168.0.11): Client didn't present valid SSL certificate Jun 13 13:26:42 imap-login: Info: Disconnected (client sent an invalid cert): method=PLAIN, rip=192.168.0.11, lip=192.168.0.31, TLS maillog. Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x10, ret=1: before/accept initialization [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: before/accept initialization [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client hello A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write server hello A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write certificate A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write certificate request A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client certificate A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client key exchange A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read certificate verify A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read finished A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write change cipher spec A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write finished A [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x20, ret=1: SSL negotiation finished successfully [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL: where=0x2002, ret=1: SSL negotiation finished successfully [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL alert: where=0x4004, ret=256: warning close notify [192.168.0.11] Jun 13 13:26:42 cent56dev dovecot: imap-login: Warning: SSL alert: where=0x4008, ret=256: warning close notify [192.168.0.11] # doveconf -n # 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-238.9.1.el5 i686 CentOS release 5.6 (Final) ext3 auth_mechanisms = plain login auth_socket_path = /var/run/dovecot/auth-userdb auth_ssl_require_client_cert = yes auth_verbose = yes base_dir = /var/run/dovecot/ debug_log_path = /var/log/dove
Re: [Dovecot] Dovecot 1.2 + Sieve-0.1.19 not working please help
> You can't really install Dovecot from a binary and Sieve from sources, > unless there is also some kind of a "dovecot-devel" binary package. > Install both from binaries or both from sources. thanks and sorry. Sorry for that i forgot to update list, coz i found solution. I removed dovecot 1.2 and installed dovecot 2 rpms provided in download section on website. In this case i have Dovecot2 installed from rpms (with devel) + sieve installed from source ) no problems everything seems to be working (dovecot service starting without errors) not yet configured my spamfilter for sieve redirect spam messages to spam folder. Thanks anyway.
[Dovecot] Dovecot 1.2 + Sieve-0.1.19 not working please help
Hello i have installed dovecot from rpm found on rpm.pbone.net 1.2.17-0_115.el5 Everuthing works as charm Postfix + Dovecot + TLS + MySQL/postfixadmin For Reference: Centos 5.6 postfix 2.3.3-2.2 dovecot 1.2.17-0_115.el5 spamassassin 3.2.5-1.el5 postfixadmin 2.3.3 amavisd-new 2.6.4-4.el5.rf Now i'm trying to install Sieve for Dovecot 1.2 to make it redirect spam in proper folders but getting next error: ./configure --with-dovecot=/usr/lib/dovecot/ #OMITED OUTPUT# dovecot-config not found from /usr/lib/dovecot, use --with-dovecot=PATH to give path to compiled Dovecot sources or to a directory with the installed dovecot-config file. configure: error: dovecot-config not found /usr/lib/dovecot/ - is dir where all plugins and other things are stored. /etc is dir where dovecot.conf is located /etc/dovecot is dir where i put dovecot sql config Please help. I have no idea how to fix this. Especially when everything seems to be working as charm. My thread on LQ.org http://www.linuxquestions.org/questions/showthread.php?p=4381803&posted=1#post4381803 dovecot -n # 1.2.17: /etc/dovecot.conf # OS: Linux 2.6.18-238.9.1.el5 i686 CentOS release 5.6 (Final) ext3 base_dir: /var/run/dovecot/ listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 ssl_ca_file: /etc/pki/tls/cacert.pem ssl_cert_file: /etc/pki/tls/dev.cdn/cent56.dev.cdn.crt ssl_key_file: /etc/pki/tls/dev.cdn/cent56.dev.cdn.key ssl_cipher_list: ALL:!LOW:!SSLv2 login_dir: /var/run/dovecot//login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login first_valid_uid: 1001 last_valid_uid: 1001 first_valid_gid: 12 last_valid_gid: 12 mail_location: maildir:/var/vmail/%d/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/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/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh lda: postmaster_address: postmas...@dev.cdn mail_plugins: quota autocreate mail_plugin_dir: /usr/lib/dovecot/lda log_path: /var/log/dovecot/dovecot-deliver.log info_log_path: /var/log/dovecot/dovecot-deliver.log auth default: mechanisms: plain login user: nobody passdb: driver: pam passdb: driver: sql args: /etc/dovecot/sql.conf userdb: driver: passwd userdb: driver: sql args: /etc/dovecot/sql.conf userdb: driver: prefetch socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: mail master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: mail
Re: [Dovecot] Per user quota on MySQL
Hello, In my installation (postfixadmin, dovecot-1.2.x), postfixadmin sets and stores user quota in bytes in `quota` field of `mailbox` table. Dovecot retrieves stored quotas via `user_query` and `password_query` mechanism. --- wbr, Denis. On Sat, Dec 18, 2010 at 2:59 AM, M. Rodrigo Monteiro < fale...@rodrigomonteiro.net> wrote: > On Fri, Dec 17, 2010 at 15:41, Henrique Fernandes > wrote: > > It is missing an global mail plugins conf! > > []'sf.rique > > > > Ok, now I have the quota in dovecotadm. > > doveadm quota get -u te...@domain.com > Quota name > TypeValue Limit % > storage=1024000 > STORAGE 5584 - 0 > storage=1024000 > MESSAGE 7 - 0 > > But I don't know how to configure to get work quota per user with > Postfixadmin. > > Anyone? > > > Regards, > Rodrigo. > > -- > M. Rodrigo Monteiro >
Re: [Dovecot] v2.0.rc2 released
Hello Timo, Many thanks for this nice piece of code, hehe. Keep up your great work! --- wbr, Denis.
[Dovecot] troubles with expire plugin
Hello there, Now I'm using `expire` plugin and getting troubles with cronjob (from user `exim`): /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh Fatal: setgid(12(mail)) failed with euid=93(exim), gid=93(exim), egid=93(exim): Operation not permitted (This binary should probably be called with process group set to 12(mail) instead of 93(exim)) The same error occurs when I run this command from `exim` user with sudo. My dovecot v1.2.11 configuration: dovecot.conf - ... socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = exim group = mail } client { path = /var/spool/exim/private-auth mode = 0660 user = exim group = mail } } ... userdb-sql.conf # exim uid: 93, mail gid: 12 user_query = SELECT CONCAT('/var/mail/', maildir) AS home, \ CONCAT('maildir:/var/mail/', maildir) AS mail, 93 AS uid, 12 AS gid, \ CONCAT('*:storage=', quota, 'B') AS quota_rule, \ 'storage=90%% /usr/libexec/dovecot/quota_warning.sh 90' AS quota_warning \ FROM mailbox WHERE username = '%u' AND active = '1' password_query = SELECT username AS user, password, \ CONCAT('/var/mail/', maildir) AS userdb_home, \ CONCAT('maildir:/var/mail/', maildir) AS userdb_mail, \ 93 AS userdb_uid, 12 AS userdb_gid, \ CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, \ 'storage=90%% /usr/libexec/dovecot/quota_warning.sh 90' AS userdb_quota_warning \ FROM mailbox WHERE username = '%u' AND active = '1' ( maybe, is any additional information required? ) All working fine with dovecot except this issue with `expire` plugin. How to avoid it? As I see, it's working if I run this command from `root` instead of `exim`, but I don't think it will be right to leave it in the root's crontab. Thanks, --- wbr, Denis.
[Dovecot] Deliver EX_TEMPFAIL's without giving any information
Hi all. I've had a hard time trying to find out why deliver isn't working after I've updated dovecot from v1.11 to v1.2.8. It just gave me EX_TEMPFAIL without any info in the logs. My deliver was setuid-root. Once I've made a simple shell wrapper script for the deliver executable which saves deliver's stdout+stderr, I've found the reason: /usr/local/libexec/dovecot/deliver must not be both world-executable and setuid-root. This allows root exploits. See http://wiki.dovecot.org/LDA#multipleuids Did a 'chmod o-x deliver' and fixed groups/owners and now everything works as it should. I think this error message should go to log files, not just to stdout/stderr. And it's worth to describe this behaviour in the Wiki. Cheers, Denis
[Dovecot] alias does not work
Hi, Thank you to everyone who helped me get near the goal. Remains a problem is that aliases don't work. The problem is that in the configuration of alternc, the mails are seen as aliases in the form user_domain.tld. In a second time, a match is made to see if an "real" alias exists. postmap -q t...@lists.test.net mysql:/etc/postfix/mydomain.cf test-owner_lists.collectifs.net postmap -q test-owner_lists.test.net mysql:/etc/postfix/myalias.cf "| /var/lib/mailman/mail/mailman owner test" With my configuration, this second part doesn't work. Perhaps the simplest is to ask to deliver the mail to user_domain.tld except of u...@domain.tld in master.cf ? Thanks Denis # main.cf virtual_alias_maps =proxy:mysql:/etc/postfix/myalias.cf, hash:/etc/aliases virtual_mailbox_domains = mysql:/etc/postfix/mydomain.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf virtual_transport = dovecot dovecot_destination_recipient_limit = 1 # master.cf dovecot unix - n n - - pipe flags=DRhu user=www-data:www-data argv=/usr/lib/dovecot/deliver -d $(recipient)
Re: [Dovecot] Postfix : lda problem
denis a écrit : > Ok, here is a configuration that works fine but without success to > retrieve the correct gid in the database. > In fact, aliases no longer work In trying with alias_maps or virtual_alias_maps and in both cases the following error: User unknown in virtual mailbox table Any Ideas ? Thanks Denis ## /etc/postfix/main.cf alias_maps =proxy:mysql:/etc/postfix/myalias.cf, hash:/etc/aliases virtual_mailbox_base = /var/alternc/mail virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf virtual_mailbox_domains = mysql:/etc/postfix/mydomain.cf default_privs = www-data virtual_uid_maps = static:33 virtual_gid_maps = static:33 virtual_transport = dovecot dovecot_destination_recipient_limit = 1 ## /etc/postfix/myalias.cf user = xyz password = xyz hosts = 10.0.112.1 dbname = alternc table = mail_alias select_field = alias where_field = mail
Re: [Dovecot] Postfix : lda problem
Charles Marcus a écrit : >> dovecot unix - n n - - pipe >> flags=DRhu user=www-data:www-data argv=/usr/lib/dovecot/deliver -d >> $(recipient) >> > > Postfix is chrooted, dovecot LDA is not... > > I think you have other problems, but this is definitely a major one. > If i chroot dovecot, I have the following error: fatal: service dovecot requires privileged operation Denis
Re: [Dovecot] Postfix : lda problem
Thomas Leuxner a écrit : > > Am 15.08.2009 um 18:52 schrieb denis: >> virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf >> virtual_uid_maps = static:33 > You need to match the groups used by deliver in the "master.cf" > (mail/mail) or change them there. Try > > virtual_gid_maps = static:8 > virtual_uid_maps = static:8 Ok, here is a configuration that works fine but without success to retrieve the correct gid in the database. The mails are stored under www-data:www-data in place of www-data:gid. The parameter virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf has no effect. But it's working, thanks !! Denis # Main.cf alias_maps =proxy:mysql:/etc/postfix/myalias.cf, hash:/etc/aliases virtual_mailbox_base = /var/alternc/mail virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf virtual_mailbox_domains = mysql:/etc/postfix/mydomain.cf default_privs = www-data virtual_uid_maps = static:33 virtual_gid_maps = static:33 virtual_transport = dovecot dovecot_destination_recipient_limit = 1 # Master.cf dovecot unix - n n - - pipe flags=DRhu user=www-data:www-data argv=/usr/lib/dovecot/deliver -d $(recipient) # dovecot.conf socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = www-data }
Re: [Dovecot] Postfix : lda problem
Thomas Leuxner a écrit : > > Am 15.08.2009 um 16:51 schrieb denis: >> I made the following changes but it does not solve my problem. >> >> mydestination = $myhostname, localhost.$mydomain >> virtual_mailbox_base = /var/alternc/mail > > Did you also list your domains under: virtual_mailbox_domains ? > Ok, by replacing virtual_maps = proxy:mysql:/etc/postfix/mydomain.cf to virtual_mailbox_domains = mysql:/etc/postfix/mydomain.cf, it works !!! But now, the problem is to set the good uid and gid which were defined like this in postfix virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf virtual_uid_maps = static:33 With this configuration: dovecot unix - n n - - pipe flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -d $(recipient) socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = mail group = mail } I get the following error message Fatal: setgid(33(www-data)) failed with euid=8(mail), gid=8(mail), egid=8(mail): Operation not permitted Any ideas ? Thanks Denis
Re: [Dovecot] Postfix : lda problem
Thomas Leuxner a écrit : > > Am 15.08.2009 um 15:22 schrieb denis: >> >> mydestination = altern.domainepublic.net vacarme.domainepublic.net >> mail.domainepublic.net, altern, localhost.localdomain, localhost > > This is a pure Postfix configuration issue by first look. See: > http://www.postfix.org/VIRTUAL_README.html > > There it says: NEVER list a virtual alias domain name as a > mydestination domain! > >> virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf >> virtual_mailbox_base = / >> virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf >> virtual_minimum_uid = 1000 >> virtual_transport = dovecot >> virtual_uid_maps = static:33 > > mydestination = $myhostname, localhost.$mydomain > virtual_mailbox_domains = altern.domainepublic.net, > vacarme.domainepublic.net, mail.domainepublic.net > > Mailbox base does not look right too: > virtual_mailbox_base = /var/mail/vmail (or whatever path you prefer) > I made the following changes but it does not solve my problem. mydestination = $myhostname, localhost.$mydomain virtual_mailbox_base = /var/alternc/mail Thanks Denis
[Dovecot] Postfix : lda problem
Hi, I come back with my problem: On debian lenny, using dovecot 1.1.13-2~bpo50+1 I try to configure my setup (with Postfix virtual domains) to use dovecot as lda but nothing happens, as if postfix not delegate to dovecot I am using the contreol panel alternc (http://www.alternc.org). All the maildir are in the format /var/alternc/mail/i/info_domainepublic.net for i...@domainepublic.net The "virtual_mailbox_maps" will retrieve the correct maildir to deliver the message. For Alternc, an address is considered as an alias of the primary domain name. Thus i...@domainepublic.net is assimilated to info_domainepublic@altern.domainepublic.net Here is a sequence of arrival of mail, the result of postconf -n, dovecot -n and the master.cf from postfix I looked in the documentation and google, but I do not understand the problem. Thanks Denis # Mail.log Aug 15 14:49:17 altern amavis[17243]: (17243-09) Passed CLEAN, [85.27.20.149] [85.27.20.149] -> , Message-ID: <4a86ae18.7020...@collectifs.net>, mail_id: ozn7XWRcaHem, Hits: -9.27, size: 665, queued_as: 0A0054604A, 727 ms Aug 15 14:49:17 altern postfix/smtp[18138]: 345954610C: to=, orig_to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.9, delays=0.17/0/0/0.73, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=17243-09, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0A0054604A) Aug 15 14:49:17 altern postfix/local[18256]: 0A0054604A: to=, relay=local, delay=0.23, delays=0.19/0/0/0.05, dsn=2.0.0, status=sent (delivered to maildir) # DOVECOT # 1.1.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-1-amd64 x86_64 Debian 5.0.2 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s managesieve ssl_cert_file: /etc/ssl/domainepublic.net/domainepublic.net.crt ssl_key_file: /etc/ssl/domainepublic.net/domainepublic.net.key 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 login_executable(managesieve): /usr/lib/dovecot/managesieve-login first_valid_uid: 33 mail_privileged_group: mail mail_location: maildir:~/Maildir mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve 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 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve sieve_storage(default): sieve_storage(imap): sieve_storage(pop3): sieve_storage(managesieve): ~/sieve sieve(default): sieve(imap): sieve(pop3): sieve(managesieve): ~/.dovecot.sieve auth default: passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix socket: type: listen master: path: /var/run/dovecot/auth-master mode: 432 user: postfix # POSTFIX alias_database = hash:/etc/aliases alias_maps = proxy:mysql:/etc/postfix/myalias.cf,hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 default_privs = www-data disable_vrfy_command = yes inet_interfaces = all mailbox_size_limit = 0 message_size_limit = 2048 mydestination = altern.domainepublic.net vacarme.domainepublic.net mail.domainepublic.net, altern, localhost.localdomain, localhost myhostname = altern.domainepublic.net mynetworks = 127.0.0.0/8 91.121.107.196 62.58.108.143 62.58.108.140 10.0.112.2 10.0.112.1 myorigin = altern.domainepublic.net owner_request_special = no readme_directory = no recipient_delimiter = + smtp_tls_CAfile = /etc/ssl/certs/cacert.org.pem smtp_tls_cert_file = /etc/ssl/domainepublic.net/domainepublic.net.crt smtp_tls_key_file = /etc/ssl/domainepublic.net/domainepublic.net.key smtp_tls_note_starttls_offer = yes smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_client_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/access, permit_sasl_authenticated, smtpd_data_restrictions = reject_unauth_pipelining smtpd_delay_reject = yes smtpd_helo_required = yes smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, check_helo_access hash:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reje
Re: [Dovecot] dovecot as lda : nothing happens
Pascal Volk a écrit : > On 07/19/2009 10:32 AM denis wrote: > >> Pascal Volk a écrit : >> >>> Is the domain part of the recipient address listed in mydestination? >>> >>> >> No, all information are retrieved from mysql via user_query = SELECT >> path as home, 33 as uid, 33 as gid FROM mail_users WHERE alias='%u' >> >^^^ > Is this the query from the file '/etc/postfix/myalias.cf'? Oh no, it's > the 'user_query' from dovecot-sql.conf. > Yes, sorry. > `postmap -q de...@collectifs.net mysql:/etc/postfix/myalias.cf` returns > denis_collectifs@altern.domainepublic.net? > No, `postmap -q denis_collectifs.net mysql:/etc/postfix/myalias.cf` returns /var/alternc/mail/d/denis_collectifs.net > Is altern.domainepublic.net on of the domains in mydestination? > Yes. > >>> Also show a few lines from /var/log/mail.log - from 'connect from ...' >>> until 'mail delivered ...'. >>> >> … >> Jul 19 10:07:57 altern postfix/local[9647]: D6B4646123: >> to=, relay=local, >> delay=0.08, delays=0.01/0/0/0.07, dsn=2.0.0, status=sent (delivered to >> command: /usr/bin/procmail -m >> /var/alternc/mail/d/denis_collectifs.net/.procmailrc) >> … >> > > altern.domainepublic.net seems to be a 'local domain' - not a virtual > domain. The email was delivered to the command procamil, not piped to > Dovecots deliver. > Yes, and all the mails are alias from altern.domainepublic.net like de...@collectifs.net is denis_collectifs@altern.domainepublic.net ... > Please attach the the most current output from `dovecot -n` and > `postconf -n` to your reply. > dovecot - n http://pastebin.com/d31978026 postconf -n http://pastebin.com/d3242f46a Thanks a lot ! Denis
Re: [Dovecot] dovecot as lda : nothing happens
Hi, Thank you for your answers. Noel Butler a écrit : > I suggest you use a current version of dovecot, 1.0.15 is old and > IIRC unsupported > > at a quick look though, your settings in LDA and in master.cf appear fine. > Although you might want to remove log_path when using a modern version > and put it in global I made the update to the version in lenny-backports 1.1.13-2~bpo50+1 and I deleted log_path = /var/log/dovecot.log Pascal Volk a écrit : > What is listed in /etc/postfix/transport? > Nothing, I have deleted > Is the domain part of the recipient address listed in mydestination? > No, all information are retrieved from mysql via user_query = SELECT path as home, 33 as uid, 33 as gid FROM mail_users WHERE alias='%u' > Also show a few lines from /var/log/mail.log - from 'connect from ...' > until 'mail delivered ...'. > Jul 19 10:07:47 altern postfix/smtpd[5757]: connect from mirapoint7.brutele.be[212.68.199.151] Jul 19 10:07:57 altern postgrey[12261]: action=pass, reason=client AWL, client_name=mirapoint7.brutele.be, client_address=212.68.199.151, sender=denlis...@altern.org, recipient=de...@collectifs.net Jul 19 10:07:57 altern postfix/smtpd[5757]: 8B35E46122: client=mirapoint7.brutele.be[212.68.199.151] Jul 19 10:07:57 altern postfix/cleanup[9641]: 8B35E46122: message-id=<4a62d1d3.9050...@altern.org> Jul 19 10:07:57 altern postfix/qmgr[20198]: 8B35E46122: from=, size=974, nrcpt=1 (queue active) Jul 19 10:07:57 altern postfix/smtpd[6839]: connect from localhost[127.0.0.1] Jul 19 10:07:57 altern postfix/smtpd[6839]: D6B4646123: client=localhost[127.0.0.1] Jul 19 10:07:57 altern postfix/cleanup[9641]: D6B4646123: message-id=<4a62d1d3.9050...@altern.org> Jul 19 10:07:57 altern postfix/smtpd[6839]: disconnect from localhost[127.0.0.1] Jul 19 10:07:57 altern postfix/qmgr[20198]: D6B4646123: from=, size=1508, nrcpt=1 (queue active) Jul 19 10:07:57 altern amavis[7460]: (07460-16) Passed CLEAN, [212.68.199.151] [85.27.31.43] -> , Message-ID: <4a62d1d3.9050...@altern.org>, mail_id: LbrTEMulIqHc, Hits: -7.556, size: 974, queued_as: D6B4646123, 304 ms Jul 19 10:07:57 altern postfix/smtp[9642]: 8B35E46122: to=, orig_to=, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=10/0/0/0.31, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=07460-16, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as D6B4646123) Jul 19 10:07:57 altern postfix/qmgr[20198]: 8B35E46122: removed Jul 19 10:07:57 altern postfix/local[9647]: D6B4646123: to=, relay=local, delay=0.08, delays=0.01/0/0/0.07, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -m /var/alternc/mail/d/denis_collectifs.net/.procmailrc) Jul 19 10:07:57 altern postfix/qmgr[20198]: D6B4646123: removed Jul 19 10:07:59 altern postfix/smtpd[5757]: disconnect from mirapoint7.brutele.be[212.68.199.151] Thank Denis
[Dovecot] dovecot as lda : nothing happens
Hi, On debian lenny, I try to configure my setup (with Postfix virtual domains) to use dovecot as lda. I adjusted my settings to postfix and dovecot, but nothing happens... The dovecot.log is always empty and nothing seems to change, as if it had no effect. Here are my changes, if someone sees what would be problematic ... Thanks Denis main.cf ## virtual_transport = dovecot dovecot_destination_recipient_limit = 1 # conf -> http://pastebin.com/mfdf596e master.cnf dovecot unix - n n - - pipe flags=DRhu user=www-data:www-data argv=/usr/lib/dovecot/deliver -d $(recipient) http://pastebin.com/m41e07df0 ## conf -> http://pastebin.com/m41e07df0 ## postconf -n -> http://pastebin.com/m293a05f7 dovecot.conf ## protocol lda { postmaster_address = r...@xxx auth_socket_path = /var/run/dovecot/auth-master mail_plugins = cmusieve log_path = /var/log/dovecot.log } ## conf -> http://pastebin.com/m5c55d5b2 ## dovecot -n -> http://pastebin.com/m268fdb89
Re: [Dovecot] bad maildir location
Noel Butler a écrit : >> Thanks, it's working well with >> >> mail_location = maildir:/var/alternc/mail/%1u/%n_%d/Maildir >> >> But, for some users logging with name_domain the directory which is >> created is not correct and look like >> >> /var/alternc/mail/d/denis_collectifs.net_ >> >> > > I can't see how it's doing that, given you have told it where to put the > underscore. > Is there any reason you can't use > /var/alternc/mail/collectifs.net/d/denis format? > Do you need underscores? > Yes, because it comes from the hosting control/ panel Alternc http://www.alternc.org I am trying to use dovecot in place of courrier / > >> Is it a way to transform a login with _ like denis_collectifs.net to >> de...@collectifs.net to have a the mail_location correct ? >> >> > > > I can't recall if you mentioned earlier what MTA you are using, our > setup uses postfix/dovecot/mysql > How are you storing your users/auth ? Perhaps using my suggestion above > will work better? just adjust your database query to match > In my /etc/dovecot/dovecot-sql.conf, i use user_query = SELECT path, 33 AS uid, uid AS gid FROM mail_users WHERE alias = '%u' The user can be denis_collectifs.net or de...@collectifs.net and the path is always like this /var/alternc/mail/d/denis_collectifs.net (the Maildir is created by an script) If i set mail_location = maildir:/var/alternc/mail/%1u/%u/Maildir The problem is that dovecot creates (when you log in for the first time) a directory in the form of the exact address. Here for example, /var/alternc/mail/d/de...@collectifs.net in place of using /var/alternc/mail/d/denis_collectifs.net If i set mail_location = maildir:/var/alternc/mail/%1u/%n_%d/Maildir All is working well, except is use denis_collectifs as user because dovecot creates a directory /var/alternc/mail/d/denis_collectifs.net_ Maybe that the best way is to modify the user_query , something like REPLACE(alias,'@','_') but i don't now if it's possible. Thanks Denis
Re: [Dovecot] bad maildir location
Noel Butler a écrit : > On Fri, 2009-04-17 at 18:09, denis wrote: >> /But the problem is that dovecot creates (when you log in for the first >> time) a directory in the form of the exact address. Here for example, >> /var/alternc/mail/d/de...@collectifs.net >> >> And so all connections will be on an empty location. >> >> How is it possible to resolve this? >> >> As mail_location I have this "maildir:/var/alternc/mail/%1u/%u/Maildir" >> which is not really correct. >> / > > Dovecot is doing what you have told it. > %u is complete username > > if you want name use %n ... and %d where (if) you want domain > Bascially replace your %u with %n Thanks, it's working well with mail_location = maildir:/var/alternc/mail/%1u/%n_%d/Maildir But, for some users logging with name_domain the directory which is created is not correct and look like /var/alternc/mail/d/denis_collectifs.net_ Is it a way to transform a login with _ like denis_collectifs.net to de...@collectifs.net to have a the mail_location correct ? Thanks Denis
[Dovecot] bad maildir location
Hi, I use dovecot 1.0.15 on Debian Lenny. In my /etc/dovecot/dovecot-sql.conf, i use user_query = SELECT path, 33 AS uid, uid AS gid FROM mail_users WHERE alias = '%u' The result is something like this /var/alternc/mail/d/denis_collectifs.net and is the correct location (the Maildir is created by an script) But the problem is that dovecot creates (when you log in for the first time) a directory in the form of the exact address. Here for example, /var/alternc/mail/d/de...@collectifs.net And so all connections will be on an empty location. How is it possible to resolve this? As mail_location I have this "maildir:/var/alternc/mail/%1u/%u/Maildir" which is not really correct. Thanks Denis PS: For now, I temporarily symlinks /var/alternc/mail/d/de...@collectifs.net /var/alternc/mail/d/denis_collectifs.net
Re: [Dovecot] dbox
Hi Evaggelos, I use the same command ( via cron ) but my maildir folder with spam is more than 50.000 emails !!! so ... I had the same issue and I solved it with a little bash script. The trick is to use the xargs function to break up the spam list in smaller blocks (I also restrict spam processing to spam older than $TIME_LIMIT in order to let time to user remove non-spam, and ignore filename ending with T as they have already been removed). Relevant lines : find ./ -iname "*" -mtime +$TIME_LIMIT -print | grep -v T\$ > $TEMP_FILE_NAME cat $TEMP_FILE_NAME | xargs -r -n500 sa-learn --showdots --spam -C $SA_CONF_DIR Cheers, Denis but my question wasnt about spamassassin (wrong mail list :) ) but with alternative mailbox format (like dbox) in dovecot 1.0.x Michal Soltys wrote: Evaggelos Balaskas wrote: the problem i have with maildir is that programs like sa-learn (from spamassassin) returns argument too long list and perhaps a lot of other programs too. I have never seen sa-learn giving me any problems while learning spam from maildirs (often with tens of thousands messages). Simple: sa-learn --progress --spam new does the thing, with previously prepared maildir with messages classified as spam. - -- Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHndd4WIK+Pe9twhoRAoNsAJ4rBkxPsa+ngWGXUEPO9jZmePYLAACgiZZ0 LoIkPnyr9Hiu709QzHK4Azc= =ePcg -END PGP SIGNATURE- -- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr
Re: [Dovecot] Migration to Dovecot
Hi Frank, Tomorrow is the day , I'm gonna migrate all our mailboxes and imap folders from our old mailhub to the new one. In the same time I will migrate from UW to Dovecot , I've read all the stuff about it on the Dovecot web site. I have one question , do I have to care about the .imap cache directory created by Dovecot in any way or will it be "all automatic" when starting Dovecot ? I handle a few courier-imap to dovecot migration recently and the only thing I had to care about was the indox namespace (perhaps not an issue on UW), subscription files, and shared folders. Everything else was transparent. Cheers, Denis Many thanks -- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr
Re: [Dovecot] Converting Outlook .PST's
Hi all, if you have a few bucks to spend, you may use the emailchemy software (http://www.weirdkid.com/products/emailchemy/). It is not free but it once saved my day on an Outlook Express 2GB+ mbx folder (yes it is possible...) : Outlook Express was itself unable to transfert to imap (completly screwed) and converting to thunderbird using MAPI also failed. The emailchemy software on the other hand did work flawlessly. Cheers, Denis Disclaimer : I have no relation to weirdkid.com other than using their software once. On Mon, 15 Oct 2007, Ilo Lorusso wrote: [...] I know the users also have large OUT LOOK pst files 4.5GIGs and wondering if I could also intergrate that into IMAP? It can be done, but it is a nightmare. For post-2003(?) Outlook .PST's, the only sensible, non-commercial path I could find was through Thunderbird's import. Uploading directly to the server (Even if you ran a local server!) was horrendously, painstakingly slow, and rendered the Outlook user's computer unusable for that time. (If you're feeling lucky, Google libpst. Maybe your Outlook is old enough that it supports the format.) Via Thunderbird: 1. Open all the .PST's you want to convert in Outlook, and, if possible, make sure those were the only .PST's open. 2. Be sure to 'compact'/'compress' each one, to get rid of deleted messages (excluding those in 'Deleted Items'. Uggh.). 3. Make sure Outlook is completely closed, and not accessing any .PST's. 4. Open Thunderbird. 5. Import mail from Outlook. This gets you mbox files with the same hierarchy that you had in Outlook. I then wrote some Perl scripts to deal with these. In my case, I was combining several users' folders into a single shared hierarchy. Maybe you can run some mbox2maildir program and be done with it. Caveats: - If possible, change the location of Thunderbird's profile directory to a short path name. (e.g. C:\convert) The default path to local folders: C:\Documents and Settings\%USER%\Application Data\Thunderbird\Profiles\(random string)\Mail\Local Folders means that approximately 100 of your 255-character limit for filenames are chewed up. - Thunderbird will mangle folder names that contain 'odd' characters. I never figured out what characters caused trouble, but the following were definitely OK: [A-Za-z0-9. ] (I found the odd foldernames running: find (dirname) -type d | perl -lnwe 'print if /[\da-f]{8}/' They always ended in a string of hexadecimal digits.) - Thunderbird doesn't seem to like non-Latin-1 headers. (I didn't find this out until someone noticed it a while after the conversion.) This means QP-encoded headers. (In my case, ISO-2022-JP.) Best of luck. I don't envy your task. :-) -- Ben -- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr
Re: [Dovecot] Converting Outlook .PST's
Hi Benjamin, [...] I know the users also have large OUT LOOK pst files 4.5GIGs and wondering if I could also intergrate that into IMAP? It can be done, but it is a nightmare. For post-2003(?) Outlook .PST's, the only sensible, non-commercial path I could find was through Thunderbird's import. Uploading directly to the server (Even if you ran a local server!) was horrendously, painstakingly slow, and rendered the Outlook user's computer unusable for that time. It is possible to connect outlook directly to an imap server (if it was previously connected to an exchange, you first have to switch it pop/imap mode. I don't remember where you select that). Then you can create a imap connection in addition to the local folders and drag'n drop the mail folders to the new imap connexion. The major issue with this process is when you have a very large amount of folder... Cheers, Denis (If you're feeling lucky, Google libpst. Maybe your Outlook is old enough that it supports the format.) Via Thunderbird: 1. Open all the .PST's you want to convert in Outlook, and, if possible, make sure those were the only .PST's open. 2. Be sure to 'compact'/'compress' each one, to get rid of deleted messages (excluding those in 'Deleted Items'. Uggh.). 3. Make sure Outlook is completely closed, and not accessing any .PST's. 4. Open Thunderbird. 5. Import mail from Outlook. This gets you mbox files with the same hierarchy that you had in Outlook. I then wrote some Perl scripts to deal with these. In my case, I was combining several users' folders into a single shared hierarchy. Maybe you can run some mbox2maildir program and be done with it. Caveats: - If possible, change the location of Thunderbird's profile directory to a short path name. (e.g. C:\convert) The default path to local folders: C:\Documents and Settings\%USER%\Application Data\Thunderbird\Profiles\(random string)\Mail\Local Folders means that approximately 100 of your 255-character limit for filenames are chewed up. - Thunderbird will mangle folder names that contain 'odd' characters. I never figured out what characters caused trouble, but the following were definitely OK: [A-Za-z0-9. ] (I found the odd foldernames running: find (dirname) -type d | perl -lnwe 'print if /[\da-f]{8}/' They always ended in a string of hexadecimal digits.) - Thunderbird doesn't seem to like non-Latin-1 headers. (I didn't find this out until someone noticed it a while after the conversion.) This means QP-encoded headers. (In my case, ISO-2022-JP.) Best of luck. I don't envy your task. :-) -- Ben -- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr
[Dovecot] gssapi, kerberos and webmail
Hi every one, first thanks for the great job, I switched successfully from courier imap a few months ago and both the migration and maintenance went smoothly from then on. The reason I switched was gssapi support (and the easier debug) and now I have thunderbird on Linux connecting in an SSO fashion through kerberos/GSSAPI (works great). Users should be able to access their mail throught a webmail too (eg. eGroupware). I have already checked for kerberos authentication on Apache, however there seems to be no way to have ticket forwarding throught PHP. AFIAK there is thus no way to use kerberos for php-imap --> dovecot authentication. The only information available seems to be the username. So here is my question : how do people on this mailing list handle kerberos authentication with webmail? Do you use other kind of authentication on privileged port (ie with access only from apache) and just do a login/nopassword authentication (like an uid base authentication through ldapi:/// on an ldap directory for example) ? Here is what we have with thunderbird : Thunderbird ---kerberos---> dovecot on standard port Here is what I would guess for webmail auth : Firefox --kerberos> Apache gssapi-auth-just-using-login> dovecot on privileges port Cheers, Denis -- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr