mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-07 17:47:14 +00:00
chasquid: Fail at RCPT TO time if a user does not exist
It's more convenient and in line with standard practice to fail RCPT TO if the user does not exist. This involves making the server and client aware of aliases, but it doesn't end up being very convoluted, and simplifies other code.
This commit is contained in:
@@ -7,6 +7,7 @@ init
|
||||
|
||||
generate_certs_for testserver
|
||||
add_user testserver user secretpassword
|
||||
add_user testserver someone secretpassword
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
@@ -25,6 +26,11 @@ if ! run_msmtp -a smtpport someone@testserver < content 2> /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if run_msmtp nobody@testserver < content 2> /dev/null; then
|
||||
echo "ERROR: successfuly sent an email to a non-existent user"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if run_msmtp -a baduser someone@testserver < content 2> /dev/null; then
|
||||
echo "ERROR: successfully sent an email with a bad password"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user