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

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.

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

Related

550 Requested action not taken: mailbox unavailable or not local

my domain is hosted on a plesk panel control, I had migrated my domain webmail from plesk to zoho.I am facing a bouncing problem when I send mail from another webmail of other domain
As Per How to fix “550 Requested action not taken: mailbox unavailable or not local” in Plesk servers
In Plesk Windows servers, the default mail server is MailEnable. Plesk
account owners in these servers sometimes report the MailEnable error
SMTP server response: 550 Requested action not taken: mailbox
unavailable or not local when trying to send out mails or when
managing their account functions through the Plesk panel.
What does this error mean ?
It means MailEnable found the recipient domain of a mail in the
server, but couldn’t locate the email username. For example, let’s say
MailEnable received a mail to be delivered to
“mail-recipient#domain.com”. It would look for active mail services
for “domain.com”, and then for the inbox of “mail-recipient”. If it is
able to locate “domain.com”, but not “mail-recipient#domain.com”, this
error would be returned. We’ve been able to prevent server incidents
by up to 15% by using our proactive server checks (click here to see
how we improve web hosting support).
Why does this happen?
We have noted the following situations in which this error is reported
by Plesk panel accounts.
For some unknown reason, when the recipient mailbox was disabled by the account owner, or because of a bug in Plesk.
When the email account is hosted elsewhere (like Google Apps), but the domain has mail services enabled in the local server. Bonus tip :
If the customer receives this error (as shown below) while using the
Plesk panel, it means that the administrator email for the domain is
set to an email account which is either disabled in the local server,
or is hosted elsewhere.
Warning: Unable to send notification: mail() failed: mail() [function.mail]: SMTP server response: 550 Requested action not taken:
mailbox unavailable or not local
How to fix this error?
If the email service for the domain is hosted elsewhere, just turn off mail services by going to:
Domains > Mail > Disable Mail
If the MX points to the local server, check if the email account is disabled, and if so, re-enable it.

Apache James not receiving email from external senders after SSL enabled

Very new to James, so please bear with the question.
James 2.3.2.1, Ubuntu 14.04.
Configured as both POP3 and SMTP. SSL enabled and certificate store successfully connected.
The problem is this: once SSL is enabled, the SMTPS listen port is 465, and there is no longer a listener on the standard port 25 to receive email from external senders (e.g., from Gmail). Thus mail delivery sent to local accounts works when sent from other local accounts, but fails when sent from external servers.
Is it possible to configure James to listen both on the standard port 25 for external senders and on the secured port 465 for authenticated senders? If so, how is it done, and how do I make sure it doesn't become an open relay (i.e., only receives mail sent to local user accounts)? With the SSL configuration, I just set both authRequired and verifyIdentity to true, which ensures only authenticated users can send mail. With standard SMTP, I'm not sure:
a) how to configure it while also having the secured connection; and
b) how to avoid becoming an open relay.
Thanks in advance for any help.
So I didn't find a way to do this in James, but my goals were:
a) secured SMTP for authenticated (domain) user accounts;
b) regular SMTP for receiving email from external servers;
c) not becoming an open relay.
I achieved this by using the nifty OpenSMTPD server relaying to the secured James port. Took a while to get the configuration right on both servers, but the setup is working like a charm now.
Postfix looked too complicated to set up, and Sendmail does not support client-side SSL connections (to secured SMTP servers). OpenSMTPD is a lifesaver.

External Email Server for one domain under cPanel server

Trying to set up a domain name under cPanel server... so far so good, the problem comes once I am trying to point this domain to an external Kerio Mail server.
Even though from ssh user root can telnet the Kerio Mail server, when the user/domain tries to sent email using this server, get's smtp connection timed out.
Wondering is there's more than DNS changes that need to be made or something else is needed in cPanel firewall (CSF)
To allow SMTP connection to another server, any thoughts ?
If you are trying to send mail from your server and getting timeout then you need to check your firewall. First I will suggest you please try to disable your server firewall and test your mail again.

Mailbox on different server, domain on my server. Windows 2008 server

I have one domain on my server and a mailbox (with the same domain ending) on a different server. I configured the mail and MX fields of DNS of that server to the proper value. All is working. But as I send an email from the website contact form (configured with SMTP = localhost) sending an email to the email address on the other server, the email will not reach the mail box ..Even no error is generated..Simply the mail server receives nothing. On the other hand from the contact form I can send email to different mailboxes.
How to solve this ?
I solved the issue by setting in the first panel for the SMTP settings in MailEnable, the host values to 200.x.x.x which should redirect all the traffic outside the server.

email forwarding, apache, cpanel, php

How does email forwarding works in cpanel (apache server)? I could not find any documentation for this on my client's cpanel itself (i dont have their hosting account only cpanel). Basically, they just want to monitor incoming and outgoing emails in one account. They have 8 email individual accounts and one person wants to monitor each accounts email (in and out) is there a way to do this using cpanel in an apache server.
thanks in advance!
Unfortunately, it's impossible to forward outgoing mail in CPanel. See this link:
http://forums.cpanel.net/f43/possible-forward-outgoing-mail-78332.html
and
http://www.linuxweblog.com/blogs/sandip/20090423/monitor-outgoing-emails-cpanel-exim
Unfortunately I don't have access to exim settings so I'd like to know if there's another solution as well.