On 18.09.2018 19:33, Gilles Chehade wrote:
that's an easy one:

OpenSMTPD uses the crypt() function provided by your system and does not
care about the password scheme used as this is a system-specific detail.

On modern systems the crypt() function encodes the algorithm, rounds and
salt as a prefix to the encrypted password, as shown below:

      $2b$09$fEv/zNZ/5hELpDH3Vq93AuygRLnySIcNXH78rq9WxPPbZJxmcdk5m
      |  |  |                |
      |  |  |                |__ encrypted password
      |  |  |__ begining of salt
      |  |__ beginning of rounds
      |__ beginning of cipher


But this encoding is only valid for my operating system, yours will have
a different one and the only thing you need to care about is if password
was generated using the same crypt() function that will be used validate
it.

I suggest your read the crypt(3) and passwd(1) man pages of your system.

Progress! I got it working with rounds=500000.

There was one issue initially - Dovecot generates passwords with {SHA512-CRYPT} prepended to the string and OpenSMTPD closes the whole smtpd process when it encounters such a password. Removing the {SHA512-CRYPT} string from the hash helped make it all work.

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to