1
0
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:
Alberto Bertogli
2016-10-08 12:11:20 +01:00
parent c4e8b22fd0
commit 40153e352f
12 changed files with 132 additions and 10 deletions

View File

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