Setting Up Mail Server Operation for CentOS Web Panel Web Hosting Control Panel on Amazon AWS Cloud

Subject: Setting Up Mail Server Operation for CentOS Web Panel Web Hosting Control Panel on Amazon AWS Cloud

Author: Mr. Turritopsis Dohrnii Teo En Ming, Singapore
Date: 25 Feb 2020 Tuesday


Before embarking on this guide, you should read the following guide first.

Guide: Mr. Teo En Ming’s Guide to Deploying CentOS Web Panel (CWP) Web Hosting Control Panel on Amazon AWS Cloud

Redundant blog links:




Teo En Ming’s DNS Zone File for domain on Primary DNS Server

$TTL    300
@       IN      SOA (
2020022502     ; Serial
604800     ; Refresh
86400     ; Retry
2419200     ; Expire
604800 )   ; Negative Cache TTL
; name servers – NS records
IN      NS
IN      NS

; mail servers – MX records
IN      MX      0

; name servers – A records          IN      A          IN      A

; mail servers – A records       IN      A

; Additional A records          IN      A       IN      A

; Sender Policy Framework (SPF) TXT records       IN      TXT     “v=spf1 ip4: -all”



Guide: Mail Exchange Record (MX)



Guide: How To: Lowering Your DNS TTLs



Discussion: Postfix: “Connection timed out” on all outbound email [closed]



“For anyone who found this question but is on AWS EC2: outgoing SMTP intentionally rate limited, but you can ask to have it relaxed.”


Discussion: Intermittent exim gmail smtp connection timeout



“Just an update for anyone with a similar issue – with some fresh eyes and some more googling it sounds like this may be caused by some SMTP rate limitations built into the AWS EC2 network as Spam prevention.

They have a form to register to remove outgoing smtp connection limitations here:

I’ve submitted and will update if this resolves the issues I was seeing.”


“Amazon SMTP traffic management indeed seems to have been the cause. Within a couple of hours of filling out the above form, I got an email confirmation from AWS that “traffic restrictions had been removed” and normal function resumed immediately.

Confusing the matters is that this SMTP traffic management is not documented well (and sometimes with contradicting information). It does not appear to be a hard cap limit, nor does it trigger any notification when it’s applied – it actually appears to be a *throttle* on common SMTP ports, triggered by a very small number of connections, beyond which it allows a certain number of connections per/hour – which would absolutely create the kind of “intermittent” connectivity issues I saw (and the odd delivery order of mail in the queue depending on when a retry “won the lottery” to negotiate a connection).

Anyway – I hope that info is of some use to others in the future!”


Guide: Installing Telnet In CentOS/RHEL/Scientific Linux 6 & 7


Amazon Web Services’ Reply to Teo En Ming


We approved your request for the removal of the EC2 email sending limitations on your Amazon Web Services account! If you requested removal of email sending limits on any other Amazon Elastic IPs, they’ve also been removed.

Because reverse DNS record entries are commonly considered in anti-spam filters, we recommend assigning a reverse DNS record to the Elastic IP address you use to send email to third parties. Please use the form located at this link to request a reverse DNS entry:

If you’d like to proceed with assigning a reverse DNS record to the Elastic IP, the first step would be to configure the A record for the domain to match the desired PTR record on your side.

Please follow the instructions at the link below to create the A record:

Please let us know if you have any questions.

Amazon Web Services


Guide: How to create an SPF TXT record?



Guide: Linux BIND DNS Configure Sender Policy Framework ( SPF ) an e-mail Anti Forgery System


Creating New User Account in CentOS Web Panel

Login to CentOS Web Panel Admin Panel.

From the left menu, click on User Accounts, then select New Account.

Domain name:



Admin Email:

Server IPs:

Package: Default

Reseller: Not checked

Inode: 0

Process limit: 40

Open files: 150

Backup user account: checked

Shell Access: Disabled by default for security reasons: Unchecked

AutoSSL: Domain must be pointed to the server: Unchecked

Click Create.

Setting Up New Email Account

Login to CentOS Web Panel User Panel.

From the left menu, click Email Accounts, then click Email Accounts.

Click Add a New MailBox.

Email Address:


Quota MB: 16000

Click Add.

Using Your New Email Account

Login to Roundcube Webmail.

Click Settings.

From the left menu, click Identities, then click

Display Name: Turritopsis Dohrnii Teo En Ming

Click Save.

Congratulations! You can now start using your new email account.












Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s