John Siu Blog

Tech - Business Tool, Personal Toys

SASL2

☰ Table of Content

Command line and testing.

User

Add

1
saslpasswd2 -c <id>@<domain>

Will prompt for password.

Del

1
saslpasswd2 -d <id>@<domain>

List

1
sasldblistusers2

Testing

SASL Daemon

1
saslauthd -a sasldb -d &

Only bring this up when needed. Postfix does not need it.

Test

1
testsaslauthd -f /run/saslauthd/mux  -u <id> -r <domain> -p <password>

testsaslauthd is different than saslpasswd in the way that it does not email address as a whole. -u only take id and -r(realm) take domain. If you put the whole email address as <id>@<domain> in -u, the test will fail.

Smtp Login Name

The smtp login name is the whole email address, not just the id.

Linux, Docker and SASL

Though most linux distributions have sasl packages but the sasldb2 may not be compatible with each other due to version change. This may happen when running postfix in container with different linux distribution than the host. In such case, the commands will have to be performed within the container.

When deploying across servers, test with saslpasswd2.

John Siu

Update: 2022-08-11
comments powered by Disqus