Hi, first of all, sorry about my poor english. I am a native language is german. I have a strange problem with the option "Allow custom login name", the created paths in /var/vmail and the .quotausage files there: When i create a mail account with the custom login name e.g. com_domain_user, two new directories are created: /var/vmail/com_domain_user /var/vmail/domain/user the only file in /var/vmail/com_domain_user is the .quotausage all the other regular files are created in /var/vmail/domain/user/Maildir and there is also another .quotausage The Number in /var/vmail/com_domain_user/.quotausage only raises when i send a mail from this account. When this quota is exceeded, i can still send emails from this account to another one, but this email is not stored in "Sent Messages". The number in /var/vmail/domain/user/Maildir/.quotausage only raises when i receive a mail in this account. When this quota is exceeded, i can not receive emails anymore. In email-clients like OSXMail or Roundcube the Byte-number from /var/vmail/com_domain_user/.quotausage is shown there and not the number in /var/vmail/domain/user/.quotausage in ispconfig Panel the Bytenumber from /var/vmail/domain/user/Maildir/.quotausage is shown. When i delete all messages in this account with roundcube only the /var/vmail/com_domain_user/.quotausage decreases, not in /var/vmail/domain/user/Maildir/.quotausage What can i do to repair the user accounts, that 1.) only one path is created in /var/vmail/domain/user 2.) the .quotausage file there is used properly by dovecot? Bets regards chico
Another hint: When i use [email protected] as custom login name everything is fine as expected. But unfortunately changing the login name is no option for me and my clients.
Perhaps someone can use the debug dovecot log, which i switched on for this case: Login with "com_domain_user" Code: 2016-01-28 02:41:44 imap(com_domain_user): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domain.com/user 2016-01-28 02:41:44 imap(com_domain_user): Debug: Quota root: name=user backend=dict args=:file:/var/vmail//com_domain_user/.quotausage 2016-01-28 02:41:44 imap(com_domain_user): Debug: Quota rule: root=user mailbox=* bytes=0 messages=0 2016-01-28 02:41:44 imap(com_domain_user): Debug: Quota grace: root=user bytes=0 (10%) 2016-01-28 02:41:44 imap(com_domain_user): Debug: dict quota: user=com_domain_user, uri=file:/var/vmail//com_domain_user/.quotausage, noenforcing=0 2016-01-28 02:41:44 imap(com_domain_user): Debug: maildir++: root=/var/vmail/domain.com/user/Maildir, index=, indexpvt=, control=, inbox=/var/vmail/domain.com/user/Maildir, alt= 2016-01-28 02:41:44 imap(com_domain_user): Info: Disconnected: Logged out in=34 out=447 and this is an adequate log with a user with username "[email protected]" Code: 2016-01-28 02:53:03 imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domain.com/user 2016-01-28 02:53:03 imap([email protected]): Debug: Quota root: name=user backend=dict args=:file:/var/vmail/domain.com/user/.quotausage 2016-01-28 02:53:03 imap([email protected]): Debug: Quota rule: root=user mailbox=* bytes=268435456 messages=0 2016-01-28 02:53:03 imap([email protected]): Debug: Quota grace: root=user bytes=26843545 (10%) 2016-01-28 02:53:03 imap([email protected]): Debug: dict quota: [email protected], uri=file:/var/vmail/domain.com/user/.quotausage, noenforcing=0 2016-01-28 02:53:03 imap([email protected]): Debug: maildir++: root=/var/vmail/domain.com/user/Maildir, index=, indexpvt=, control=, inbox=/var/vmail/domain.com/user/Maildir, alt= the line with Quota root have different file Paths... :-(
Hi Till. thx for your help. Here is my dovecot.conf file: Code: listen = *,[::] protocols = imap pop3 auth_mechanisms = plain login disable_plaintext_auth = no log_timestamp = "%Y-%m-%d %H:%M:%S " #log_path = /var/log/dovecot.log #mail_debug = yes mail_privileged_group = vmail postmaster_address = [email protected] ssl_ca = *HIDDEN*, but there ssl_cert = *HIDDEN*, but there ssl_key = *HIDDEN*, but there #logjam attack prevention from chico ssl_protocols = !SSLv2 !SSLv3 ssl_cipher_list=ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA ssl_prefer_server_ciphers = yes ssl_dh_parameters_length = 2048 passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } userdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } plugin { quota = dict:user::file:/var/vmail/%d/%n/.quotausage sieve=/var/vmail/%d/%n/.sieve } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } user = root } service imap-login { client_limit = 1000 process_limit = 500 } protocol imap { mail_plugins = quota imap_quota mail_max_userip_connections = 128 } protocol pop3 { pop3_uidl_format = %08Xu%08Xv mail_plugins = quota } protocol lda { mail_plugins = sieve quota }
Hmm, the config looks fine to me. The quotausage path is: quota = dict:user::file:/var/vmail/%d/%n/.quotausage where %d is the domain and %n is the username. Just checked that against the dovecot wiki. You can try this instead: quota = dict:user::file:%h/.quotausage sieve=%h/.sieve as the homedir seems to be correct in both scenarios.
after 10 hours of investigation. This little trick works like a charm: Code: 2016-01-28 15:18:03 imap(com_domain_username): Debug: Quota root: name=user backend=dict args=:file:/var/vmail/domain.com/username/.quotausage But why? that is the big question. Perhaps not a dovecot but a postfix config error? It happened only when sending emails, not when receiving or deleting emails. I am a little bit confused is this ispconfig update resistant? i think now i have to set all mailuserquotas to 0 so that dovecot can recalculate them... best regards chico
put a modified copy of the dovecot2.conf master file (you can get it in the ispconfig tar.gz) into the /usr/local/ispconfig/server/conf-custom/install/ directory. Thats possible. Post the dovecot lines from postfix master.cf.
Here is my main.cf: Code: # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = /usr/share/doc/postfix # vom chico tls_ssl_options = NO_COMPRESSION # tls_high_cipherlist=EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA # TLS parameters smtpd_tls_CAfile = /etc/ssl/startssl/CAfile_combined.pem smtpd_tls_cert_file = /etc/ssl/private/domain.crt smtpd_tls_key_file = /etc/ssl/private/privkey.pem # vom chico smtp_tls_CAfile = /etc/ssl/startssl/CAfile_combined.pem smtp_tls_cert_file = /etc/ssl/private/domain.crt smtp_tls_key_file = /etc/ssl/private/privkey.pem smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # logjam attack prevention vom chico smtpd_tls_mandatory_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA smtpd_tls_dh1024_param_file = /etc/ssl/private/dhparams.pem # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = server.domain.com alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases myorigin = /etc/mailname mydestination = server.domain.com, localhost, localhost.localdomain relayhost = mynetworks = 127.0.0.0/8 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all html_directory = /usr/share/doc/postfix/html virtual_alias_domains = virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_mailbox_base = /var/vmail virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 inet_protocols = all smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes # vom chico eingefuegt smtpd_tls_received_header = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_rbl_client zen.spamhaus.org smtpd_tls_security_level = may transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf # original smtpd_client_message_rate_limit = 100 hier lieber 30 pro minute smtpd_client_message_rate_limit = 100 # original nicht vorhanden smtpd_client_recipient_rate_limit = 35 maildrop_destination_concurrency_limit = 1 maildrop_destination_recipient_limit = 1 virtual_transport = dovecot # vom chico ausgeblockt # header_checks = regexp:/etc/postfix/header_checks # vom chico ausgeblockt V2 # header_checks = pcre:/etc/postfix/header_checks.pcre mime_header_checks = regexp:/etc/postfix/mime_header_checks nested_header_checks = regexp:/etc/postfix/nested_header_checks body_checks = regexp:/etc/postfix/body_checks owner_request_special = no smtp_tls_security_level = may dovecot_destination_recipient_limit = 1 smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth content_filter = amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings message_size_limit = 31457280 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_protocols = !SSLv2,!SSLv3 smtp_tls_protocols = !SSLv2,!SSLv3
and here is my master.cf: Code: # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master" or # on-line: http://www.postfix.org/master.5.html). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #smtp inet n - - - 1 postscreen #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy submission inet n - - - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions # -o smtpd_sender_restrictions=$mua_sender_restrictions # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING smtps inet n - - - - smtpd -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions # -o smtpd_sender_restrictions=$mua_sender_restrictions # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING # neu vom chico -o cleanup_service_name=subcleanup #628 inet n - - - - qmqpd pickup unix n - - 60 1 pickup cleanup unix n - - - 0 cleanup subcleanup unix n - - - 0 cleanup -o header_checks=pcre:/etc/postfix/header_checks.pcre qmgr unix n - n 300 1 qmgr #qmgr unix n - n 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender} # # ==================================================================== # # Recent Cyrus versions can use the existing "lmtp" master.cf entry. # # Specify in cyrus.conf: # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4 # # Specify in main.cf one or more of the following: # mailbox_transport = lmtp:inet:localhost # virtual_transport = lmtp:inet:localhost # # ==================================================================== # # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== # Old example of delivery via Cyrus. # #old-cyrus unix - n n - - pipe # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} # # ==================================================================== # # See the Postfix UUCP_README file for configuration details. # uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} dovecot unix - n n - - pipe flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} amavis unix - - - - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes 127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtp_send_xforward_command=yes 127.0.0.1:10027 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtp_send_xforward_command=yes -o milter_default_action=accept -o milter_macro_daemon_name=ORIGINATING
The deliver line in master.cf looks fine as far as I can see. I don't use Dkim here but I doubt that it akes a difference.
is this in main.cf right? Code: myhostname = server.domain.com mydestination = server.domain.com, localhost, localhost.localdomain
ISPConfig does not interfere with the mail routing at all, it just writes the config fíles that you posted above during installation and dovecot puts wrong values in the %d an %u placeholders as you can see in your tests. I recommend to just keep it with the %h placeholder for now.