mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-08 17:51:57 +00:00
chasquid: Detect email loops
This patch implements some measures against email loops, such as keeping a limit on the lenght of an address, and rejecting email that has too many Received headers. It's not perfect (a server could be actively removing Received headers), but it should cover the normal accidents and misconfigurations.
This commit is contained in:
@@ -13,13 +13,13 @@ chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
function send_and_check() {
|
||||
run_msmtp $1@testserver < content
|
||||
shift
|
||||
for i in $@; do
|
||||
wait_for_file .mail/$i@testserver
|
||||
mail_diff content .mail/$i@testserver
|
||||
rm -f .mail/$i@testserver
|
||||
done
|
||||
run_msmtp $1@testserver < content
|
||||
shift
|
||||
for i in $@; do
|
||||
wait_for_file .mail/$i@testserver
|
||||
mail_diff content .mail/$i@testserver
|
||||
rm -f .mail/$i@testserver
|
||||
done
|
||||
}
|
||||
|
||||
# Test email aliases.
|
||||
|
||||
Reference in New Issue
Block a user