SMTP (port 25) Plesk 12 on CentOS 7 "None of the authentication methods supported by your server" - smtp

I have just moved my server to OVH Dedicated server and now having a problem with SMTP, which I need a bit of help with.
SMTP is set on port 25, but when I am setting up my email client (MS Outlook 2010 or Android Email Client) I have notification "server does not support authentication"
I can receive emails on all of the email clients and can send email but only via webmail.
here is an update:
220 myserver.net ESMTP Postfix
EHLO iamuser
250-myserver.net
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DNS
Also if I enable TLS on Outlook the it works, but it does not work on android even with TLS.
Please help!!!

Server doesn't provide auth, it may be because of "smtpd_tls_auth_only = yes" in /etc/postfix/main.cf.
"smtpd_tls_auth_only = yes" forbid authentication on non-secure connection like port 25.
You can just change it to "no", or try using secure port 465 in Android Mail Client.
It's quite easy to check your SMTP server auth methods.
On Windows you need telnet client:
CMD> telnet yourserver.name 25
SERVER> 220 deb7x64-plesk12-1.local ESMTP Postfix (Debian/GNU)
CLIENT> EHLO iamuser
SERVER> 250-deb7x64-plesk12-1.local
SERVER> 250-PIPELINING
SERVER> 250-SIZE 10240000
SERVER> 250-ETRN
SERVER> 250-STARTTLS
SERVER> 250-AUTH DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
SERVER> 250-ENHANCEDSTATUSCODES
SERVER> 250-8BITMIME
SERVER> 250 DSN
CLIENT> quit
SERVER> 221 2.0.0 Bye
Where "DIGEST-MD5", "CRAM-MD5", "PLAIN", "LOGIN" it's an authentication methods.
I've checked that "Android Email Client" is replaced with google's Gmail application and it working fine with provided auth methods.

Related

Why the first EHLO command is "unrecognized command" on gsmtp?

I'm learning basics of the networking and want to send a email via command line. I opened a telnet session with gmail-smtp-in.l.google.com:25 and issue the very first command EHLO gmail.com
220 mx.google.com ESMTP u16-20020ac25190000000b00449fff280afsi9331201lfi.49 - gmtp
EHLO gmail.com
502 5.5.1 Unrecognized command. u16-20020ac25190000000b00449fff280afsi9331201lf.49 - gsmtp
EHLO gmail.com
250-mx.google.com at your service, [xxx.xxx.xxx.xxx]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
When i first issuing EHLO gmail.com it says Unrecognized command but then it accepts my command. What am i doing wrong?
I cannot replicate your problem. telnet gmail-smtp-in.l.google.com 25 followed by EHLO localhost after having received the greeting works fine for me. (You're not supposed to use gmail.com in EHLO, but this shouldn't matter. The correct way would be to use the fully qualified domain name for your machine (not localhost) or your IP address in square brackets if your machine has no DNS address.)
RFC 5321 specifies that SMTP clients should wait for the greeting from the server before sending the EHLO command. Delaying the greeting can be used as an anti-spam measure, but I don't think that this is the problem here.

Gmail SMTP Can't Connect

I can't get Gmail SMTP to connect and I'm getting this debug info on tls:
2017-12-05 16:40:25 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP q9sm1085224pfl.116 - gsmtp
2017-12-05 16:40:25 CLIENT -> SERVER: EHLO localhost
2017-12-05 16:40:25 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2405:204:d304:d69d:3c36:3d9:213e:186a]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2017-12-05 16:40:25 CLIENT -> SERVER: STARTTLS
2017-12-05 16:40:25 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
SMTP Error: Could not connect to SMTP host.
2017-12-05 16:40:26 CLIENT -> SERVER: QUIT
2017-12-05 16:40:26
2017-12-05 16:40:26
SMTP Error: Could not connect to SMTP host.
Message could not be sent.Mailer Error: SMTP Error: Could not connect to SMTP host.
I have tried SSL too, which says "can't connect". I have never had an experience like this.
Note: I am using PHPMailer
Does anyone have the same issues or is it just me ?

Nagios: How to properly configure NRPE to monitor IMAP and SMTP

We would like to monitor the IMAP and SMTP services on our Zimbra server through Nagios. I have the following two lines configured in my nrpe.cfg file on the Zimbra server:
command[check_imap]=/usr/local/nagios/libexec/check_imap -H <hostname> -p 993
command[check_smtp]=/usr/local/nagios/libexec/check_smtp -H <hostname> -p 465
And here is are the corresponding services in services.cfg on the Nagios server:
define service {
use generic-service
host_name <hostname>
service_description IMAP
check_command check_nrpe!check_imap
}
define service {
use generic-service
host_name <hostname>
service_description SMTP
check_command check_nrpe!check_smtp
}
We keep getting "CHECK_NRPE: socket timeout after 10 seconds" errors when trying to monitor these services. We use SSL on the Zimbra server, so I assume I need ports 993 and 465 defined in the command line. All of the other services we monitor (disk SMART status, processes, etc.) are fine. What else can I check?
Mea culpa. You have to add the -S switch to the end of the command lines to tell Nagios to use SSL to monitor those services.
I also changed the SMTP port from 465 to 587. Both services are are now displaying properly in Nagios.

SMTP MAIL FROM AUTH= format to connect to gmail

I have an older PHP system that uses SMTP commands for mail. We are switching over to gmail and I need to authenticate. I can connect to the server. Unfortunately, I get a 530-5.5.1 Authentication Required. Learn more at" message when I send the MAIL FROM command in my PHP code.
if (fputs($this->Socket, "MAIL FROM: \"admin\" <admin#yourdomain.com>\r\n")<0){
I cannot find a clear example of adding authentication. I read at http://www.faqs.org/rfcs/rfc2554.html that I must add AUTH= to my MAIL FROM command. I am having troubles interpretting what to put in the AUTH=
Examples:
C: MAIL FROM:<e=mc2#example.com> AUTH=e+3Dmc2#example.com
S: 250 OK
Do you know the format of authentication?
There are several ways to do SMTP authentication, but one of them is to use the SMTP AUTH LOGIN command. The transcript of the session would look like this:
host: 220 banner_here
client: EHLO StephaniePC
host: 250-name.of.host hello [clientip], pleased to meet you
host: 250-AUTH LOGIN PLAIN
host: 250 OK
client: AUTH LOGIN
host: 334 VXNlcm5hbWU6
client: am9lc21pdGg=
host: 334 UGFzc3dvcmQ6
client: bGV0bWVpbg0K
host: 235 2.7.0 Authentication successful
client: MAIL FROM: <sender#senderdomain.tld>
host: 250 2.1.0 Ok
client: RCPT TO: <recipient#recipientdomain.tld>
host: 250 2.1.0 Ok
client: DATA
host: 354 End data with <CR><LF>.<CR><LF>
....
The encoded strings that you see above are base64 encoded. If you have a mail client that is capable of logging, you can try sending a message through gmail, and the transcript of the session should look like the transcript above.
FYI, instead of writing code yourself to do SMTP authentication, you might want to use phpmailer. phpmailer can do SMTP authentication, and it's very lightweight and easy to use.

Webmin port 25 is blocked

I have set up webmin on my CentOS server with a few domains. I have also added a test email account but cannot send any emails from my Outlook after configuring the settings for IMAP/STMP server. If I try and telnet to port 25, i get an error. Iptables isn't blocking port 25, postfix server is running and ISP isn't blocking any ports. I have also tried turning off iptables which made no difference.
Any ideas?