On Wed, 7 Mar 2001, Donncha O Caoimh wrote:
> I'd like to limit the number of concurrent Sendmail processes delivering
> mail from our server because it soaks our ISDN connection.
use Donncha's install-sendmail script... oh wait.. :)
>> Uising Sendmail 8.9.2 still, and would rather some hints on modifying
> sendmail.cf as I don't want to try and find the m4 file again..
> I've tried setting "QueueLA" to 4 instead of 8 which might encourage
> Sendmail to queue messages instead of delivering them..
> "When the system load average exceeds LA, just queue messages (that is,
> do not try to send them). Defaults to 8."
whips out bat book...
sendmail doesn't seem to have explicit outbound throttling (i cant
find it). what you could do is enable single threaded per remote MTA
this will stop sendmail open multiple connections to the same remote
MTA, and instead if there's mutliple mails it will feed it one by one
to that MTA over the same connection.
This isn't a recc'd configuration for the daemon though. From bat
book: it means a large email to acme.com will cause other smaller
messages to acme.com to be queued until that large message has been
delivered. If that is acceptable then this would be a way to reduce
sendmails bandwidth consumption to a degree.
MCI_CACHE and HOST_STATUS_... are good though, but don't solve your
> Is there a better way? "QueueFactor" looks promising but not sure what
> it does..
if above doesn't help, then you'll need to investigate running the
sendmail listener in queueonly mode, and running a seperate queue
processing job every couple of min from cron to process the queue.
Then you can tweak the work factor to penalise large messages, and
also sort the queue by priority first, eg:
You can then tweak things like ClassFactor and RecipientFactor to
vary the priority penalty for things like class of mail and number of
recipients - if you reduce them then you bias the priority to be more
against the size of the mail. You could even move very large jobs
to another queue for processing at night.
kevins ConnectionRateThrottle suggestion is useful too, but again
aimed more at avoiding high host load. If you set it too low, then
your users will start finding that their client often times out trying
to send email. Some clients in particular will give the user a very
cryptic/confusing message (eg outlook).
basically, i don't think you can do something that is in any way
equivalent to limiting sendmail to x kB/s.
finally it might be possible to use 2.4 either as the host or as a
router in front of the host and use netfilter/iproute/tc to limit the
bandwidth of mail. iptables to mark dst port = smtp packets, and tc to
shape it. have a look at adv-routing howto and probably you'd need to
ask on dedicated mailling lists.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!