[Ubuntu]Postfix - Virtual users and quota

Discussion in 'Installation/Configuration' started by AkumA, Mar 12, 2007.

  1. AkumA

    AkumA New Member

    i'm running the famous server (In test :D) postfix+assp

    I think i got all things working except the quota for virtual users.
    I couldn't install quota patch for postfix because in Ubuntu's repos there is a late version of Postfix (I've followed debian's virtual users and domains... etc..)

    I've sent few mails with attachements after i've make a 1MB account.
    The mails arrived and i got all the mail (Over 1MB) in /home/vmail/mydomain/testuser/cur/

    This is my postfix main.cf
    myhostname = something
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    #myorigin = /etc/mailname
    mydestination = something
    relayhost =
    mynetworks =,
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mys$
    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_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, re$
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_lim$
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota$
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $vir$
    it's not well copy&pasted but you should understaind anyway.. the full version is in the guide.
    Maybe there's a new version of the patch.. but i can't find it :/
  2. falko

    falko Super Moderator ISPConfig Developer

    What's your Postfix version? You can find it out like this:
    postconf -d | grep mail_version
    You must use the quota patch from http://web.onda.com.br/nadal/postfix/VDA/ that matches your Postfix version.
  3. AkumA

    AkumA New Member

    i'm sorry! i thought i've wrotten the version...

    Thanks for the link
    i've 2.2.10

    I'll try when i can
  4. falko

    falko Super Moderator ISPConfig Developer

  5. AkumA

    AkumA New Member

    Using my mysql-*.cf i can see the mail created under /home/vmail and i can use the forwardings table.

    Should i really change mysql-*.cf files to the fedora's guide ones?

    downloaded patch
    installed as the guide says.
    At dpkg-buildpackage command i've got that some dependancies were not satisfied so i've installed more packages than the guide ones manually.
    Dpkg-buildpackaged worked fine.
    cd ..
    dpkg -i *.deb (They are brand new packages and the ONLY packages in directory) and i got all working with the "old" mysql-*.cf!!

    I think i don't need to change them to fedora's ones uh? :)
    Last edited: Mar 19, 2007
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, as they seem to work for you.
  7. AkumA

    AkumA New Member

    err, maybe you've misunderstood, i mean that now i've the mysql-*.cf taken from this guide http://www.howtoforge.com/virtual_postfix_mysql_quota_courier

    and not the ones from Fedora's guide that Falko suggested me... but they work!
    I was wondering if there's a concrete reason to change them anyway..
  8. falko

    falko Super Moderator ISPConfig Developer

    If they work it's fine, but you should check your mail log for errors.
  9. AkumA

    AkumA New Member

    I've changed domains and obtained both working and not working situations.

    I've added users in the forward table and it worked.
    Removed, added, i've tested the changes (Sendig to a local account and to an exchange account).

    I've set up transport maps and i got communication with Exchange and, after i've patched and reinstalled postfix (This morning), i've tried to send a 1.2MB attachement to a 1MB limited mailbox and i got "The user you're trying to reach is over quota".

    tail -f /var/log/mail.log
    Gives no errors

    mail.err idem
    mysql.err idem
    mysql.log idem

    If there's something else that i'm ignoring feel free to show me where i could look for errors!

    By the way, thank you so much everybody for the support and the patience with a noob!
  10. falko

    falko Super Moderator ISPConfig Developer

    Seems to work fine if you don't find errors in the logs. :)

Share This Page