1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

userdb: Add support for receive-only users

Some use cases, like receive-only MTAs, need domain users for receiving
emails, but have no real need for passwords since they will never use
submission.

Today, that is not supported, and those use-cases require the
administrator to come up with a password unnecessarily, adding
complexity and possibly risk.

This patch implements "receive-only users", which don't have a valid
password, thus exist for the purposes of delivering mail, but always
fail authentication.

See https://github.com/albertito/chasquid/issues/44 for more details and
rationale.

Thanks to xavierg who suggested this feature on IRC.
This commit is contained in:
Alberto Bertogli
2023-12-03 00:12:46 +00:00
parent dbff2f0455
commit 83ae4c3478
9 changed files with 213 additions and 47 deletions

View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "chasquid-util 1"
.TH chasquid-util 1 "2023-07-29" "" ""
.TH chasquid-util 1 "2023-12-03" "" ""
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -142,7 +142,7 @@
chasquid\-util \- chasquid management tool
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBchasquid-util\fR [\fIoptions\fR] user-add \fIuser@domain\fR [\-\-password=\fIpassword\fR]
\&\fBchasquid-util\fR [\fIoptions\fR] user-add \fIuser@domain\fR [\-\-password=\fIpassword\fR] [\-\-receive_only]
.PP
\&\fBchasquid-util\fR [\fIoptions\fR] user-remove \fIuser@domain\fR
.PP
@@ -160,9 +160,12 @@ chasquid\-util \- chasquid management tool
chasquid-util is a command-line utility for \fBchasquid\fR\|(1) operations.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fBuser-add\fR \fIuser@domain\fR [\-\-password=\fIpassword\fR]" 8
.IX Item "user-add user@domain [--password=password]"
.IP "\fBuser-add\fR \fIuser@domain\fR [\-\-password=\fIpassword\fR] [\-\-receive_only]" 8
.IX Item "user-add user@domain [--password=password] [--receive_only]"
Add a new user to the domain.
.Sp
If \fI\-\-receive_only\fR is given, then the user will never successfully
authenticate. This is useful when creating receive-only users.
.IP "\fBuser-remove\fR \fIuser@domain\fR" 8
.IX Item "user-remove user@domain"
Remove the user from the domain.

View File

@@ -4,7 +4,7 @@ chasquid-util - chasquid management tool
# SYNOPSIS
**chasquid-util** \[_options_\] user-add _user@domain_ \[--password=_password_\]
**chasquid-util** \[_options_\] user-add _user@domain_ \[--password=_password_\] \[--receive\_only\]
**chasquid-util** \[_options_\] user-remove _user@domain_
@@ -24,10 +24,13 @@ chasquid-util is a command-line utility for [chasquid(1)](chasquid.1.md) operati
# OPTIONS
- **user-add** _user@domain_ \[--password=_password_\]
- **user-add** _user@domain_ \[--password=_password_\] \[--receive\_only\]
Add a new user to the domain.
If _--receive\_only_ is given, then the user will never successfully
authenticate. This is useful when creating receive-only users.
- **user-remove** _user@domain_
Remove the user from the domain.

View File

@@ -5,7 +5,7 @@ chasquid-util - chasquid management tool
=head1 SYNOPSIS
B<chasquid-util> [I<options>] user-add I<user@domain> [--password=I<password>]
B<chasquid-util> [I<options>] user-add I<user@domain> [--password=I<password>] [--receive_only]
B<chasquid-util> [I<options>] user-remove I<user@domain>
@@ -28,10 +28,13 @@ chasquid-util is a command-line utility for chasquid(1) operations.
=over 8
=item B<user-add> I<user@domain> [--password=I<password>]
=item B<user-add> I<user@domain> [--password=I<password>] [--receive_only]
Add a new user to the domain.
If I<--receive_only> is given, then the user will never successfully
authenticate. This is useful when creating receive-only users.
=item B<user-remove> I<user@domain>
Remove the user from the domain.