How to set limit to remove the Frozen emails automatically?

To set auto-delete for the frozen emails, you need to edit the exim configuration file on your server.

# vi /etc/exim.conf

timeout_frozen_after = 5d ( 5 Days )

# /etc/init.d/exim restart

That’s it!

domain.com exceeded the max records and failures per > hour (5/5 (%)) allowed. Message discarded.

In cPanel 11.32, a new feature is added to limit the ability of exploited or hacked sites to send out spam emails. A few customers who send out mass mailings have been triggering this feature, due to the number of bad/undeliverable email addresses on their lists.

Due to this feature you may get the following bounce back.

“Domain has exceeded the max defers and failures per hour (5/5 (26%)) allowed. Message discarded.”

cPanel will regularly monitor the emails sent through all email accounts on your domain, and if, over the past hour, more than 25% of the attempted deliveries have failed, outbound email will temporarily be limited.

To solve the issue,remove following file.

/var/cpanel/email_send_limits/max_deferfail_domain.com

and restart the exim service or you may need to disable the option “Ratelimit incoming connections with only failed recipients” in tweak Settings in WHM. If you still have an issue with this, in Tweak settings, change the value for “Maximum percentage of failed or deferred messages a domain may send per hour”. The option is used for the maximum percentage of a domain’s outgoing mail that can consist of failed or deferred messages. Once the domain exceeds this percentage, it is temporarily blocked from sending mail.

If you’re not sure exactly what is causing this, you can probably figure it out by using the Email Trace icon in your hosting control panel. When you click the Email Trace icon, you’ll see a field where you can enter a recipient’s email address and then click a “Run Report” button to get information about email sent to that recipient. If you enter nothing for the recipient email address, you’ll get back data for all email traffic, and as you look through it you should see groups of bounced messages which can help you determine what sender caused the problem, and why.

Exim error after migrating to new server

Some times following errors may be seen after migrating to new server.

failed to expand condition “${if exists {$home/etc/$domain/quota}{${if > {${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{0}{${if eq {${if exists {$home/mail/$domain/$local_part/maildirsize}{1}{0}}}{0}{${if > {${run {/usr/local/cpanel/bin/eximwrap GETDISKUSED $local_part $domain}}}{${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{true}{false}}}{${perl{checkuserquota}{$domain}{$local_part}{$message_size}{${lookup{$local_part}lsearch{$home/etc/$domain/quota}{$value}}}{$home/mail/$domain/$local_part/maildirsize}}}}}{false}}}{false}}” for virtual_user_maildir_overquota router:

You may face such issue due to array or one (or more) of the accounts had a quota usage that exceeded Exim’s hard coded limit,which can be resolved by executing

# /scripts/reset_mail_quotas_to_sane_values

on your server.

How to manage the mail queue in exim

REMOVE MAILS BY ID
/usr/sbin/exim -v -Mrm (MAIL ID HERE)

LIST QUEUED MAILS
/usr/sbin/exim -bp

OUTPUT NUMBER OF QUEUED MAILS
/usr/sbin/exim -bpc

DELETE FROZEN MAILS
/usr/sbin/exim -bpr | grep ‘*** frozen ***’ | awk ‘{print $3}’ | xargs exim -Mrm

DELIVER FORCEFULLY EMAILS
/usr/sbin/exim -qff -v -C /etc/exim.conf &

FREEZE MAILS FROM SENDER
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

REMOVE MAILS FROM SENDER
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm

FORCE DELIVERY OF ONE MESSAGE
exim -M email-id

FORCE ANOTHER QUEUE RUN
exim -qf

FORCE ANOTHER QUEUE RUN & ATTEMPT TO FLUSH THE FROZEN MAILS
exim -qff

VIEW LOG OF MESSAGE
exim -Mvl messageID

VIEW BODY OF MESSAGE
exim -Mvb messageID

VIEW HEADER OF MESSAGE
exim -Mvh messageID

REMOVE MESSAGE WITHOUT ANY ERROR
exim -Mrm messageID

GIVEUP & FAIL MESSAGE TO BOUNE THE MESSAGE TO THE SENDER
exim -Mg messageID

NO OF EMAILS IN QUEUE
exim -bpr | grep “<” | wc -l

NO OF FROZEN EMAILS IN A QUEUE
exim -bpr | grep frozen | wc -l

REMOVE MAILS BY ID
/usr/sbin/exim -v -Mrm (MAIL ID HERE)

LIST QUEUED MAILS
/usr/sbin/exim -bp

OUTPUT NUMBER OF QUEUED MAILS
/usr/sbin/exim -bpc

DELETE FROZEN MAILS
/usr/sbin/exim -bpr | grep ‘*** frozen ***’ | awk ‘{print $3}’ | xargs exim -Mrm

DELIVER FORCEFULLY EMAILS
/usr/sbin/exim -qff -v -C /etc/exim.conf &

FREEZE MAILS FROM SENDER
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

REMOVE MAILS FROM SENDER
/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm

TO FORCE EXIM TO DELIVER A EMAIL
exim -qff -v

HOW TO CHECK MAIL QUEUE FOR A PARTICULAR ACCOUNT
exim –bp | exiqsumm > spamm.txt

After executing this a command you will get the result in spamm.txt file. This command takes time for execussion. Execute this command when the load of the server is below min.