mirror of
https://github.com/jhillyerd/inbucket.git
synced 2026-09-13 23:28:53 +00:00
fix: outdated swaks syntax, missing DecodeHeader failure logging (#616)
Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
@@ -28,41 +28,41 @@ export SWAKS_OPT_server="${SWAKS_OPT_server:-127.0.0.1:2500}"
|
|||||||
export SWAKS_OPT_to="$to@inbucket.local"
|
export SWAKS_OPT_to="$to@inbucket.local"
|
||||||
|
|
||||||
# Basic test
|
# Basic test
|
||||||
swaks $* --h-Subject: "Swaks Plain Text" --body text.txt
|
swaks $* --h-Subject: "Swaks Plain Text" --body @text.txt
|
||||||
|
|
||||||
# Multi-recipient test
|
# Multi-recipient test
|
||||||
swaks $* --to="$to@inbucket.local,alternate@inbucket.local" --h-Subject: "Swaks Multi-Recipient" \
|
swaks $* --to="$to@inbucket.local,alternate@inbucket.local" --h-Subject: "Swaks Multi-Recipient" \
|
||||||
--body text.txt
|
--body @text.txt
|
||||||
|
|
||||||
# HTML test
|
# HTML test
|
||||||
swaks $* --h-Subject: "Swaks HTML" --data mime-html.raw
|
swaks $* --h-Subject: "Swaks HTML" --data @mime-html.raw
|
||||||
|
|
||||||
# Top level HTML test
|
# Top level HTML test
|
||||||
swaks $* --h-Subject: "Swaks Top Level HTML" --data nonmime-html.raw
|
swaks $* --h-Subject: "Swaks Top Level HTML" --data @nonmime-html.raw
|
||||||
|
|
||||||
# Attachment test
|
# Attachment test
|
||||||
swaks $* --h-Subject: "Swaks Attachment" --attach-type image/png --attach favicon.png \
|
swaks $* --h-Subject: "Swaks Attachment" --attach-type image/png --attach favicon.png \
|
||||||
--body text.txt
|
--body @text.txt
|
||||||
|
|
||||||
# Encoded subject line test
|
# Encoded subject line test
|
||||||
swaks $* --data utf8-subject.raw
|
swaks $* --data @utf8-subject.raw
|
||||||
|
|
||||||
# Gmail test
|
# Gmail test
|
||||||
swaks $* --data gmail.raw
|
swaks $* --data @gmail.raw
|
||||||
|
|
||||||
# Outlook test
|
# Outlook test
|
||||||
swaks $* --data outlook.raw
|
swaks $* --data @outlook.raw
|
||||||
|
|
||||||
# Non-mime responsive HTML test
|
# Non-mime responsive HTML test
|
||||||
swaks $* --data nonmime-html-responsive.raw
|
swaks $* --data @nonmime-html-responsive.raw
|
||||||
swaks $* --data nonmime-html-inlined.raw
|
swaks $* --data @nonmime-html-inlined.raw
|
||||||
|
|
||||||
# Incorrect charset, malformed final boundary
|
# Incorrect charset, malformed final boundary
|
||||||
swaks $* --data mime-errors.raw
|
swaks $* --data @mime-errors.raw
|
||||||
|
|
||||||
# IP RCPT domain
|
# IP RCPT domain
|
||||||
swaks $* --to="swaks@[127.0.0.1]" --h-Subject: "IPv4 RCPT Address" --body text.txt
|
swaks $* --to="swaks@[127.0.0.1]" --h-Subject: "IPv4 RCPT Address" --body @text.txt
|
||||||
swaks $* --to="swaks@[IPv6:2001:db8:aaaa:1::100]" --h-Subject: "IPv6 RCPT Address" --body text.txt
|
swaks $* --to="swaks@[IPv6:2001:db8:aaaa:1::100]" --h-Subject: "IPv6 RCPT Address" --body @text.txt
|
||||||
|
|
||||||
# Inline attachment test
|
# Inline attachment test
|
||||||
swaks $* --data mime-inline.raw
|
swaks $* --data @mime-inline.raw
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ func (s *StoreManager) Deliver(
|
|||||||
// Parse envelope headers.
|
// Parse envelope headers.
|
||||||
header, err := enmime.DecodeHeaders(source)
|
header, err := enmime.DecodeHeaders(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logger.Error().Err(err).Msg("Failed to parse message headers")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user