Search code examples
cpanelwhmmail-server

Stop Centos mailserver from sending spam and route mail to managed mail (G-Suite)


We are currently migrating away from hosting our own mailserver due to not having an IT professional who is experienced in mailserver security (SPF, DKIM, DMARC, etc.). I have attempted to route the cPanel DNS zone records away from The Server which currently hosts several websites in hopes of fixing the problem of our mailserver being blacklisted for sending spam due to a vulnerability.

I have added Google's TXT records and I can successfully setup G-suite addresses for our email addresses locally. However, G-suite keeps suspending the email accounts since some spam from our old server (or an email bomb?) keeps being somehow forwarded to the

What steps do I need to take to prevent our mail from our local workstations from being routed through the server? It keeps blacklisting the emails and they can't get to the correct address.

I'm using WHM and cPanel.


Solution

  • In the WHM "Edit DNS Zones" Go to each Domain and set "Email Routing" at the bottom of the page to "Remotely". Added MX records, SPF, and DKIM as TXT records.

    Finally, you can shutdown the dovecot mail application running in Centos.

    sudo service dovecot stop
    
    sudo service dovecot status