Page 1 of 1

Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/11 05:37:12
by duncan98
Why can't CentOS send mail when sendmail and mailx are installed? The configuration example is as follows:
/etc/mail.rc

set from=bp**@outlook.com
set smtp=smtp.office365.com
set smtp-auth-user=bp**@outlook.com
set smtp-auth-password=1234
set smtp-auth=login

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/12 19:57:10
by dthacker9
What are the mail logs saying?

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/16 10:59:06
by duncan98
dthacker9 wrote:
2020/06/12 19:57:10
What are the mail logs saying?
hi,dthacker9
When I send the email, it prompts the error message: SSL/TLS Failure: Unknown error-5938.Is there anything wrong with my certificate?

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/16 13:35:39
by pjsr2
Which port number did you configure? Should be in the setting for relay_host. Default port is 25. I think outlook.com wants 587 for STARTTLS to function.

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/16 19:05:11
by duncan98
pjsr2 wrote:
2020/06/16 13:35:39
Which port number did you configure? Should be in the setting for relay_host. Default port is 25. I think outlook.com wants 587 for STARTTLS to function.
Yes, I have set SMTP= smtps://smtp.outlook.com : 465, or 587. The above prompt still appears。You may be talking about the configuration of Postfix

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/17 07:49:23
by pjsr2
error message: SSL/TLS Failure: Unknown error-5938.Is there anything wrong with my certificate?
Error-5938 is related to establishing the SSL protocol connection. It is the SSL-certificate on the server you are connecting to that is used for the encryption of the connection and verification of the identity of the server. Your own certificate is not used at this point.

Did you try the following in mail.rc?

Code: Select all

set smtp-use-starttls
set smtp=smtp.office365.com:587

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/24 01:14:50
by duncan98
pjsr2 wrote:
2020/06/17 07:49:23
error message: SSL/TLS Failure: Unknown error-5938.Is there anything wrong with my certificate?
Error-5938 is related to establishing the SSL protocol connection. It is the SSL-certificate on the server you are connecting to that is used for the encryption of the connection and verification of the identity of the server. Your own certificate is not used at this point.

Did you try the following in mail.rc?

Code: Select all

set smtp-use-starttls
set smtp=smtp.office365.com:587
Yes, I've set it, but it prompts the same error

Re: Why can't centos send mail after installing sendmail and mailx?

Posted: 2020/06/24 13:57:00
by duncan98
Problem solved, thank you