Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAI support for notqmail #197

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated qmail-remote code for EAI
  • Loading branch information
mbhangui committed Jan 25, 2021
commit 6b6f5fe65910a1d7e4dd45ef252a3b9548249aa0
5 changes: 5 additions & 0 deletions qmail-remote.8
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ Number of seconds
.B qmail-remote
will wait for each response from the remote SMTP server.
Default: 1200.
.TP 5
.I smtputf8
Non-zero value in this control file enables
.B qmail-remote
to check if remote SMTP supports RFC6531 SMTP Extension for Internationalized Email.
.SH "SEE ALSO"
addresses(5),
envelopes(5),
Expand Down
14 changes: 8 additions & 6 deletions qmail-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static stralloc idnhost = { 0 };
static int smtputf8 = 0; /*- if remote has SMTPUTF8 capability */
/* set by control file control/smtputf8. zero if SMTPUTF8 not #defined */
static int enable_smtputf8;
int flagutf8; /*- if sender, recipient headers, body have utf8 */
int flagutf8; /*- if sender, recipient, received headers have utf8 */

void out(s) char *s; { if (substdio_puts(subfdoutsmall,s) == -1) _exit(0); }
void zero() { if (substdio_put(subfdoutsmall,"\0",1) == -1) _exit(0); }
Expand Down Expand Up @@ -296,11 +296,13 @@ void smtp()
if (code >= 500) quit("DConnected to "," but my name was rejected");
if (code != 250) quit("ZConnected to "," but my name was rejected");
} else /* EHLO succeeded. Let's check SMTPUTF8 capa */
smtputf8 = get_capability("SMTPUTF8"); /*- did the remote server advertize SMTPUTF8 */
if (!flagutf8)
flagutf8 = utf8read();
if (enable_smtputf8 && flagutf8 && !smtputf8)
quit("DConnected to "," but server does not support internationalized email addresses");
if (enable_smtputf8) {
smtputf8 = get_capability("SMTPUTF8"); /*- did the remote server advertize SMTPUTF8 */
if (!flagutf8)
flagutf8 = utf8read();
if (flagutf8 && !smtputf8)
quit("DConnected to "," but server does not support internationalized email addresses");
}
#else
substdio_puts(&smtpto,"HELO ");
substdio_put(&smtpto,helohost.s,helohost.len);
Expand Down