<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Change mail_location too</div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">---<div>Aki Tuomi</div><div>Dovecot oy</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Christoph Lukas <clukas@firc.de> </div><div>Date: 10/03/2018 12:37 (GMT+02:00) </div><div>To: dovecot@dovecot.org </div><div>Subject: quota-status: Issues with uppercase recipient address </div><div><br></div></div>Hello list,<br><br>Dovecot Version: 2.2.34 (874deae) on FreeBSD<br>MTA: Postfix 3.3.0<br><br>I've got an issue with the quota-status service:<br><br>Something breaks when receiving mail with a recipient address that includes non-lowercase characters,<br>for example foo@Example.com instead of foo@example.com:<br><br>postfix log:<br> postfix/smtp/smtpd[83387]: NOQUEUE: reject_warning: RCPT from mout01.posteo.de[185.67.36.65]:<br> 450 4.7.1 <foo@Example.com>: Recipient address rejected: Invalid user settings. Refer to server<br> log for more information.; from=<[REDACTED]> to=<foo@Example.com> proto=ESMTP helo=<mout01.posteo.de><br><br>dovecot.log:<br> quota-status(foo@Example.com): Error: User initialization failed:<br> Namespace '': mkdir(/srv/mail/Example.com/foo/mailboxes) failed: Permission denied<br> (euid=1001(vmail) egid=1001(vmail) missing +w perm: /srv/mail, dir owned by 0:1001 mode=0755)<br><br>The user_query has already been altered to include L, however the issue persists.<br><br>user_query = \<br> SELECT CONCAT('/srv/mail/','%Ld','/','%Ln','/') AS home, \<br> 1001 AS uid, \<br> 1001 AS gid, \<br> concat('*:bytes=', quota) AS quota_rule \<br> FROM mailbox WHERE username = '%Lu' \<br> AND active = 1<br><br>Thank you for any suggestions.<br>Christoph<br><br><br># 2.2.34 (874deae): /usr/local/etc/dovecot/dovecot.conf<br># Pigeonhole version 0.4.22 (22940fb7)<br># OS: FreeBSD 11.1-STABLE amd64 zfs<br># Hostname: mail<br>auth_default_realm = firc.de<br>auth_mechanisms = plain login<br>auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@+<br>auth_username_format = <br>auth_verbose = yes<br>base_dir = /var/run/dovecot/<br>first_valid_gid = 1001<br>first_valid_uid = 1001<br>hostname = mail.firc.de<br>info_log_path = /var/log/dovecot/dovecot-info.log<br>last_valid_gid = 1001<br>last_valid_uid = 1001<br>lda_mailbox_autocreate = yes<br>lda_mailbox_autosubscribe = yes<br>lda_original_recipient_header = X-Original-To<br>log_path = /var/log/dovecot/dovecot.log<br>login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k<br>mail_gid = 1001<br>mail_location = sdbox:/srv/mail/%d/%n<br>mail_plugins = acl fts fts_solr quota<br>mail_uid = 1001<br>mailbox_list_index = yes<br>managesieve_notify_capability = mailto<br>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 index ihave duplicate mime foreverypart extracttext spamtest spamtestplus imapsieve vnd.dovecot.imapsieve<br>namespace inbox {<br> inbox = yes<br> location = <br> mailbox Drafts {<br> special_use = \Drafts<br> }<br> mailbox Entwürfe {<br> special_use = \Drafts<br> }<br> mailbox "Gelöschte Elemente" {<br> special_use = \Trash<br> }<br> mailbox "Gesendete Elemente" {<br> special_use = \Sent<br> }<br> mailbox Junk-E-Mail {<br> special_use = \Junk<br> }<br> mailbox Junk {<br> special_use = \Junk<br> }<br> mailbox Sent {<br> special_use = \Sent<br> }<br> mailbox "Sent Messages" {<br> special_use = \Sent<br> }<br> mailbox Trash {<br> special_use = \Trash<br> }<br> prefix = <br>}<br>passdb {<br> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext<br> driver = sql<br>}<br>plugin {<br> acl = vfile<br> acl_shared_dict = file:/srv/mail/dovecot/shared-mailboxes<br> antispam_backend = mailtrain<br> antispam_mail_notspam = learn_ham<br> antispam_mail_sendmail = /usr/local/bin/rspamc<br> antispam_mail_sendmail_args = -h;10.0.110.27:11334;-P;[REDACTED]<br> antispam_mail_spam = learn_spam<br> antispam_spam = Junk<br> antispam_trash = Trash<br> fts = solr<br> fts_autoindex = yes<br> fts_solr = url=http://127.0.0.1:8983/solr/dovecot/<br> imapsieve_mailbox1_before = file:/usr/local/etc/dovecot/sieve/report-spam.sieve<br> imapsieve_mailbox1_causes = COPY<br> imapsieve_mailbox1_name = Junk<br> imapsieve_mailbox2_before = file:/usr/local/etc/dovecot/sieve/report-ham.sieve<br> imapsieve_mailbox2_causes = COPY<br> imapsieve_mailbox2_from = Junk<br> imapsieve_mailbox2_name = *<br> quota = count:User quota<br> quota_grace = 10%%<br> quota_rule2 = Trash:storage=+100M<br> quota_status_nouser = DUNNO<br> quota_status_overquota = 552 5.2.2 Mailbox is full<br> quota_status_success = DUNNO<br> quota_vsizes = yes<br> sieve = /srv/mail/%d/%n/dovecot.sieve<br> sieve_default = /srv/mail/dovecot/default.sieve<br> sieve_extensions = +spamtest +spamtestplus<br> sieve_global_extensions = +vnd.dovecot.pipe<br> sieve_pipe_bin_dir = /usr/local/etc/dovecot/sieve<br> sieve_plugins = sieve_imapsieve sieve_extprograms<br> sieve_spamtest_max_header = X-Spamd-Result: default: [[:alnum:]]+ \[-?[[:digit:]]+\.[[:digit:]]+ / (-?[[:digit:]]+\.[[:digit:]]+)\]<br> sieve_spamtest_status_header = X-Spamd-Result: default: [[:alnum:]]+ \[(-?[[:digit:]]+\.[[:digit:]]+) / -?[[:digit:]]+\.[[:digit:]]+\]<br> sieve_spamtest_status_type = score<br>}<br>postmaster_address = postmaster@firc.de<br>protocols = imap pop3 lmtp sieve<br>service auth {<br> unix_listener /var/spool/postfix/private/auth {<br> group = postfix<br> mode = 0666<br> user = postfix<br> }<br> unix_listener auth-userdb {<br> group = vmail<br> user = vmail<br> }<br>}<br>service imap-login {<br> inet_listener imap {<br> port = 143<br> }<br> inet_listener imaps {<br> port = 993<br> ssl = yes<br> }<br>}<br>service pop3-login {<br> inet_listener pop3 {<br> port = 110<br> }<br> inet_listener pop3s {<br> port = 995<br> ssl = yes<br> }<br>}<br>service quota-status {<br> client_limit = 1<br> executable = quota-status -p postfix<br> inet_listener {<br> port = 12340<br> }<br>}<br>ssl_alt_cert = </usr/local/etc/ssl/acme/mail.firc.de_ecc/cert.pem<br>ssl_alt_key = </usr/local/etc/ssl/acme/mail.firc.de_ecc/key.pem<br>ssl_ca = /usr/local/etc/ssl/acme/ca.pem<br>ssl_cert = </usr/local/etc/ssl/acme/mail.firc.de/cert.pem<br>ssl_dh_parameters_length = 2048<br>ssl_key = # hidden, use -P to show it<br>ssl_protocols = !SSLv3<br>userdb {<br> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext<br> driver = sql<br>}<br>protocol lmtp {<br> mail_plugins = acl fts fts_solr quota sieve<br>}<br>protocol !indexer-worker {<br> mail_vsize_bg_after_count = 100<br>}<br>protocol imap {<br> mail_max_userip_connections = 50<br> mail_plugins = acl fts fts_solr quota imap_sieve imap_acl imap_quota<br> plugin {<br> acl = vfile<br> }<br>}<br>protocol lda {<br> mail_plugins = acl fts fts_solr quota sieve quota<br>}<br><br></body></html>