Message to sender when user over quota

Discussion in 'Installation/Configuration' started by artifact66, May 30, 2010.

  1. artifact66

    artifact66 New Member

    Hello,

    Installed ISPconfig 3 using

    http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3

    For testing reasons i set (ISPconfig 3 control panel):

    Code:
    Client: Limits: Mailbox quota = 5
    Mailbox: Quota = 5
    
    Server config: Mail: Mailbox Size Limit = 5
    Server config: Mail: Message Size Limit = 5
    
    Now if im sending email bigger 5mb, i get back email from Mail Delivery System that:

    Code:
    <[email protected]>: message size 6146320 exceeds size limit 5242880 of
        server bbb.org[111.222.333.444]
    
    But, if i am sending by pieces 1mb, then 5 emails ok, but 6 is not delivered:

    Code:
    D3004214F7 1393067 Sun May 30 12:27:43 [email protected]
    (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied maildrop: maildir over quota.)
    [email protected]
    And there is no notification about quota limit reachet or similar.

    How to solve this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats because this is no quota limit. What you reached here is the message size limit in postfix and not a limit in ispconfig. You can set the message_size_limit limit to 20 MB by adding:

    message_size_limit = 20480000

    at the end of postfix main.cf file and then restart postfix.
     
  3. artifact66

    artifact66 New Member

    Tnx for answer, but seems like not solved.

    message_size_limit = 20480000 is in main.cf when value saved in ISPconfig.

    System:Server Config:Mail:

    Mailbox Size Limit = 100 MB
    Message Size Limit = 20 MB

    Still no answer from server, and it is waiting in queue until mailbox get more free space.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    postconf -n
    ?
     
  5. artifact66

    artifact66 New Member

    Code:
    root@server:/# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    mailbox_size_limit = 104857600
    message_size_limit = 26214400
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = xxxxxx.com, localhost, localhost.localdomain
    myhostname = xxxxxx.com
    mynetworks = 127.0.0.0/8 [::1]/128
    myorigin = /etc/mailname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    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 $virtual_mailbox_limit_maps
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost = 
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_security_level = may
    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 = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = maildrop
    virtual_uid_maps = static:5000
    
    
    After 5 or 6 days timeout message come back to sender:

    Undelivered Mail Returned to Sender

    <[email protected]>: temporary failure. Command output: ERR: authdaemon:
    s_connect() failed: Permission denied maildrop: maildir over quota.

    Maybe somewhere is this timeout setting?
     
    Last edited: Jun 5, 2010
  6. falko

    falko Super Moderator Howtoforge Staff

    Are the 100MB of that mail account full?
     
  7. artifact66

    artifact66 New Member

    No, every single mailbox now set to 5mb. But i set every other value bigger than email, to see if there is enough space. I send 5 times by 1mb then next 1mb file is in queue for 5 or 6 days, then sender receive notification, that user over quota. I want to get that work immediately.

    Strange thing is, that in main.cf is written:

    Code:
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    

    but in postconf -n it isn't. Why so?
     
    Last edited: Jun 6, 2010
  8. warlock

    warlock Member

    If the users mailbox is over quota, postfix will keep trying to deliver the mail for 5 days (default) at growing intervals, at which point it will then respond back to the send saying mail can't be delivered.
     
  9. warlock

    warlock Member

    Sorry I needed to add, this is because ISPC use disk quota's and not quota's at postfix level.

    hence when you reach 5mb, postfix or maildrop can write the mail into the users mailbox as he has run out of space and after 5 days if will return and NDR.

    if you were to change the
    mailbox_size_limit = 104857600
    to
    mailbox_size_limit = 5242880

    this will then have the effect you are looking for, but this will then do teh same to all mailboxes on your server
     
  10. artifact66

    artifact66 New Member

    Found that if i change in postfix

    bounce_queue_lifetime = 5d
    maximal_queue_lifetime = 5d

    to

    bounce_queue_lifetime = 0
    maximal_queue_lifetime = 0

    Now problem solved, only dont know other problems this can cause.
     
  11. warlock

    warlock Member

    the problem with this is if your MTA tries to send a mail to a server which is temp. unavaliable it will instatly bounce the message.
    I have reduce my setting from 5d to 1d, this will ensure that the mail delivery is apttempted for atleast 1 day before bouncing it
     

Share This Page