Limit Mail Message

Discussion in 'Tips/Tricks/Mods' started by Tripple, Nov 5, 2007.

  1. Tripple

    Tripple New Member

    Can I add this line in /etc/postfix/main.cf to limit the Mail message size for all users:

    message_size_limit = 5000

    I'm asking this because I received a mail that some users are over there quota limit but I can't see this in there directory. Maybe someone received a large mail.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, this setting is to limit the max. message size for the whole server.
     
  3. Tripple

    Tripple New Member

    Thanks.
    However, I'm not sure this has anything to do with quota. I'm receiving this mail twice a day, 03:15 AM, 15:15PM.
     
  4. AlArenal

    AlArenal New Member

    Yes and no. The postfix limit has an effect on how big the mails may be, that you can send over the server. The quota message refers to available disk space which is affected by emails lying around in your users' maildirs as well as uploaded files in the userdirs, the main web dir, ...

    These two issued are only losely coupled if at all.
     
  5. Tripple

    Tripple New Member

    There must be a mistake in the calculation.
    When I check the diskspace on that server:
    # du -sh /var/www/web2/user/*
    148K 2_bart
    148K 2_boris
    272K 2_jakob
    148K 2_jasper
    ...

    And here are some parts of the mail I receive twice a day:

    The following users are near or already over their quota limit on server xxxxx:
    ===================================================

    Username: 2_jakob
    Used Storage Space: 11.00 MB
    Allocated Storage Space: 10.00 MB
    ----------------------------------------------------------------------------

    Username: 2_jasper
    Used Storage Space: 11.00 MB
    Allocated Storage Space: 10.00 MB
    ----------------------------------------------------------------------------

    Username: 2_bart
    Used Storage Space: 11.00 MB
    Allocated Storage Space: 10.00 MB
    ----------------------------------------------------------------------------

    Username: 2_boris
    Used Storage Space: 11.00 MB
    Allocated Storage Space: 10.00 MB
    ----------------------------------------------------------------------------

    etc....
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    To get the quota value of a user, run:

    repquota -avug

    You looked just at the users home directory, but a user may have files in other places, e.g. /tmp/ or /var/spool/mail/
     
  7. Tripple

    Tripple New Member

    Indeed:
    2_jasper +- 11264 10240 11264 5days 17 0 0

    /tmp/
    drwx------ 2 2_jasper web2 4096 2007-11-06 05:05 clamav-33b9b38a47ced4a1ed04311e39b22a9c

    Only 5MB, mail is empty.
     

Share This Page