Postfix And Quota

Discussion in 'Installation/Configuration' started by m3galo, Jul 20, 2010.

  1. m3galo

    m3galo New Member

    Hello,

    I've recently installed a mail server with Postfix on Ubuntu 10.04 with this tutorial.

    But unfortunately the quota doesn't work well. In my client mail Thunderbird it's said that my quota is 10MB whereas I've configured postfix with 10GB.

    There is my "postconf -n" and my "main.cf" :

    Code:
    [email protected]:/etc/postfix# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    disable_vrfy_command = yes
    html_directory = /usr/share/doc/postfix/html
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 10737418240
    mydestination = $myhostname, localhost.localdomain, localhost
    mynetworks = 127.0.0.0/8, server.com
    myorigin = /etc/mailname
    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 content_filter = amavis:[127.0.0.1]:10024
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_limit = 10737418240
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_uid_maps = static:5000

    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.
    
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    disable_vrfy_command = yes
    smtpd_helo_required = yes
    
    # 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
    
    # TLS parameters
    smtp_tls_note_starttls_offer = yes 
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myorigin = /etc/mailname
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    mydestination = $myhostname, localhost.localdomain, localhost
    mynetworks = 127.0.0.0/8, server.com
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 10737418240
    recipient_delimiter = +
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, 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 = /home/vmail
    virtual_mailbox_limit = 10737418240
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    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 content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    
    I tried to change the quota limit in the main.cf and in the MySQL table too. No effect.

    If someone could give an answer because I'm not very confortable with mail server. Thank you.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Try BIGINT instead of INT for the quota column of the users table.
     
  3. m3galo

    m3galo New Member

    This is already in BIGINT in the users table.
     
  4. m3galo

    m3galo New Member

    I suspect Postfix to not connect to the mysql database because my aliases doesn't work too (user unknown for any alias). But that would be weird user accounts work fine and i've no record in my logs that indicate this...

    I tried many how-to before to get a decent result, do you think it could be affect my configuration and would it be better if I took a fresh start ?
     
  5. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    uname -a
    ?
     
  6. m3galo

    m3galo New Member

    There :

    Code:
    uname -a
    Linux #####.ovh.net 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
    '#####' are the server name
     
  7. falko

    falko Super Moderator Howtoforge Staff

    I thought the problem might be caused by a 32bit system, but you're using 64bit, so that's ok. I don't know why it isn't working... :(
     
  8. m3galo

    m3galo New Member

    I'll probably try with some official forum of Postfix or something like that. If a solution comes to me I'll share it there.

    Anyway thank you falko for your time =)
     

Share This Page