Hi,

OpenSMTPD supports authenticating users from a credentials table:

    table foobar { gilles = $2a$bleh$zetztzetzetzet... }
    listen on 0.0.0.0 [...] auth <foobar>

On OpenBSD, the password is generated using the `encrypt` utility, which
is available part of the base system.

On other systems, users had no standard way of doing it. We used to tell
users to install the mkpasswd utility but it turns out there are several
and they don't work the same way leading to confusions.

A while ago I opened a ticket that we should introduce "smtpctl encrypt"
to generate these encrypted passwords without the need for a third-party
package.

Sunil Nimmagadda has kindly contributed code to support this, and I have
merged after minor tweaks.

It would be nice if users from Linux and FreeBSD/NetBSD/DFlyBSD could do
a bit of testing because it was only tested on Linux afaik.

$ sudo smtpctl encrypt test
$6$.Cd8w37W6MxcG1hI$zjCH/TMpX3svg/ATBJ7.ONnmUa/OCKSUsncsBlmw6TsbgIqzRSzU.kNGCjp86C2f6MFh/Ce/kGdS960G7lYWv/
$ sudo smtpctl encrypt
test
$6$VclrNCnSVKrN/Kb2$q6BP8zQi4OiVNV./Bmdt/Omo2Nz8zIFCYzll0Rx2sM7wYENfkRSHGj4PSdNa8u53bwzHllX5aCRuNuaOeY4mI0
test
$6$6oI2ItZEYbG7HUTv$TZ2tsD/.bxnC3W2vXeS08.Dm.IdhTYFu3AtcickAV65PPlVxOuCPtSXDyJXjLvr1p4FD2e/0KWcvo6bL7j3oQ1
test
$6$AiokSQGaWt3ycwIl$WBzz1tmefJNVHPaFxrzX0BbwQW9wEQsNrKzOxu5n2FQ.TyXHJS7qQw5L5aFu.z7zRIYs.J60RrDCOigz5.Ki.0
^D
$

Code was push in Github, it'll be part of the next snapshot sometime
this week.


-- 
Gilles Chehade

https://www.poolp.org                                          @poolpOrg

-- 
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to