CentOS7 上使用git send-email发送patch,碰到一个SSL的警告,可以通过修改 /usr/share/perl5/Net/SMTP.pm 解决。
$ diff SMTP.pm.orig SMTP.pm -urp
--- SMTP.pm.orig 2019-06-21 23:33:55.298091001 +0000
+++ SMTP.pm 2019-06-21 23:33:29.120829781 +0000
@@ -59,6 +59,7 @@ sub new {
PeerPort => $arg{Port} || 'smtp(25)',
LocalAddr => $arg{LocalAddr},
LocalPort => $arg{LocalPort},
+ SSL_verify_mode => 0,
Proto => 'tcp',
Timeout => defined $arg{Timeout}
? $arg{Timeout}
$ git send-email --no-signed-off-by-cc --suppress-cc=all --to kongjianjun@gmail.com 0001-dist-suppress-the-yaml-load-warning.patch 0001-dist-suppress-the-yaml-load-warning.patch ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER possibly with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at /usr/libexec/git-core/git-send-email line 1211. OK. Log says: Server: smtp.gmail.com MAIL FROM:<> RCPT TO:<kongjianjun@gmail.com> From: Amos Kong <> To: kongjianjun@gmail.com Subject: [PATCH scylla] dist: suppress the yaml load warning Date: Fri, 21 Jun 2019 23:23:17 +0000 X-Mailer: git-send-email 1.8.3.1 Result: 250 2.0.0 OK 1561159400 z18sm3445252pgv.8 - gsmtp In git 1.7.0, the default has changed to --no-chain-reply-to Set sendemail.chainreplyto configuration variable to true if you want to keep --chain-reply-to as your default.




