Hello,
In my testing environment, I successfully made one central cPanel email server, that handles email accounts for 5 other cPanel servers.
In short, when an account is created in one of these 5 cPanel servers, I modified how DNS is provisioned so that MX and webmail.domain.com records point to my central email server. I also had to change cPanel files so that domain.com/webmail point the visitor to my central email server. The clear downside of this is that, every email account has to be created and managed in my central cPanel email server, while everything else has to be managed on the other respectives cPanel servers.
After I finished this setup I thought: This could cause me a lot of headaches in the long run.
I went through all this trouble to avoid one thing: Client's emails not reaching inboxes due to blacklists. These blacklists were caused by mass email sending scripts, only.
So, I never had an IP blacklisted because one client was abusing their email. Every time, it is because of a compromised website, or even clients themselves installing email marketing software and sending a multitude of emails.
Anyway, what I want to achieve is:
How could I make SMTP email (or email that is sent from an actual email account in my server) go one way, and scripts email (mainly email sent using PHP's mail() function) go another way?
This could be:
- Send SMTP email through local IP xxx.xxx.xxx.xx1, and mail() email through xxx.xxx.xxx.xx2. This way I can at least have more control over blacklists.
- Send SMTP email through an SMTP service like Mailgun, Sendgrid etc, and send mail() email through the local exim server.
Disabling PHP's mail() function is not an option.
Can you guys help me out?
Thanks.
In my testing environment, I successfully made one central cPanel email server, that handles email accounts for 5 other cPanel servers.
In short, when an account is created in one of these 5 cPanel servers, I modified how DNS is provisioned so that MX and webmail.domain.com records point to my central email server. I also had to change cPanel files so that domain.com/webmail point the visitor to my central email server. The clear downside of this is that, every email account has to be created and managed in my central cPanel email server, while everything else has to be managed on the other respectives cPanel servers.
After I finished this setup I thought: This could cause me a lot of headaches in the long run.
I went through all this trouble to avoid one thing: Client's emails not reaching inboxes due to blacklists. These blacklists were caused by mass email sending scripts, only.
So, I never had an IP blacklisted because one client was abusing their email. Every time, it is because of a compromised website, or even clients themselves installing email marketing software and sending a multitude of emails.
Anyway, what I want to achieve is:
How could I make SMTP email (or email that is sent from an actual email account in my server) go one way, and scripts email (mainly email sent using PHP's mail() function) go another way?
This could be:
- Send SMTP email through local IP xxx.xxx.xxx.xx1, and mail() email through xxx.xxx.xxx.xx2. This way I can at least have more control over blacklists.
- Send SMTP email through an SMTP service like Mailgun, Sendgrid etc, and send mail() email through the local exim server.
Disabling PHP's mail() function is not an option.
Can you guys help me out?
Thanks.