1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

chasquid: Introduce support for SMTPUTF8

This patch adds initial support for SMTPUTF8, which for now consists of just
advertising it.

We support most of it, but sending emails over SMTP requires further work, as
the SMTP courier does not support this yet (it's not in Go's standard
library). That will come in subsequent patches, along with IDNA handling.

https://tools.ietf.org/html/rfc6531.html
This commit is contained in:
Alberto Bertogli
2016-10-01 20:03:44 +01:00
parent f767b83fe0
commit 6dda2fff4b
5 changed files with 42 additions and 0 deletions

View File

@@ -534,6 +534,7 @@ func (c *Conn) EHLO(params string) (code int, msg string) {
fmt.Fprintf(buf, c.hostname+" - Your hour of destiny has come.\n")
fmt.Fprintf(buf, "8BITMIME\n")
fmt.Fprintf(buf, "PIPELINING\n")
fmt.Fprintf(buf, "SMTPUTF8\n")
fmt.Fprintf(buf, "SIZE %d\n", c.maxDataSize)
if c.onTLS {
fmt.Fprintf(buf, "AUTH PLAIN\n")

View File

@@ -0,0 +1,8 @@
smtp_address: ":1025"
submission_address: ":1587"
monitoring_address: ":1099"
mail_delivery_agent_bin: "test-mda"
mail_delivery_agent_args: "%to%"
data_dir: "../.data"

View File

@@ -0,0 +1,6 @@
From: ñandú@ñoños
To: ñangapirí@ñoños
Subject: Arañando el test
Crece desde el test el futuro
Crece desde el test

1
test/t-07-smtputf8/hosts Normal file
View File

@@ -0,0 +1 @@
ñoños localhost

26
test/t-07-smtputf8/run.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
. $(dirname ${0})/../util/lib.sh
init
skip_if_python_is_too_old
generate_certs_for ñoños
add_user ñoños ñangapirí antaño
# Python doesn't support UTF8 for auth, use an ascii user and domain.
add_user nada nada nada
mkdir -p .logs
chasquid -v=2 --log_dir=.logs --config_dir=config &
wait_until_ready 1025
smtpc.py --server=localhost:1025 --user=nada@nada --password=nada \
< content
wait_for_file .mail/ñangapirí@ñoños
mail_diff content .mail/ñangapirí@ñoños
success