Koozali.org: home of the SME Server

Limiting bandwith in Outgoing Mail

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Limiting bandwith in Outgoing Mail
« on: May 29, 2008, 10:27:05 PM »
What happened to ConcurrencyLocal and ConcurrencyRemote in "config show qmail"??

I REALY need to limit the bandwidth for outgoing mail. If for example someone sends an email of about 4-5mb to 10 people or more it chokes the internet connection so bad that it is just impossible to browse the web, let alone use remote desktop software like logmein or even RPD (terminal services). It is worse than sharing a 56K Dialup for 20 users concurrently.

If only there was a way to limit either the maximum amount of bandwidth used for outgoing mail or the maximum number of emails that could be send concurrently.

Alternatively:
If an email has more than one recipient, is there a way that the server can send it in one email (only if your server forward outgoing mail to your isp’s smtp server of course) instead of  sending multiple emails, one for each recipient? That might also be a big help to minimize the bandwidth used by outgoing email.

I think that this is an important issue and the many others could benefit from it.

Offline egerards

  • *
  • 11
  • +0/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #1 on: May 30, 2008, 01:32:03 PM »
You may want to have a look at this page: http://wiki.contribs.org/Wondershaper
Regards,

Eric G.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Limiting bandwith in Outgoing Mail
« Reply #2 on: May 30, 2008, 09:06:26 PM »
Already tried that, unless im doing something wrong. It seems to make a slight improvement but not enough to help.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #3 on: May 31, 2008, 10:24:34 AM »
Gert

Quote
What happened to ConcurrencyLocal and ConcurrencyRemote in "config show qmail"??

They have default values (as per template fragments) of 10 and 20 respectively

The template fragment code only supports setting the value for ConcurrencyRemote with a db command.

eg

config show qmail
config setprop qmail ConcurrencyRemote 5
signal-event email-update
config show qmail

If you have a really slow outgoing bandwidth you could set ConcurrencyRemote to a value of 1

qmail will send a seperate email to each recipient, so that cannot be changed

Corrected as per pfloor's post
« Last Edit: June 01, 2008, 12:34:35 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Limiting bandwith in Outgoing Mail
« Reply #4 on: May 31, 2008, 11:45:04 AM »
"config show qmail" shows

Code: [Select]
qmail=service
    MaxMessageSize=15000000
    status=enabled

that is why i am asking

What happened to ConcurrencyLocal and ConcurrencyRemote in "config show qmail"??

its not there anymore in sme7.x, i checked on a freshly installed server.

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #5 on: May 31, 2008, 07:31:28 PM »
Gert

They have default values (as per template fragments) unless you enter different db values
eg

config show qmail
config setprop qmail ConcurrencyLocal 10
config setprop qmail ConcurrencyRemote 5
signal-event email-update
config show qmail

If you have a really slow outgoing bandwidth you may even set it like
config setprop qmail ConcurrencyRemote 1

qmail will send a seperate email to each recipient, so that cannot be changed


That's only partially true.  ConcurrencyRemote can use a db setting and associated template.  If no db setting is present the default value is 20.

ConcurrencyLocal does not use a db entry and is hard coded via a template to 10.  "config setprop ConcurrencyLocal X" does nothing.  If you want to change it you will need to do it via a custom template.
In life, you must either "Push, Pull or Get out of the way!"

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Limiting bandwith in Outgoing Mail
« Reply #6 on: June 01, 2008, 12:07:51 AM »
So even thought the db entry does not exist by default i can create it and it will work?

ConcurrencyLocal doesn't bother me at all. I just need to change ConcurrencyRemote. It will help alot on 23 of my servers.
« Last Edit: June 01, 2008, 12:10:32 AM by Gert »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #7 on: June 01, 2008, 12:36:31 AM »
Gert

Quote
So even thought the db entry does not exist by default i can create it and it will work?

Yes, as the template fragment code for ConcurrencyRemote already supports the db command
« Last Edit: June 01, 2008, 01:52:42 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #8 on: June 01, 2008, 12:45:10 AM »
paul

Quote
"config setprop ConcurrencyLocal X" does nothing.  If you want to change it you will need to do it via a custom template.

Thanks for that correction.
The method would be:

If not already exist create the folder
mkdir -p /etc/e-smith/templates-custom/var/qmail/control/

cp /etc/e-smith/templates/var/qmail/control/concurrencylocal /etc/e-smith/templates-custom/var/qmail/control/

(above is all on one line)

pico -w /etc/e-smith/templates-custom/var/qmail/control/concurrencylocal

edit value to 5 (or whatever required)
Ctrl o
Ctrl s
signal-event email-update
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Limiting bandwith in Outgoing Mail
« Reply #9 on: June 01, 2008, 01:08:30 AM »
The method would be:

I don't know why anyone would want to reduce concurrencylocal.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Limiting bandwith in Outgoing Mail
« Reply #10 on: June 01, 2008, 08:26:59 AM »
Yes, as the template fragment code for ConcurrenctRemote already supports the db command

Thank you, that will solve my prob.  :)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Limiting bandwith in Outgoing Mail
« Reply #11 on: June 05, 2008, 05:23:26 AM »
And so it did!