unSpawn |
11-16-2011 06:05 AM |
Quote:
Originally Posted by darshakamodi
(Post 4525277)
my customer sends bulk mailing, due to that we receive error 452, too much mail receipants. I want to schedule mail in Sendmail, if client has sent mail to 500 receipants, the server will serve in batch of hundres.
|
In my opinion that would be the wrong approach. Any sane remote MTA your MTA contacts would (or should) see such bulk mail sending as a threat and a violation. So first bursting up to 500 recipients and only after the fact throttle back to 100 may not (should not) cut it. What you enforce should be part customer education and part throttling. For the next please refer to Sendmail documentation and maybe the O'Reilly "Bat book":
- confMAX_RCPTS_PER_MESSAGE: max recipient/message
- confCONNECTION_RATE_THROTTLE: max new connection/second
- confBAD_RCPT_THROTTLE: punish on bad user names
- tune down any overly long timeout defaults (any confTO_*)
* By default Sendmail runs one queue but you can make it run several based on any filter you can to think of. Each queue can have its own "policy" based on cost, sender, delivery speed etc, etc. See http://www.ilkda.com/sendmail/Queue_Tips.htm for ideas.
- You could apply a maximum limit via Netfilter as well and this can be generic or based on remote port, IP address etc, etc. For example '/sbin/iptables -I OUTPUT -o eth0 -m state --state NEW -p tcp --dport 25 -m limit --limit 50/s --burst-limit 75/s -j ACCEPT' would limit outbound connections to any remote MTA to 50 new connections per second with a maximum of 75 per second.
Quote:
Originally Posted by darshakamodi
(Post 4525277)
Or it will open connection with yahoo/gmail after some time and will deliver message by scheduling it.
|
Addressing the cause would IMHO be a better long-term solution.
|