From onime@ictp.trieste.it Tue Jun 27 16:36:48 2000
Date: Tue, 27 Jun 2000 14:25:20 +0200 (MET DST)
Cc: Enrique Canessa 


  

Okay, 
www4mail does implement it's own queing! 

I think with the 2.0 release, we experimented with the option that you
suggested, www4mail rejecting mails by returning an error code to the MTA,
what we discovered that the MTA automatically generates a mail(warning or
something similar) about this rejection back to the end user. The end user
(does not read carefully the mail) assumes that your server is down and
proceeds to send a mail to a mailing list that your server has
problems...) The above actually happened to us!

Okay, back to the issue of queueing:
www4mail implements it's own queue, it accepts the mails from an MTA and
saves them in a private spool directory and handles them when the system
is less busy..

The key to this is to add the following line(s) to your www4mail.cfg file
LAThreshold	5
RefuseLA	5
SuspendLA	5

This will cause www4mail to queue all new requests and also attempt to
queue pending processing when the load average goes above 5

All three directives affect the same variable but the LAThreshold is the
strongest. You can use just LAThreshold but try to make sure that your
config files do not include any RefuseLA or SuspendLA directives.

The SuspendLA or RefuseLA directives are only used if they are
greater than the LAThreshold, they are ignored if they are lower than the
value of LAThreshold (the default for the 2.4 gateway seems to be 50 ;-(
my mistake, it should be zero).


On Linux systems, the following directive is used
ProcLA	/proc/loadavg

This reads the load average from a proc file and parses the
contents of that file for more information on the system's load average.

For non-limux systems, the alternative is to declare the following 
UptimeCmd	/usr/bin/uptime

{Or the location of your uptime command}

In which case, it will try to periodically run the uptime command in order
to determine the system's Load average.
UptimeCmdPeriod  300
{in seconds}, this will cause the uptime command to be run every 5
minutes..

Finally the folliwng directive also affect the queueing.
If a spooled job is over the amount of time in seconds, specified by 

SpoolTimeOutPeriod 	43200

The job is not processed, the user is just informed that his job timed
out.

Well, about the authentication, I also was thinking about the possiblity
running some external program to handle the authentication. Probably, it
would be available in the next release. 
 

Note: sendmail (or the MTA) is sometimes also to blame becuase it always
tries to start up 50 copies of www4mail at the same time, if it was
possible to tell sendmail or the MTA that run only 10 at a time, life
would be much easier...Alas, I have not discovered how to do this yet.