"Password data is not valid for scheme SHA256". What does this mean?

Discussion in 'Server Operation' started by insanedavid, Jul 23, 2017.

  1. insanedavid

    insanedavid New Member

    I am attempting to install Postfix as the MTA and Dovecot as the MDA on a Ubuntu 16.04 LTS VPS.

    I can send e-mail from a different domain via Thunderbird to an address configured in /etc/dovecot/passwd.db and /etc/postfix/virtual-mailbox-users. However, when I attempt to setup a new account in Thunderbird by entering my test AT domain.com e-mail address, password, IMAP, and SMTP settings I get:

    Code:
    Jul 22 18:40:48 www dovecot: auth: Error: passwd-file(test AT domain.com,46.xxx.xxx.xxx,<wZoHUuxU6IAu9j4y>): Password data is not valid for scheme SHA256: Input length isn't valid (0 instead of 32)
    Jul 22 18:41:00 www dovecot: message repeated 2 times: [ auth: Error: passwd-file(test AT domain.com,46.xxx.xxx.xxx,<fGoHUuxU6IAu9j4y>): Password data is not valid for scheme SHA256: Input length isn't valid (0 instead of 32)]
    Jul 22 18:41:02 www dovecot: imap-login: Disconnected (auth failed, 3 attempts in 14 secs): user=<test AT domain.com>, method=PLAIN, rip=46.xxx.xxx.xxx, lip=139.xxx.xxx.xxx, TLS, session=<fGoHUuxU6IAu9j4y>
    In Thunderbird, I use test AT domain.com, the unhashed version of the password located in /etc/dovecot/passwd.db, and the IMAP and SMTP servers are the www DOT domain.com. I used doveadm pw -s SHA256 to generate the password.

    The passdb section of /etc/dovecot/conf.d/01-mail-stack-delivery.conf shows:

    Code:
    passdb {
      driver = passwd-file
      args = username_format=%u scheme=SHA256 /etc/dovecot/passwd.db
      deny = no
      master = no
      pass = no
      skip = never
      result_failure = continue
      result_internalfail = continue
      result_success = return-ok
    }
    /etc/dovecot/passwd.db contains test AT domain.com and a password created with SHA256. Test AT domain.com is also referenced in /etc/postfix/virtual-mailbox-users and /etc/postfix/virtual-mailbox-users.db.

    I do not understand the error: "Password data is not valid for scheme SHA256: Input length isn't valid (0 instead of 32)." Can someone kind please explain the issue and how I can correct it? Thanks.
     
    Last edited: Jul 23, 2017

Share This Page