Files
chasquid/test/t-12-minor_dialogs/bad_data.cmy
Alberto Bertogli 85305f4bd9 smtpsrv: Close the connection after 3 errors (lowering from 10)
Today, we close the connection after 10 errors. While this is fine for
normal use, it is unnecessarily large.

Lowering it to 3 helps with defense-in-depth for cross-protocol attacks
(e.g. https://alpaca-attack.com/), while still being large enough for
useful troubleshooting and normal operation.

As part of this change, we also remove the AUTH-specific failures limit,
because they're covered by the connection limit.
2021-06-11 10:34:20 +01:00

40 lines
606 B
Plaintext

c tcp_connect localhost:1025
c <~ 220
c -> DATA
c <- 503 5.5.1 Invisible customers are not welcome!
c -> HELO localhost
c <~ 250
c -> DATA
c <- 503 5.5.1 Sender not yet given
# Reconnect to avoid getting rejected due to too many errors.
c close
c tcp_connect localhost:1025
c <~ 220
c -> HELO localhost
c <~ 250
c -> MAIL FROM:<a@b>
c <~ 250
c -> RCPT TO: user@testserver
c <~ 250
c -> DATA
c <~ 354
c -> From: Mailer daemon <somewhere@horns.com>
c -> Subject: I've come to haunt you
c -> Bad header
c ->
c -> Muahahahaha
c ->
c ->
c -> .
c <~ 554 5.6.0 Error parsing message
c -> QUIT
c <~ 221