2015年3月25日星期三

Re: mutt 使用 msmtp 发送电子邮件的典型配置

$ msmtp --serverinfo --host=smtp.163.com --tls-certcheck=off --tls=on --tls-starttls=on
SMTP server at smtp.163.com (m12-15.163.com [220.181.12.15]), port 25:
    163.com Anti-spam GT for Coremail System (163com[20141201])
TLS certificate information:
    Owner:
        Common Name: *.163.com
        Organization: NetEase (Hangzhou) Network Co., Ltd
        Organizational unit: MAIL Dept.
        Locality: Hangzhou
        State or Province: Zhejiang
        Country: CN
    Issuer:
        Common Name: GeoTrust SSL CA - G2
        Organization: GeoTrust Inc.
        Country: US
    Validity:
        Activation time: Sat 01 Nov 2014 08:00:00 AM CST
        Expiration time: Sun 31 Dec 2017 07:59:59 AM CST
    Fingerprints:
        SHA1: 18:BD:01:69:29:57:62:CD:B9:24:30:FC:B9:BA:37:2E:E5:0C:CB:68
        MD5:  1C:AE:5F:AA:D1:54:44:34:CF:16:EC:54:EC:CC:86:20
Capabilities:
    PIPELINING:
        Support for command grouping for faster transmission
    STARTTLS:
        Support for TLS encryption via the STARTTLS command
    AUTH:
        Supported authentication methods:
        PLAIN LOGIN

$ msmtp --serverinfo --host=mail.elephanttalk.com --tls-certcheck=off --tls=on --tls-starttls=on
SMTP server at mail.elephanttalk.com (mail.elephanttalk.com [87.119.194.122]), port 25:
    mail.elephanttalk.com Microsoft ESMTP MAIL Service ready at Wed, 25 Mar 2015 06:42:43 +0100
TLS certificate information:
    Owner:
        Common Name: mail.elephanttalk.com
        Organizational unit: Go to https://www.thawte.com/repository/index.html
    Issuer:
        Common Name: Thawte DV SSL CA
        Organization: Thawte, Inc.
        Organizational unit: Domain Validated SSL
        Country: US
    Validity:
        Activation time: Tue 11 Mar 2014 08:00:00 AM CST
        Expiration time: Sun 13 Mar 2016 07:59:59 AM CST
    Fingerprints:
        SHA1: 3C:88:0B:4C:E5:2F:3E:B1:93:7D:B7:96:D1:C2:01:C2:E1:73:75:C0
        MD5:  75:28:63:59:25:96:6D:05:CD:91:92:F6:F4:EA:76:FD
Capabilities:
    PIPELINING:
        Support for command grouping for faster transmission
    DSN:
        Support for Delivery Status Notifications
    STARTTLS:
        Support for TLS encryption via the STARTTLS command
    AUTH:
        Supported authentication methods:
        LOGIN NTLM

$ msmtp --serverinfo --host=smtp-mail.outlook.com --port=587 --tls-certcheck=off --tls=on --tls-starttls=on
SMTP server at smtp-mail.outlook.com ([65.55.176.126]), port 587:
    BLU436-SMTP249.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version: 8.0.9200.16384 ready at  Tue, 24 Mar 2015 22:37:37 -0700
TLS certificate information:
    Owner:
        Common Name: *.hotmail.com
        Organization: Microsoft Corporation
        Locality: Redmond
        State or Province: Washington
        Country: US
    Issuer:
        Common Name: GlobalSign Organization Validation CA - G2
        Organization: GlobalSign nv-sa
        Country: BE
    Validity:
        Activation time: Thu 25 Apr 2013 04:35:09 AM CST
        Expiration time: Mon 25 Apr 2016 04:35:09 AM CST
    Fingerprints:
        SHA1: D4:FA:F9:BE:9D:D7:2A:54:70:4C:BE:68:8C:FF:53:27:5D:EA:83:14
        MD5:  86:60:F6:38:1C:84:A6:AC:94:92:51:2F:67:9A:7D:76
Capabilities:
    SIZE 41943040:
        Maximum message size is 41943040 bytes = 40.00 MiB
    PIPELINING:
        Support for command grouping for faster transmission
    ETRN:
        Support for RMQS (Remote Message Queue Starting)
    DSN:
        Support for Delivery Status Notifications
    STARTTLS:
        Support for TLS encryption via the STARTTLS command
    AUTH:
        Supported authentication methods:
        PLAIN LOGIN

$ cat /etc/msmtprc
defaults
  tls on
  tls_starttls on
  tls_certcheck off
  auth on
  auto_from off

account 163
    host smtp.163.com
    port 25
    user xxx
    password yyy

account outlook
    host smtp-mail.outlook.com
    port 587
    user xxx
    password yyy

account default: outlook


On Thu, Jan 31, 2008 at 5:26 PM, Dongsheng Song <dongsheng.song@gmail.com> wrote:
$ cat .msmtprc
defaults
auto_from off
from testuser@gmail.com
tls_certcheck off
logfile ~/.msmtplog

account gmail
    host smtp.gmail.com
    tls on
    auth on
    port 587
    user testuser
    password xxxxxxxx

account default: gmail

$ cat .muttrc
charset-hook !utf-8 gb18030

set sendmail="/usr/local/bin/msmtp -d"
set realname="Real Name"
set from="testuser@gmail.com"
set use_from=yes