Running into issues with the extra semicolons in OpenSMTPD's Received
header. I see that these semicolons are now removed in -portable[1]. Any
reason not to get rid of them in base, too?

[1]: https://github.com/OpenSMTPD/OpenSMTPD/pull/520

Index: usr.sbin/smtpd/smtp_session.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v
retrieving revision 1.221
diff -u -p -u -r1.221 smtp_session.c
--- usr.sbin/smtpd/smtp_session.c       17 Dec 2014 15:49:23 -0000      1.221
+++ usr.sbin/smtpd/smtp_session.c       5 Apr 2015 00:11:06 -0000
@@ -654,12 +654,12 @@ smtp_session_imsg(struct mproc *p, struc
 
                fprintf(s->ofile, "Received: ");
                if (! (s->listener->flags & F_MASK_SOURCE)) {
-                       fprintf(s->ofile, "from %s (%s [%s]);\n\t",
+                       fprintf(s->ofile, "from %s (%s [%s])",
                            s->evp.helo,
                            s->hostname,
                            ss_to_text(&s->ss));
                }
-               fprintf(s->ofile, "by %s (%s) with %sSMTP%s%s id %08x;\n",
+               fprintf(s->ofile, "\n\tby %s (%s) with %sSMTP%s%s id %08x",
                    s->smtpname,
                    SMTPD_NAME,
                    s->flags & SF_EHLO ? "E" : "",
@@ -670,7 +670,7 @@ smtp_session_imsg(struct mproc *p, struc
                if (s->flags & SF_SECURE) {
                        x = SSL_get_peer_certificate(s->io.ssl);
                        fprintf(s->ofile,
-                           "\tTLS version=%s cipher=%s bits=%d verify=%s;\n",
+                           "\n\tTLS version=%s cipher=%s bits=%d verify=%s",
                            SSL_get_cipher_version(s->io.ssl),
                            SSL_get_cipher_name(s->io.ssl),
                            SSL_get_cipher_bits(s->io.ssl, NULL),
@@ -680,12 +680,12 @@ smtp_session_imsg(struct mproc *p, struc
                }
 
                if (s->rcptcount == 1) {
-                       fprintf(s->ofile, "\tfor <%s@%s>;\n",
+                       fprintf(s->ofile, "\n\tfor <%s@%s>",
                            s->evp.rcpt.user,
                            s->evp.rcpt.domain);
                }
 
-               fprintf(s->ofile, "\t%s\n", time_to_text(time(NULL)));
+               fprintf(s->ofile, ";\n\t%s\n", time_to_text(time(NULL)));
 
                smtp_enter_state(s, STATE_BODY);
                smtp_reply(s, "354 Enter mail, end with \".\""

Reply via email to