Limiting user mails user nobody can send per hour?

bsasninja

Well-Known Member
Sep 2, 2004
527
0
166
Due to spam/mailing problems I limited max mails each domain can send per hour to 100, also a max_recipients to 50.
But when a user uses a soft like PHPLIST these settings are overrided and can send more than 100 per hour.
Is there an exim rule to avoid that???

Thanks!
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
697
1
168
Not an exim rule, but set Tweak Security SMTP tweak so scripts have to go through exim. That should alleviate the problem and use the limits specified in exim.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
lloyd_tennison said:
Not an exim rule, but set Tweak Security SMTP tweak so scripts have to go through exim. That should alleviate the problem and use the limits specified in exim.
Although if you've installed APF the SMTP tweak option will be disabled -- you can re-enable it but you need to do a little fiddling to do so.

HOWEVER: The real problem here is that your user scripts are sending out email as nobody, effectively making them anonymous. Anonymous email is really bad as it means you can't easily track down and terminate spammers) The problem here is that if you set up a limit on the anonymous user that will become less workable as you get more users. The correct solution is to switch to use phpsuexec and suexec so scripts run under the account's username rather than being anonymous - and that also makes the email scripts send out go out under the account's username, hence it's trackable and spammer detection becomes a breeze (and detecting problems with system load becomes easier also).

If you're using the per-hour limits you'll probably find it helpful to know that there's a way to increase the per-hour limit on a per-domain basis. Simply list the domain in /var/cpanel/maxemails (plain text file, you'll need to create it) with the line format:

domain.com=1000

where domain.com is the domain in question and 1000 is the new limit per hour. (Acknowledgement: This was originally discovered by the ever-lovin Chirpy of www.configserver.com fame).