Now tryed with port 587 instead of port 465 and there is some update on my problem with esmtp and gmail.com (google) account:
with /opt/etc/esmtprc (doesn't matter whether starttls = enabled or required):
Code:
hostname = smtp.gmail.com:587
username = "xxxxxxx.x@gmail.com"
password = "xxxxxxx"
starttls = enabled
result:
Code:
$ echo "Test Message" | /opt/sbin/sendmail xxxxxxxx.x@gmail.com
Invalid peer certificate (error 20)
0 (null)
xxxxxxxx.x@gmail.com: 0 (null)
and with following /opt/etc/esmtprc:
Code:
hostname = smtp.gmail.com:587
identity = "xxx@xxxxx.xxx"
username = "xxxxxxx.x@gmail.com"
password = "xxxxxx"
starttls = enabled
result:
Code:
$ echo "Test Message" | /opt/sbin/sendmail xxxxxxxx.x@gmail.com
0 (null)
xxxxxxxx.x@gmail.com: 0 (null)
and no emails arrive to google.
I've also found in Internet an advice to use stunnel especially for getting working esmtp with google account, but may be there is a more simple solution?