-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSendMailInVM
51 lines (33 loc) · 1.72 KB
/
SendMailInVM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
使用阿里云服务器发送邮件
https://blog.csdn.net/m0_37673753/article/details/81356298
echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > 163.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
1046 certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
1047 certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/./ -i 163.crt
1048 certutil -L -d /root/.certs
chmod 777 ~/.certs/163.crt
vim /etc/postfix/main.cf
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = all
# Enable IPv4, and IPv6 if supported
inet_protocols = all
service postfix start
vim /etc/mail.rc
set smtp=smtps://smtp.163.com:465
set smtp-auth-password=QXXJYGDGDLDQDWBB
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/root/.certs
echo "hello,this is the content of mail.welcome to www.mzone.cc" | mail -s "Hello from mzone.cc by pipe" [email protected]
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/./ -i 163.crt
certutil -L -d /root/.certs
————————————————
版权声明:本文为CSDN博主「CC-梅」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/m0_37673753/article/details/81356298
mail -s 'this is a test mail from aliVm triggered by zhiyuan' [email protected],[email protected] < /etc/passwd