author | Alberto Bertogli
<albertito@blitiri.com.ar> 2016-10-01 19:03:44 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2016-10-09 23:51:04 UTC |
parent | f767b83fe0202bce41b0ddd6d9f429f5ff864f39 |
chasquid.go | +1 | -0 |
test/t-07-smtputf8/config/chasquid.conf | +8 | -0 |
test/t-07-smtputf8/content | +6 | -0 |
test/t-07-smtputf8/hosts | +1 | -0 |
test/t-07-smtputf8/run.sh | +26 | -0 |
diff --git a/chasquid.go b/chasquid.go index 9f6d447..76de975 100644 --- a/chasquid.go +++ b/chasquid.go @@ -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") diff --git a/test/t-07-smtputf8/config/chasquid.conf b/test/t-07-smtputf8/config/chasquid.conf new file mode 100644 index 0000000..a805eae --- /dev/null +++ b/test/t-07-smtputf8/config/chasquid.conf @@ -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" diff --git a/test/t-07-smtputf8/content b/test/t-07-smtputf8/content new file mode 100644 index 0000000..8fbedb8 --- /dev/null +++ b/test/t-07-smtputf8/content @@ -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 diff --git a/test/t-07-smtputf8/hosts b/test/t-07-smtputf8/hosts new file mode 100644 index 0000000..d276cfd --- /dev/null +++ b/test/t-07-smtputf8/hosts @@ -0,0 +1 @@ +ñoños localhost diff --git a/test/t-07-smtputf8/run.sh b/test/t-07-smtputf8/run.sh new file mode 100755 index 0000000..9c2a650 --- /dev/null +++ b/test/t-07-smtputf8/run.sh @@ -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