On Sat, Mar 08, 2003 at 10:19:36PM +0000, Jeff Jansen wrote:

> On Saturday 08 March 2003 20:00, Anand Buddhdev wrote:
> > See the settings MAXDELS and MAXHOST in
> > /etc/courier/module.esmtp. MAXDELS is the absolute
> > maximum number of outgoing connections made by the esmtp
> > client. MAXHOST is lower than MAXDELS, and is the maximum
> > number of connections made to any specific host.
> >
> > So you want MAXDELS=6 and MAXHOST=2.
> 
> Thanks Anand.  I didn't realize that you could set the 
> parameters in those files.  But I changed the values and I 
> saw the changes reflected in the logs when courierd started 
> up.  So I learn something new every day!
> 
> So what is the relationship between the "MAXRCPT" setting in 
> module.esmtp and the batchsize file?  According to the 
> documentation it seems to me that these both specify the 
> same thing - maximum number of recipients for single 
> message.  But my batchsize file has a different number in 
> it than MAXRCPT and courierd starts up the esmtp module 
> with MAXRCPT rather than batchsize.  

RFC 2821 sets a limit on the number of recipients in a single SMTP
transaction to 100.  Courier's esmtp client therefore defaults to 100,
and it's not a good idea to set this higher, as some SMTP servers out
there will reject the additional recipients.

I'm not exactly sure about the use for batchsize, but my understanding
is that it has more to do with courier's memory usage rather than any
standard. batchsize affects all messages submitted to courier, via any
protocol. courier then has to store this message into the queue on disk,
and from the disk, it reads the messages into a queue in RAM. Each such
message in RAM requires memory, and a message with a extremely large
number of recipients would use up too much RAM.

The fact that these 2 numbers are the same is probably convenient,
since courier mostly transfers mail via SMTP. Messages on disk with 100
recipients each for the same domain would be handled by the esmpt client
in a single transaction.

> And does this have anything to do with the maxrcpts setting 
> in bofh?  My understanding is maxrcpts in bofh is the max 
> recipients on incoming messages and batchsize (and maybe 
> MAXRCPT) is the max recipients on messages that courier 
> tries to deliver.  So in the case of maxrcpts in bofh 
> courier will reject all the other recipients.  Whereas in 
> the case of batchsize courier will copy the message until 
> it can break the recipient list up into groups smaller than 
> the batchsize setting.  Am I correct here?  And where does 
> MAXRCPT fit in.

maxrcpts in bofh is for *incoming* email, and defines how many recipients
courier's SMTP server will handle, before rejecting the rest. The RFC
2821 recommended value is 100, and you should not set it lower.

> And why you're explaining all this to me, can you tell me 
> why I should care about these numbers?  It is strictly a 
> DOS safe-guard so that no one can crash my server by 
> sending a message with 1000's of recipients on it?  Is it a 
> guard against spammers? And why should I want courier to 
> make copies of messages that have more than X recipients 
> rather than just deliver the message "as-is".

Like I said above, RFC 2821, memory usage and limiting the effect of a
DOS attack.

-- 
Anand Buddhdev
http://anand.org


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to