postfix 1.1.12

This commit is contained in:
itojun 2002-11-26 03:29:46 +00:00
parent cc461b0d7b
commit fd0368cb1f
7 changed files with 27 additions and 3 deletions

View File

@ -6331,6 +6331,15 @@ Apologies for any names omitted.
MAIL_CONFIG environment setting to the postdrop command.
File: global/mail_config.h.
20021121
Bugfix: garbage in "user@garbage"@domain address forms may
cause the SMTP or LMTP client to terminate with a fatal
error exit because garbage/tcp is not an existing service.
This cannot be abused to cause the SMTP or LMTP client to
send data into unauthorized ports. Files: *qmgr/qmgr_message.c,
trivial-rewrite/resolve.c.
Open problems:
Low: sendmail does not store null command-line recipients.

View File

@ -21,14 +21,14 @@
* release date only, unless they include the same bugfix as a patch release.
*/
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11"
#define DEF_MAIL_VERSION "1.1.12"
extern char *var_mail_version;
/*
* Release date.
*/
#define VAR_MAIL_RELEASE "mail_release_date"
#define DEF_MAIL_RELEASE "20020528"
#define DEF_MAIL_RELEASE "20021122"
extern char *var_mail_release;
/* LICENSE

View File

@ -48,6 +48,8 @@
/* After address resolution the recipient localpart contains further
/* routing information, so the resolved next-hop destination is not
/* the final destination.
/* .IP RESOLVE_FLAG_ERROR
/* The address resolved to something that has invalid syntax.
/* DIAGNOSTICS
/* Warnings: communication failure. Fatal error: mail system is down.
/* SEE ALSO

View File

@ -23,6 +23,7 @@
#define RESOLVE_FLAG_FINAL (1<<0) /* final delivery */
#define RESOLVE_FLAG_ROUTED (1<<1) /* routed destination */
#define RESOLVE_FLAG_ERROR (1<<2) /* bad destination */
typedef struct RESOLVE_REPLY {
VSTRING *transport;

View File

@ -618,6 +618,12 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* result address may differ from the one specified by the sender.
*/
resolve_clnt_query(recipient->address, &reply);
if (reply.flags & RESOLVE_FLAG_ERROR) {
qmgr_bounce_recipient(message, recipient,
"bad address syntax: \"%s\"",
recipient->address);
continue;
}
if (message->filter_xport) {
vstring_strcpy(reply.transport, message->filter_xport);
if ((nexthop = split_at(STR(reply.transport), ':')) == 0

View File

@ -67,6 +67,7 @@ resolve.o: ../../include/vbuf.h
resolve.o: ../../include/vstream.h
resolve.o: ../../include/vstring_vstream.h
resolve.o: ../../include/split_at.h
resolve.o: ../../include/valid_hostname.h
resolve.o: ../../include/mail_params.h
resolve.o: ../../include/mail_proto.h
resolve.o: ../../include/iostuff.h

View File

@ -61,6 +61,7 @@
#include <vstream.h>
#include <vstring_vstream.h>
#include <split_at.h>
#include <valid_hostname.h>
/* Global library. */
@ -219,8 +220,12 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop,
vstring_strcpy(nexthop, destination);
else if (*var_relayhost)
vstring_strcpy(nexthop, var_relayhost);
else
else {
tok822_internalize(nexthop, domain->next, TOK822_STR_DEFL);
if (STR(nexthop)[strspn(STR(nexthop), "[]0123456789.")] != 0
&& valid_hostname(STR(nexthop), DONT_GRIPE) == 0)
*flags |= RESOLVE_FLAG_ERROR;
}
if (*STR(channel) == 0)
msg_fatal("null transport is not allowed: %s = %s",
VAR_DEF_TRANSPORT, var_def_transport);