[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[msmtp-users] msmtp invalid argument for --tls-fingerprint



Hello,

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888602

Package: msmtp Version: 1.6.6-1
Severity: normal

Error:

      $ msmtp --host mail.asu.cas.cz --serverinfo --tls --tls-fingerprint=5C:87:23:44:48:3F:5F:98:E9:AE:F5:85:65:B4:B4:5A:4B:F9:61:BC:BD:E1:57:16:59:80:0B:17:25:82:33:FD
      msmtp: invalid argument 5C:87:23:44:48:3F:5F:98:E9:AE:F5:85:65:B4:B4:5A:4B:F9:61:BC:BD:E1:57:16:59:80:0B:17:25:82:33:FD for --tls-fingerprint

Solution:

      $ diff --recursive -c orig/msmtp-1.6.6/src/msmtp.c new/msmtp-1.6.6/src/msmtp.c
      *** orig/msmtp-1.6.6/src/msmtp.c	Mon Nov 14 20:44:01 2016
      --- new/msmtp-1.6.6/src/msmtp.c	Sat Jan 27 17:03:23 2018
      ***************
      *** 2953,2959 ****
                        conf->cmdline_account->tls_md5_fingerprint = NULL;
                        if (*optarg)
                        {
      !                     if (strlen(optarg) == 2 * 32 + 19)
                            {
                                conf->cmdline_account->tls_sha256_fingerprint =
                                    get_fingerprint(optarg, 32);
      --- 2953,2959 ----
                        conf->cmdline_account->tls_md5_fingerprint = NULL;
                        if (*optarg)
                        {
      !                     if (strlen(optarg) == 2 * 32 + 31)
                            {
                                conf->cmdline_account->tls_sha256_fingerprint =
                                    get_fingerprint(optarg, 32);

Test:

      $ ./src/msmtp --host mail.asu.cas.cz --serverinfo --tls --tls-fingerprint=5C:87:23:44:48:3F:5F:98:E9:AE:F5:85:65:B4:B4:5A:4B:F9:61:BC:BD:E1:57:16:59:80:0B:17:25:82:33:FD
      SMTP server at mail.asu.cas.cz (mail [147.231.106.199]), port 25:
          mail.asu.cas.cz ESMTP Postfix Centos
      TLS certificate information:
          Owner:
              Common Name: mail.asu.cas.cz
              Organization: Astronomický ústav AV ČR\, v. v. i.
              Locality: Ondřejov
              State or Province: C
              Country: CZ
          Issuer:
              Common Name: TERENA SSL CA 3
              Organization: TERENA
              Locality: Amsterdam
              State or Province: Noord-Holland
              Country: NL
          Validity:
              Activation time: Tue Jan 31 01:00:00 2017
              Expiration time: Tue Feb  4 13:00:00 2020
          Fingerprints:
              SHA256: 5C:87:23:44:48:3F:5F:98:E9:AE:F5:85:65:B4:B4:5A:4B:F9:61:BC:BD:E1:57:16:59:80:0B:17:25:82:33:FD
              SHA1 (deprecated): EC:2B:A7:94:B4:CD:D1:0A:B2:CC:9D:23:15:47:28:58:E9:E9:33:3F
      Capabilities:
          SIZE 30000000:
              Maximum message size is 30000000 bytes = 28.61 MiB
          PIPELINING:
              Support for command grouping for faster transmission
          ETRN:
              Support for RMQS (Remote Message Queue Starting)
          STARTTLS:
              Support for TLS encryption via the STARTTLS command

Best Regards Jan Fuchs

--
http://www.fuky.org