Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to send mail in linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "how to send email in linux". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Configuration proc

Start sendmail

Service sendmail startchkconfig sendmail on

Establish certification

Mkdir-p / root/.certs/echo-n | openssl s_client-connect smtp.qq.com:465 | sed-ne'/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~ / .certs/qq.crtcertutil-A-n "GeoTrust SSL CA"-t "C,"-d ~ / .certs-I ~ / .certs/qq.crtcertutil-A-n "GeoTrust Global CA"-t "C" "- d ~ / .certs-I ~ / .certs/qq.crtcertutil-L-d / root/.certscd / root/.certscertutil-A-n" GeoTrust SSL CA-G3 "- t" Pu,Pu,Pu "- d. /-I qq.crtcd

Get authorization code

Attach / etc/mail.rc the following

Set from=1234567@qq.comset smtp=smtp://smtp.qq.com:587set smtp-auth-user=1234567@qq.comset smtp-auth-password=abcdefghiset smtp-auth=loginset smtp-use-starttlsset ssl-verify=ignoreset nss-config-dir=/root/.certs

Send an email

Echo "the content" | mail-s "the subject." Problems that the-target@examplemail.com may encounter

Exception encountered:

Unexpected EOF on SMTP connection

Could not connect: Connection timed out

The previous settings may have been:

Set smtp=smtp.qq.com

Just change it to the content in the above process, that is:

This is the end of set smtp=smtp://smtp.qq.com:587 's "how to send an email in linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report