Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th July 2009, 03:34
taylor-made taylor-made is offline
Junior Member
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default [Virtual Users and Domains With Postfix, Courier, and MySQL (mdv2008.0)] Message Size

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:

Quote:
Originally Posted by errors.log
Jul 13 17:12:30 mail postfix/virtual[10486]: fatal: main.cf configuration error: virtual_mailbox_limit is smaller than message_size_limit
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.
Reply With Quote
Sponsored Links
  #2  
Old 14th July 2009, 04:19
iyeat iyeat is offline
Member
 
Join Date: Dec 2007
Posts: 43
Thanks: 4
Thanked 1 Time in 1 Post
Default

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...

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

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

Hope this helps.

Caio
Reply With Quote
  #3  
Old 14th July 2009, 07:49
taylor-made taylor-made is offline
Junior Member
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 by taylor-made; 14th July 2009 at 08:11.
Reply With Quote
  #4  
Old 14th July 2009, 08:25
iyeat iyeat is offline
Member
 
Join Date: Dec 2007
Posts: 43
Thanks: 4
Thanked 1 Time in 1 Post
Default

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.

Caio

Last edited by iyeat; 14th July 2009 at 08:38.
Reply With Quote
  #5  
Old 14th July 2009, 12:04
taylor-made taylor-made is offline
Junior Member
 
Join Date: Feb 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by iyeat View Post
What is the quota size set to in the mysql record for your mail user?

What is your message_size_limit set to?
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.

Quote:
Originally Posted by iyeat
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.

Caio
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.

Last edited by taylor-made; 14th July 2009 at 12:06.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) VTCop HOWTO-Related Questions 9 9th April 2009 16:17
Virtual Users And Domains With Postfix, Courier And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 05:02
Upgrade question for "Virtual Users And Domains With Postfix, Courier And MySQL" emresumengen HOWTO-Related Questions 3 1st December 2006 15:33
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53


All times are GMT +2. The time now is 16:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.