Problem: Mailman and WHM's "limit mail sends per hour"

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
You will need to SSH into your server and edit the file /var/cpanel/maxemails (which won't exist) and add domain=number pairs for those that you want to restrict to a particular number of emails per hour, e.g:

somedomain.com=100
 
V

vijay,koppa

Guest
Could anyone blease help me on how to implement this code in WHM.

I've my dedicated server and have logged into WHM. If someone could let me know the procedure to deploy this, it would be of help to me.

(I want to limit the number of outgoing emails per email account or to a particular domain name.)


I was looking into something else and spotted this code in exim.pl:
Code:
      open(CF,"/var/cpanel/cpanel.config");
      while(<CF>) {
         next if (/^#/);
         s/\n//g;
         my($var,$value) = split(/=/, $_);
         if ($var eq "maxemailsperhour") {
            $maxmails = int($value);
         }
      }
      close(CF);

      open(CPM,"/var/cpanel/maxemails");
      while(<CPM>) {
         s/\n//g;
         my($mdomain,$mmax) = split(/=/);
         if ($mdomain eq $domain) {
            $maxmails = int($mmax);
         }
      }
      close(CPM);
The first open is getting the maxemailsperhour that you have set in WHM. The second open is the interesting one. It's opening a file /var/cpanel/maxemails and reading in domain=number pairs. If the domain for the email matches then the number overrides the WHM one.

So, if you want to exempt a domain from maxemailsperhour, create that file and put in it:
domain.com=0

If you just want to set a higher limit for a domain (or different domains), use:

domain.com=1000
otherdomain=20

Not tried it, but the code is there to use it :eek:
 

SuperCed

Registered
Nov 27, 2009
1
0
51
Limits of mailman

I am searching for a server able to send a lot of emails.

I need to send like one million emails in one hour. We have a very big mailing list. Now we use another company but I want to try to send some emails one day, and upgrade little by little each day, up to some millions of emails.
I precise that we are not spammer, it's a requested newsletter with optin!

Do you think we can do that with mailman?

Thanks!
 

craigedmonds

Well-Known Member
Oct 29, 2007
114
0
66
Europe
cPanel Access Level
Root Administrator
Twitter
MailMan Limits

I know this thread is vintage. But this feature NEEDS to be on Cpanel.

Yes, I concur with benito.

WHM/Cpanel needs to have a function for mailman which restricts the amount of emails that can be delivered per hour for mailman.

I just had a client on our shared sever upload a list of 137,500 email accounts and even though we have a limit on the email at 250 per hour, there were still thousands of emails being attempted to be delivered.

Even AFTER we removed the spam mailing list, all the backed up email continued to be generated for 24 hours after, so we were having to manually remove all the bounces and emails from the exim mail queue.

Also, during this time our server load was up to 10+ (usually server load is between 0,5 > 3,0)
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,287
65
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Re: MailMan Limits

Hi there, I'm looking for something like the limits proposed to use with mailman. cPanel staff: the latest post in this thread should be allocated in a separated thread: MailMan Limits
I also think it would be a very valuable feature for sysadmins. I have suffered from that too.