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

Issues related to applications and software problems
Post Reply
duncan98
Posts: 9
Joined: 2020/03/03 06:35:40

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

Post by duncan98 » 2020/06/11 05:37:12

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

dthacker9
Posts: 7
Joined: 2014/08/31 20:02:17

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

Post by dthacker9 » 2020/06/12 19:57:10

What are the mail logs saying?

duncan98
Posts: 9
Joined: 2020/03/03 06:35:40

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

Post by duncan98 » 2020/06/16 10:59:06

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?

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

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

Post by pjsr2 » 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.

duncan98
Posts: 9
Joined: 2020/03/03 06:35:40

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

Post by duncan98 » 2020/06/16 19:05:11

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

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

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

Post by pjsr2 » 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

duncan98
Posts: 9
Joined: 2020/03/03 06:35:40

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

Post by duncan98 » 2020/06/24 01:14:50

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

duncan98
Posts: 9
Joined: 2020/03/03 06:35:40

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

Post by duncan98 » 2020/06/24 13:57:00

Problem solved, thank you

Post Reply