[Virtual Users and Domains With Postfix, Courier, and MySQL (mdv2008.0)] Message Size

Discussion in 'HOWTO-Related Questions' started by taylor-made, Jul 14, 2009.

  1. taylor-made

    taylor-made New Member

    I've spent the last couple hours searching this forum for a solution to this problem, but haven't been able to find a post that satisfactorily solve the problem. The question I have is:

    How do I increase the size of message accepted by the server beyond the default 10MB limit?

    The answers I've seen posted all boil down to the same: postconf -e 'message_size_limit = 0' (or large number of bytes in place of 0), and increase the "quota" field of the virtual user in MySQL to accomodate the larger file size. If I do that, however, Postfix stops delivering mail to my inbox. The only error I can find that pertains to this in the logs is:

    As soon as I remove or comment the message_size_limit line in main.cf, however, the hung up mail in the queue gets delivered.

    Virtual_mailbox_limit, of course, is defined by the quota field for the user in MySQL, right? So, how the heck do I tell this MTA setup that I want it to allow messages with sizes larger than 10MB?

    I'm stumped. Any help, even just a direction to look in, would be appreciated.
  2. iyeat

    iyeat New Member

    In your postfix main.cf file, you have to add the message_size_limit.

    In my file, it's located near the bottom (which it probably is in yours too if you followed the install).

    The size is in Bytes...

    message_size_limit = 20971520
    ...which is 20MB on my server.

    And of course you should reload postfix after changing this number.

    Hope this helps.

  3. taylor-made

    taylor-made New Member

    Unfortunately, it doesn't help. :( If I put "message_size_limit = anything" in main.cf (using the postconf -e command or directly adding via text editor), the above error regarding virtual_mailbox_limit is generated and messages get held up in a queue bottleneck until the message_size_limit line is removed.

    All I'm trying to do is get the MTA to accept files larger than 10MB for delivery to my virtual users (which includes myself), but still be able to limit the quota on their mailboxes to whatever I want to. Is this not possible?

    Edit: I think I just answered my own question. Evidently in order to be able to handle large (say, 50MB) files through e-mail, I have to set every virtual user's quota to match or exceed the message_size_limit specified in main.cf. So, that means no more 10MB quotas for virtual users, unless I misunderstand the system.

    Have I got this right? This is the only way to solve the problem of increasing the maximum size of a message sent through my e-mail server?
    Last edited: Jul 14, 2009
  4. iyeat

    iyeat New Member

    What is the quota size set to in the mysql record for your mail user?

    What is your message_size_limit set to?

    Edit: I think I'm starting to understand your issue.. I think there is some clarification that is needed..

    You're referring to "Handling" 50MB emails.. but I think what you mean is that you want to be able to send a 50MB email, but keep the virtual user limit 10MB... which means that you would not be able to necessarily receive a 50MB email... The Quota is a max mailbox limit... so you obviously would not be able to receive a mail that is larger than your entire quota...

    I am not sure how to increase outgoing mail message size without impacting incoming messages or file quota... since technically everything that goes through postfix is smtp, and it is just a question of where the destination is for the domain.

    Last edited: Jul 14, 2009
  5. taylor-made

    taylor-made New Member

    I reset all virtual user quotas to ((50 * 1024) * 1024) bytes, while resetting my own account to ((100 * 1024) * 1024) bytes.

    The message_size_limit variable is set to ((50 * 1024) * 1024) bytes.

    The above combination allows me to send and receive files up to 50MB in size, but at the expense of giving every single user of my (free for family and friends) e-mail service a 50MB mailbox quota.

    Allow me to clarify: I do indeed understand the difference between a mailbox quota and the maximum message size the MTA will accept for delivery in any direction.

    I want to be able to send as well as receive large files. However, since neither is being done on a regular basis, I still want to be able to restrict other users to a more reasonable mailbox quota. I communicate and trade files (mostly .psd files) with friends and acquaintances all over the world, and very often e-mail is our primary or sole means of communication. Other situations where I get bitten by the message_size_limit=10MB issue is when I want to send a dozen high-resolution digital photos to my wife at work: she can receive them (yay short-sighted Windoze e-mail server!), but I can't send them through my own e-mail server.

    Rather than set up an FTP account for these other users to access, or upload photos to an online photo-sharing site (yes, I do use Photobucket, but it resizes my high-rez images), I'd simply like to be able to drop it in an e-mail.:D
    Last edited: Jul 14, 2009

Share This Page