Sunday, November 13, 2011

Email limiting in cpanel

1.You can set this in the WebHost Manager by editing the setting for Max hourly emails in Main >> Server Configuration >> Tweak Settings.
You can change the maximum number of emails allowed for a particular domain to a different number than the system default using the
file /var/cpanel/maxemails.

Just add an entry like ‘domain.com = 200″. which means 200 is the maximum email per hour limit for domain.com.

after that execute /scripts/build_maxemails_config

If you are using csf firewall - There is an option "RT_LOCALRELAY_LIMIT" which limits the amount of emails sent locally.
vi /etc/csf/csf.conf


2.  Check email account disk quotas

cat ~username/.cpanel/email_accounts.yaml
---
domain.tld:
  accounts:
      user:
      diskquota: '0'
      diskused:'0'
      mtime: '0'
  disk_mtime: '0'
  mtime: ' '
  quota_mtime: ' '

If needing to modify e-mail account disk quotas please do so via cPanel to ensure all pertinent files are properly updated:

    cPanel: Main >> Mail >> Email Accounts

3.If you copy e-mail accounts manually to another server, you will want to move /$HOME/$USER/.cpanel/email_accounts.yaml and /$HOME/$USER/.cpanel/email_accounts.cache so that they will be regenerated the next time you log into cPanel as the account user. Moving the files will force cPanel to re-read the passwd and shadow file for the account and correctly populate the email_accounts.yaml file.

4. In this case, you have to manually remove the email account entries for domain yourdomain.com from the existing account.

The files you need to remove the entries from are

/home/user/etc/yourdomain.com/passwd

/home/user/etc/yourdomain.com/shadow

/home/user/.cpanel/email_accounts.yaml

The directory that need to be removed is

/home/user/mail/yourdomain.com

where, ‘user’ is the cPanel username of yourdomain.com.

No comments: