From b7b463a78ae573233a44750a7ec867c4022268e8 Mon Sep 17 00:00:00 2001 From: perry Date: Sat, 13 May 2000 14:50:45 +0000 Subject: [PATCH] import 19991231-pl07 --- gnu/dist/postfix/HISTORY | 43 ++++++++++++++++++++++ gnu/dist/postfix/INSTALL.sh | 1 + gnu/dist/postfix/RELEASE_NOTES | 8 ++++ gnu/dist/postfix/cleanup/cleanup.c | 7 +++- gnu/dist/postfix/cleanup/cleanup_message.c | 9 +++++ gnu/dist/postfix/global/mail_copy.c | 10 +++-- gnu/dist/postfix/global/mail_params.h | 7 ++++ gnu/dist/postfix/global/mail_version.h | 2 +- gnu/dist/postfix/html/cleanup.8.html | 22 +++++------ gnu/dist/postfix/man/man8/cleanup.8 | 5 ++- gnu/dist/postfix/smtpd/smtpd.c | 17 +++------ gnu/dist/postfix/smtpd/smtpd_chat.c | 13 ++++++- gnu/dist/postfix/trivial-rewrite/resolve.c | 8 ++-- gnu/dist/postfix/util/dict_mysql.c | 40 ++++++++++++-------- gnu/dist/postfix/util/valid_hostname.c | 8 +++- gnu/dist/postfix/util/valid_hostname.in | 10 +++++ gnu/dist/postfix/util/valid_hostname.ref | 29 +++++++++++++++ 17 files changed, 188 insertions(+), 51 deletions(-) diff --git a/gnu/dist/postfix/HISTORY b/gnu/dist/postfix/HISTORY index e9dc85f83d1e..9c58863eca17 100644 --- a/gnu/dist/postfix/HISTORY +++ b/gnu/dist/postfix/HISTORY @@ -3670,3 +3670,46 @@ Apologies for any names omitted. be issued in an SMTP session (ex.: NOOP, VRFY, ETRN, RSET). Problem report by Michael Ju. Tokarev @ tls.msk.ru. Files: global/mail_params.h, smtpd/smtpd.c. + +20000413 + + Bugfix: RFC 822 requires the presence of at least one + destination message header. The cleanup daemon now generates + a generic "To: undisclosed-recipients:;" message header + when no destination header is present. The header content + is specified with the undisclosed_recipients_header parameter. + Problem pointed out by Geoff Gibbs, UK-Human Genome Mapping + Project-Resource Centre. + +20000416 + + Workaround: allow <(comment)> as SMTP MAIL FROM address. + +20000423 + + Bugfix: mail_copy() could prepend > or . in the middle of + long lines. Found by code inspection. + +20000505 + + Bugfix: the SMTP server now flushes unwritten output before + tarpit delays, to avoid protocol timeouts in pipelined + sessions when a client causes lots of errors. Found by + Lamont Jones, HP. File: smtpd/smtpd_chat.c. + +20000510 + + Bugfix: configuration parameters for one mysql dictionary + would become default settings for the next one. File: + dict_mysql.c. This patch was merged into Postfix a while + back but apparently that Postfix version was nuked when + other parts were redesigned. Update by Scott Cotton. + + Bugfix: some Postfix delivery agents would abort on addresses + of the form `stuff@.' which could be generated only locally. + Found by Patrik Rak. File: trivial-rewrite/resolve.c. + +20000511 + + Bugfix: Postfix would incorrectly reject domain names with + adjacent - characters. File: util/valid_hostname.c. diff --git a/gnu/dist/postfix/INSTALL.sh b/gnu/dist/postfix/INSTALL.sh index c2611a4845bf..65b3876a23e8 100644 --- a/gnu/dist/postfix/INSTALL.sh +++ b/gnu/dist/postfix/INSTALL.sh @@ -332,6 +332,7 @@ no) ;; for file in man?/* do (test -f $MANPAGES/$file && cmp -s $file $MANPAGES/$file) || { + echo Updating $MANPAGES/$file... rm -f $MANPAGES/$file cp $file $MANPAGES/$file || exit 1 chmod 644 $MANPAGES/$file || exit 1 diff --git a/gnu/dist/postfix/RELEASE_NOTES b/gnu/dist/postfix/RELEASE_NOTES index d7f1790d49ff..cd45aea21f79 100644 --- a/gnu/dist/postfix/RELEASE_NOTES +++ b/gnu/dist/postfix/RELEASE_NOTES @@ -1,3 +1,11 @@ +Incompatible changes with postfix-19991231-pl07: +================================================ + +As required by RFC 822, Postfix now inserts a generic destination +message header when no destination header is present. The text is +specified via the undisclosed_recipients_header configuration +parameter (default: "To: undisclosed-recipients:;"). + Incompatible changes with postfix-19991231-pl06: ================================================ diff --git a/gnu/dist/postfix/cleanup/cleanup.c b/gnu/dist/postfix/cleanup/cleanup.c index 95e6e30f5033..a47e7d916cd6 100644 --- a/gnu/dist/postfix/cleanup/cleanup.c +++ b/gnu/dist/postfix/cleanup/cleanup.c @@ -13,7 +13,7 @@ /* The \fBcleanup\fR daemon always performs the following transformations: /* .IP \(bu /* Insert missing message headers: (\fBResent-\fR) \fBFrom:\fR, -/* \fBMessage-Id:\fR, and \fBDate:\fR. +/* \fBTo:\fR, \fBMessage-Id:\fR, and \fBDate:\fR. /* .IP \(bu /* Extract envelope recipient addresses from (\fBResent-\fR) \fBTo:\fR, /* \fBCc:\fR and \fBBcc:\fR message headers when no recipients are @@ -67,6 +67,9 @@ /* Address to send a copy of each message that enters the system. /* .IP \fBhopcount_limit\fR /* Limit the number of \fBReceived:\fR message headers. +/* .IP \fBrecipients_witheld_header\fR +/* The header line that is inserted when no recipients were +/* specified in (Resent-)To: or (Resent-)Cc: message headers. /* .SH "Address transformations" /* .ad /* .fi @@ -177,6 +180,7 @@ char *var_empty_addr; /* destination of bounced bounces */ int var_delay_warn_time; /* delay that triggers warning */ char *var_prop_extension; /* propagate unmatched extension */ char *var_always_bcc; +char *var_rcpt_witheld; /* recipients not disclosed */ /* * Mappings. @@ -471,6 +475,7 @@ int main(int argc, char **argv) VAR_HEADER_CHECKS, DEF_HEADER_CHECKS, &var_header_checks, 0, 0, VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0, VAR_ALWAYS_BCC, DEF_ALWAYS_BCC, &var_always_bcc, 0, 0, + VAR_RCPT_WITHELD, DEF_RCPT_WITHELD, &var_rcpt_witheld, 1, 0, 0, }; diff --git a/gnu/dist/postfix/cleanup/cleanup_message.c b/gnu/dist/postfix/cleanup/cleanup_message.c index 2f3972e487f3..324f961fe210 100644 --- a/gnu/dist/postfix/cleanup/cleanup_message.c +++ b/gnu/dist/postfix/cleanup/cleanup_message.c @@ -350,6 +350,15 @@ static void cleanup_missing_headers(void) cleanup_resent, vstring_str(cleanup_temp1)); } } + + /* + * Add a missing destination header. + */ +#define VISIBLE_RCPT ((1 << HDR_TO) | (1 << HDR_RESENT_TO) | \ + (1 << HDR_CC) | (1 << HDR_RESENT_CC)) + + if ((cleanup_headers_seen & VISIBLE_RCPT) == 0) + cleanup_out_format(REC_TYPE_NORM, "%s", var_rcpt_witheld); } /* cleanup_message - process message content segment */ diff --git a/gnu/dist/postfix/global/mail_copy.c b/gnu/dist/postfix/global/mail_copy.c index e91bf8bf5f97..6182512ed2e2 100644 --- a/gnu/dist/postfix/global/mail_copy.c +++ b/gnu/dist/postfix/global/mail_copy.c @@ -166,10 +166,12 @@ int mail_copy(const char *sender, const char *delivered, if (type != REC_TYPE_NORM && type != REC_TYPE_CONT) break; bp = vstring_str(buf); - if ((flags & MAIL_COPY_QUOTE) && *bp == 'F' && !strncmp(bp, "From ", 5)) - VSTREAM_PUTC('>', dst); - if ((flags & MAIL_COPY_DOT) && *bp == '.') - VSTREAM_PUTC('.', dst); + if (prev_type == REC_TYPE_NORM) { + if ((flags & MAIL_COPY_QUOTE) && *bp == 'F' && !strncmp(bp, "From ", 5)) + VSTREAM_PUTC('>', dst); + if ((flags & MAIL_COPY_DOT) && *bp == '.') + VSTREAM_PUTC('.', dst); + } if (VSTRING_LEN(buf) && VSTREAM_FWRITE_BUF(dst, buf) != VSTRING_LEN(buf)) break; if (type == REC_TYPE_NORM && VSTREAM_PUTC('\n', dst) == VSTREAM_EOF) diff --git a/gnu/dist/postfix/global/mail_params.h b/gnu/dist/postfix/global/mail_params.h index bd45d980319d..382c9b9ad6a8 100644 --- a/gnu/dist/postfix/global/mail_params.h +++ b/gnu/dist/postfix/global/mail_params.h @@ -214,6 +214,13 @@ extern char *var_db_type; #define DEF_ALWAYS_BCC "" extern char *var_always_bcc; + /* + * What to put in the To: header when no recipients were disclosed. + */ +#define VAR_RCPT_WITHELD "undisclosed_recipients_header" +#define DEF_RCPT_WITHELD "To: undisclosed-recipients:;" +extern char *var_rcpt_witheld; + /* * Standards violation: allow/permit RFC 822-style addresses in SMTP * commands. diff --git a/gnu/dist/postfix/global/mail_version.h b/gnu/dist/postfix/global/mail_version.h index 14aa235e2b68..42436105c567 100644 --- a/gnu/dist/postfix/global/mail_version.h +++ b/gnu/dist/postfix/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Postfix-19991231-pl06" +#define DEF_MAIL_VERSION "Postfix-19991231-pl07" extern char *var_mail_version; /* LICENSE diff --git a/gnu/dist/postfix/html/cleanup.8.html b/gnu/dist/postfix/html/cleanup.8.html index fc5d44d41799..022d979edc72 100644 --- a/gnu/dist/postfix/html/cleanup.8.html +++ b/gnu/dist/postfix/html/cleanup.8.html @@ -20,7 +20,7 @@ CLEANUP(8) CLEANUP(8) mations: o Insert missing message headers: (Resent-) From:, - Message-Id:, and Date:. + To:, Message-Id:, and Date:. o Extract envelope recipient addresses from (Resent-) To:, Cc: and Bcc: message headers when no recipi- @@ -92,6 +92,11 @@ CLEANUP(8) CLEANUP(8) hopcount_limit Limit the number of Received: message headers. + recipients_witheld_header + The header line that is inserted when no recipients + were specified in (Resent-)To: or (Resent-)Cc: mes- + sage headers. + Address transformations empty_address_recipient The destination for undeliverable mail from <>. @@ -120,11 +125,6 @@ CLEANUP(8) CLEANUP(8) virtual_maps Address mapping lookup table for envelope recipient - addresses. - -Resource controls - duplicate_filter_limit - Limit the number of envelope recipients that are @@ -137,6 +137,11 @@ CLEANUP(8) CLEANUP(8) CLEANUP(8) CLEANUP(8) + addresses. + +Resource controls + duplicate_filter_limit + Limit the number of envelope recipients that are remembered. header_size_limit @@ -183,11 +188,6 @@ CLEANUP(8) CLEANUP(8) - - - - - diff --git a/gnu/dist/postfix/man/man8/cleanup.8 b/gnu/dist/postfix/man/man8/cleanup.8 index b73d333290e0..d8591b088ab3 100644 --- a/gnu/dist/postfix/man/man8/cleanup.8 +++ b/gnu/dist/postfix/man/man8/cleanup.8 @@ -19,7 +19,7 @@ manager of its arrival. The \fBcleanup\fR daemon always performs the following transformations: .IP \(bu Insert missing message headers: (\fBResent-\fR) \fBFrom:\fR, -\fBMessage-Id:\fR, and \fBDate:\fR. +\fBTo:\fR, \fBMessage-Id:\fR, and \fBDate:\fR. .IP \(bu Extract envelope recipient addresses from (\fBResent-\fR) \fBTo:\fR, \fBCc:\fR and \fBBcc:\fR message headers when no recipients are @@ -81,6 +81,9 @@ a configuration change. Address to send a copy of each message that enters the system. .IP \fBhopcount_limit\fR Limit the number of \fBReceived:\fR message headers. +.IP \fBrecipients_witheld_header\fR +The header line that is inserted when no recipients were +specified in (Resent-)To: or (Resent-)Cc: message headers. .SH "Address transformations" .ad .fi diff --git a/gnu/dist/postfix/smtpd/smtpd.c b/gnu/dist/postfix/smtpd/smtpd.c index 1d75b6bde1f7..e23bed1887f3 100644 --- a/gnu/dist/postfix/smtpd/smtpd.c +++ b/gnu/dist/postfix/smtpd/smtpd.c @@ -479,15 +479,6 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg, #define PERMIT_EMPTY_ADDR 1 #define REJECT_EMPTY_ADDR 0 - if (allow_empty_addr && strcmp(STR(arg->vstrval), "<>") == 0) { - if (msg_verbose) - msg_info("%s: empty address", myname); - VSTRING_RESET(arg->vstrval); - VSTRING_TERMINATE(arg->vstrval); - arg->strval = STR(arg->vstrval); - return (0); - } - /* * Some mailers send RFC822-style address forms (with comments and such) * in SMTP envelopes. We cannot blame users for this: the blame is with @@ -519,9 +510,11 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg, } /* - * Report trouble. Log a warning only if we are going to sleep+reject. + * Report trouble. Log a warning only if we are going to sleep+reject so + * that attackers can't flood our logfiles. */ - if (naddr != 1 + if ((naddr < 1 && !allow_empty_addr) + || naddr > 1 || (strict_rfc821 && (non_addr || *STR(arg->vstrval) != '<'))) { msg_warn("Illegal address syntax from %s in %s command: %s", state->namaddr, state->where, STR(arg->vstrval)); @@ -537,7 +530,7 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg, if (addr) tok822_internalize(arg->vstrval, addr->head, TOK822_STR_DEFL); else - vstring_strcat(arg->vstrval, ""); + vstring_strcpy(arg->vstrval, ""); arg->strval = STR(arg->vstrval); /* diff --git a/gnu/dist/postfix/smtpd/smtpd_chat.c b/gnu/dist/postfix/smtpd/smtpd_chat.c index 95d9d9b11670..8f267eb4c933 100644 --- a/gnu/dist/postfix/smtpd/smtpd_chat.c +++ b/gnu/dist/postfix/smtpd/smtpd_chat.c @@ -133,6 +133,7 @@ void smtpd_chat_query(SMTPD_STATE *state) void smtpd_chat_reply(SMTPD_STATE *state, char *format,...) { va_list ap; + int slept = 0; va_start(ap, format); vstring_vsprintf(state->buffer, format, ap); @@ -149,11 +150,19 @@ void smtpd_chat_reply(SMTPD_STATE *state, char *format,...) * errors within a session. */ if (state->error_count > var_smtpd_soft_erlim) - sleep(state->error_count); + sleep(slept = state->error_count); else if (STR(state->buffer)[0] == '4' || STR(state->buffer)[0] == '5') - sleep(var_smtpd_err_sleep); + sleep(slept = var_smtpd_err_sleep); smtp_fputs(STR(state->buffer), LEN(state->buffer), state->client); + + /* + * Flush unsent output AFTER writing instead of before sleeping (so that + * vstream_fflush() flushes the output half of a bidirectional stream). + * Pipelined error responses could result in client-side timeouts. + */ + if (slept) + (vstream_fflush(state->client)); } /* print_line - line_wrap callback */ diff --git a/gnu/dist/postfix/trivial-rewrite/resolve.c b/gnu/dist/postfix/trivial-rewrite/resolve.c index eb45b6d13f3f..bc1fa58fbcc7 100644 --- a/gnu/dist/postfix/trivial-rewrite/resolve.c +++ b/gnu/dist/postfix/trivial-rewrite/resolve.c @@ -27,7 +27,7 @@ /* /* resolve_proto() implements the client-server protocol: /* read one address in FQDN form, reply with a (transport, -/* nexthop, internalized recipient) triple. +/* nexthop, internalized recipient) triple. /* /* resolve_addr() gives direct access to the address resolving /* engine. It resolves an internalized address to a (transport, @@ -110,10 +110,12 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, while (tree->head) { /* - * Strip trailing dot. + * Strip trailing dot or @. */ - if (tree->tail->type == '.') + if (tree->tail->type == '.' || tree->tail->type == '@') { tok822_free_tree(tok822_sub_keep_before(tree, tree->tail)); + continue; + } /* * A lone empty string becomes the postmaster. diff --git a/gnu/dist/postfix/util/dict_mysql.c b/gnu/dist/postfix/util/dict_mysql.c index 86c35ade9ea4..6d5fe32a1644 100644 --- a/gnu/dist/postfix/util/dict_mysql.c +++ b/gnu/dist/postfix/util/dict_mysql.c @@ -201,9 +201,9 @@ static const char *dict_mysql_lookup(DICT *dict, const char *name) /* * plmysql_query - process a MySQL query. Return MYSQL_RES* on success. - * On failure, log failure and try other db instances. - * on failure of all db instances, return 0; - * close unnecessary active connections + * On failure, log failure and try other db instances. + * on failure of all db instances, return 0; + * close unnecessary active connections */ static MYSQL_RES *plmysql_query(PLMYSQL *PLDB, @@ -361,20 +361,29 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) int i; char *nameval; char *hosts; - /* the name of the dict for processing the mysql options file */ MYSQL_NAME *name = (MYSQL_NAME *) mymalloc(sizeof(MYSQL_NAME)); ARGV *hosts_argv; - - dict_load_file(mysqlcf_path, mysqlcf_path); + VSTRING *opt_dict_name; + + /* + * setup a dict containing info in the mysql cf file. the dict has a + * name, and a path. The name must be distinct from the path, or the + * dict interface gets confused. The name must be distinct for two + * different paths, or the configuration info will cache across different + * mysql maps, which can be confusing. + */ + opt_dict_name = vstring_alloc(64); + vstring_sprintf(opt_dict_name, "mysql opt dict %s", mysqlcf_path); + dict_load_file(vstring_str(opt_dict_name), mysqlcf_path); /* mysql username lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "user")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "user")) == NULL) name->username = mystrdup(""); else name->username = mystrdup(nameval); if (msg_verbose) msg_info("mysqlname_parse(): set username to '%s'", name->username); /* password lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "password")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "password")) == NULL) name->password = mystrdup(""); else name->password = mystrdup(nameval); @@ -382,7 +391,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set password to '%s'", name->password); /* database name lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "dbname")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "dbname")) == NULL) msg_fatal("%s: mysql options file does not include database name", mysqlcf_path); else name->dbname = mystrdup(nameval); @@ -390,7 +399,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set database name to '%s'", name->dbname); /* table lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "table")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "table")) == NULL) msg_fatal("%s: mysql options file does not include table name", mysqlcf_path); else name->table = mystrdup(nameval); @@ -398,7 +407,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set table name to '%s'", name->table); /* select field lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "select_field")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "select_field")) == NULL) msg_fatal("%s: mysql options file does not include select field", mysqlcf_path); else name->select_field = mystrdup(nameval); @@ -406,7 +415,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set select_field to '%s'", name->select_field); /* where field lookup */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "where_field")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "where_field")) == NULL) msg_fatal("%s: mysql options file does not include where field", mysqlcf_path); else name->where_field = mystrdup(nameval); @@ -414,7 +423,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set where_field to '%s'", name->where_field); /* additional conditions */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "additional_conditions")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "additional_conditions")) == NULL) name->additional_conditions = mystrdup(""); else name->additional_conditions = mystrdup(nameval); @@ -422,7 +431,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) msg_info("mysqlname_parse(): set additional_conditions to '%s'", name->additional_conditions); /* mysql server hosts */ - if ((nameval = (char *) dict_lookup(mysqlcf_path, "hosts")) == NULL) + if ((nameval = (char *) dict_lookup(vstring_str(opt_dict_name), "hosts")) == NULL) hosts = mystrdup(""); else hosts = mystrdup(nameval); @@ -448,6 +457,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) } } myfree(hosts); + vstring_free(opt_dict_name); argv_free(hosts_argv); return name; } @@ -455,7 +465,7 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) /* * plmysql_init - initalize a MYSQL database. - * Return NULL on failure, or a PLMYSQL * on success. + * Return NULL on failure, or a PLMYSQL * on success. */ static PLMYSQL *plmysql_init(char *hostnames[], int len_hosts) diff --git a/gnu/dist/postfix/util/valid_hostname.c b/gnu/dist/postfix/util/valid_hostname.c index 7fff779c3788..9f75963eba47 100644 --- a/gnu/dist/postfix/util/valid_hostname.c +++ b/gnu/dist/postfix/util/valid_hostname.c @@ -81,12 +81,18 @@ int valid_hostname(const char *name) } if (!ISDIGIT(ch)) non_numeric = 1; - } else if (ch == '.' || ch == '-') { + } else if (ch == '.') { if (label_length == 0 || cp[1] == 0) { msg_warn("%s: misplaced delimiter: %.100s", myname, name); return (0); } label_length = 0; + } else if (ch == '-') { + label_length++; + if (label_length == 1 || cp[1] == 0 || cp[1] == '.') { + msg_warn("%s: misplaced hyphen: %.100s", myname, name); + return (0); + } } else { msg_warn("%s: invalid character %d(decimal): %.100s", myname, ch, name); diff --git a/gnu/dist/postfix/util/valid_hostname.in b/gnu/dist/postfix/util/valid_hostname.in index 78a6f2419dc6..9d48f5db0e9c 100644 --- a/gnu/dist/postfix/util/valid_hostname.in +++ b/gnu/dist/postfix/util/valid_hostname.in @@ -26,3 +26,13 @@ f1.2.3.4 1.2.3.4f 1.2.3.f4 1.2.3.f +-.a.b +a.-.b +a.b.- +-aa.b.b +aa-.b.b +a.-bb.b +a.bb-.b +a.b.-bb +a.b.bb- +a-a.b-b diff --git a/gnu/dist/postfix/util/valid_hostname.ref b/gnu/dist/postfix/util/valid_hostname.ref index 44be99fe43dd..28e2e737c5d1 100644 --- a/gnu/dist/postfix/util/valid_hostname.ref +++ b/gnu/dist/postfix/util/valid_hostname.ref @@ -70,3 +70,32 @@ ./valid_hostname: warning: valid_hostaddr: invalid character 102(decimal): 1.2.3.f4 ./valid_hostname: testing: "1.2.3.f" ./valid_hostname: warning: valid_hostaddr: invalid character 102(decimal): 1.2.3.f +./valid_hostname: testing: "-.a.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: -.a.b +./valid_hostname: warning: valid_hostaddr: invalid character 45(decimal): -.a.b +./valid_hostname: testing: "a.-.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.-.b +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.-.b +./valid_hostname: testing: "a.b.-" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.b.- +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.b.- +./valid_hostname: testing: "-aa.b.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: -aa.b.b +./valid_hostname: warning: valid_hostaddr: invalid character 45(decimal): -aa.b.b +./valid_hostname: testing: "aa-.b.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: aa-.b.b +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): aa-.b.b +./valid_hostname: testing: "a.-bb.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.-bb.b +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.-bb.b +./valid_hostname: testing: "a.bb-.b" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.bb-.b +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.bb-.b +./valid_hostname: testing: "a.b.-bb" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.b.-bb +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.b.-bb +./valid_hostname: testing: "a.b.bb-" +./valid_hostname: warning: valid_hostname: misplaced hyphen: a.b.bb- +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a.b.bb- +./valid_hostname: testing: "a-a.b-b" +./valid_hostname: warning: valid_hostaddr: invalid character 97(decimal): a-a.b-b