1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-09 17:55:57 +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:
Alberto Bertogli
2016-09-25 21:46:32 +01:00
parent ce379dea3e
commit 0995eac474
8 changed files with 163 additions and 20 deletions

View File

@@ -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

View File

@@ -39,6 +39,7 @@ EXIMDIR="$PWD/.exim4" envsubst < config/exim4.in > .exim4/config
generate_certs_for srv-chasquid
add_user srv-chasquid user secretpassword
add_user srv-chasquid someone secretpassword
# Launch chasquid at port 1025 (in config).
# Use outgoing port 2025 which is where exim will be at.