git-send-email: SSL_verify_mode 警告

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.

SimpleSSHD for Android

https://play.google.com/store/apps/details?id=org.galexander.sshd&hl=en

通过google play安装到手机,默认端口为2222,app手机启动后,需要点击启动按钮开启服务。app上会显示手机ip。

然后通过电脑ssh客户端连接,如 ssh 192.168.1.100 -p 2222,连接建立后会在app上显示随机分配的密码,再客户端输入后可以成功登陆了。可以在ssh文件目录下添加 authorized_keys文件,这样就不用每次输入了。

手机sd卡的目录为 /sdcard/,连接的普通用户是有读写访问权限的。可以使用rsync把手机相册的问题件同步到电脑上。rsync -e ‘ssh -p 2222’ -rtvpl 192.168.1.1:/sdcard/DCIM/ .

扩展:Asias使用rsync把手机图片视频原始文件同步到电脑,然后再压缩后回传到手机,这样大大减少了手机空间使用,而且压缩后的图片视频基本不影响查看。