]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.11-20021028
authorWietse Venema <wietse@porcupine.org>
Mon, 28 Oct 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:22 +0000 (06:28 +0000)
23 files changed:
postfix/HISTORY
postfix/README_FILES/SASL_README
postfix/RELEASE_NOTES
postfix/src/cleanup/cleanup_message.c
postfix/src/cleanup/cleanup_out_recipient.c
postfix/src/global/bounce.c
postfix/src/global/deliver_pass.c
postfix/src/global/deliver_request.c
postfix/src/global/mail_proto.h
postfix/src/global/mail_version.h
postfix/src/global/recipient_list.c
postfix/src/nqmgr/qmgr_deliver.c
postfix/src/nqmgr/qmgr_message.c
postfix/src/nqmgr/qmgr_rcpt_list.c
postfix/src/qmgr/qmgr_deliver.c
postfix/src/qmgr/qmgr_message.c
postfix/src/qmgr/qmgr_rcpt_list.c
postfix/src/qmqpd/Makefile.in
postfix/src/qmqpd/qmqpd.c
postfix/src/qmqpd/qmqpd_state.c
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_state.c

index f70477f9fe9a0c7a2e383d85015de37baa632cac..8d91a5f99b82024a0fe459da74f9207d554cf402 100644 (file)
@@ -7089,6 +7089,9 @@ Apologies for any names omitted.
 
 20020126
 
+       Logging: SMTP UCE reject/warn/hold/discard logging now
+       includes queue ID. This will break some logfile analyzers.
+
        Logging: SMTP UCE reject/warn/hold/discard logging now
        includes the protocol name and, if available, the hostname
        given in the SMTP HELO or EHLO command.
@@ -7097,10 +7100,13 @@ Apologies for any names omitted.
        now includes the protocol name and, if available, the
        hostname given in the SMTP HELO or EHLO command.
 
-Open problems:
+20021028
 
-       Low: smtpd should log queue ID with reject/warn/hold/discard
-       actions.
+       Bugfix: don't reset state after rejected EHLO. Reset state
+       after HELO. Reported by Karthikeyan Bhargavan, upenn.edu.
+       Files: smtpd/smtpd.c.
+
+Open problems:
 
        Low: revise other local delivery agent duplicate filters.
 
index 19e5ae95dc1c54c758a21b189105670519ab3e74..67508d3fc18454282abd4055cecd49fd03837360 100644 (file)
@@ -216,6 +216,7 @@ can use one of the following commands:
     % perl -MMIME::Base64 -e \
        'print encode_base64("username\0username\0password");'
 
+mmencode is part of the metamail software.
 MIME::Base64 is available from www.cpan.org.
 
 Enabling SASL authentication in the Postfix SMTP client
index 1972e4cdcd7e2f1de47a91f8e7e245d91df89c98..624f52c8b704b70cfff58327ae75c70f1efc715b 100644 (file)
@@ -12,17 +12,18 @@ snapshot release).  Patches change the patchlevel and the release
 date. Snapshots change only the release date, unless they include
 the same bugfixes as a patch release.
 
-Incompatible changes with Postfix snapshot 1.1.11-20021026
+Incompatible changes with Postfix snapshot 1.1.11-20021028
 ==========================================================
 
-Logging formats have changed. This may affect logfile processing
-software.
+Logfile formats have changed. This may affect logfile processing
+software. The queue file format is still compatible with Postfix
+version 1.1 (stable release).
 
-- The Postfix SMTP UCE reject etc. logging now includes the queue
-ID, the mail protocol (SMTP or ESMTP), and the hostname that was
-received with the HELO or EHLO command, if available.
+- The Postfix SMTP server UCE reject etc. logging now includes the
+queue ID, the mail protocol (SMTP or ESMTP), and the hostname that
+was received with the HELO or EHLO command, if available.
 
-- The Postfix header/body_checks logging now includes the the mail
+- The Postfix header/body_checks logging now includes the mail
 protocol (SMTP, ESMTP, QMQP) and the hostname that was received
 with the SMTP HELO or EHLO command, if available.
 
@@ -31,13 +32,15 @@ original recipient address (as received before any address rewriting
 or aliasing).  The original recipient address is logged only when
 it differs from the final recipient address.
 
-Major changes with Postfix snapshot 1.1.11-20021026
+Major changes with Postfix snapshot 1.1.11-20021028
 ===================================================
 
-The Postfix status=sent/bounced/deferred logging now shows the
-original recipient address (as received before any address rewriting
-or aliasing).  The original recipient address is logged only when
-it differs from the final recipient address.
+Postfix logs more information, as described in the "incompatibilities"
+section above.
+
+The local(8) and virtual(8) delivery agents now record the original
+recipient address in the X-Original-To: message header. This header
+can also be emitted by the pipe(8) delivery agent.
 
 Major changes with Postfix snapshot 1.1.11-20021024
 ===================================================
index 34ceea2c3228fdc413343101e6274f9811f19dd0..5fff208884a09af2fbf0af329eccfc7507c3f4f8 100644 (file)
@@ -299,7 +299,6 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
 #define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0)
 #define CLEANUP_ACT_KEEP 1
 #define CLEANUP_ACT_DROP 0
-#define STR(x)         vstring_str(x)
 
     if (STREQUAL(value, "REJECT", command_len)) {
        if (state->reason == 0)
index 4491532df9ec853c482f2a318bea865573c00c17..7ec014405afdd7f2192bc8343dfdb13de37cf20f 100644 (file)
@@ -78,8 +78,7 @@ void    cleanup_out_recipient(CLEANUP_STATE *state, const char *orcpt,
        return;
 
     if (cleanup_virtual_maps == 0) {
-       if (strcasecmp(orcpt, recip) != 0)
-           cleanup_out_string(state, REC_TYPE_ORCP, orcpt);
+       cleanup_out_string(state, REC_TYPE_ORCP, orcpt);
        cleanup_out_string(state, REC_TYPE_RCPT, recip);
        state->rcpt_count++;
     } else {
index 11e68d280721a20973fdcfe1a8248980042f2f6c..8aa513966d17fbde48ebc1cc9677d84a4d59984e 100644 (file)
@@ -34,7 +34,7 @@
 /*     const char *encoding;
 /*     const char *sender;
 /*
-/*     int     bounce_one(flags, queue, id, encoding, sender,
+/*     int     bounce_one(flags, queue, id, encoding, sender, orig_rcpt,
 /*                             recipient, relay, entry, format, ...)
 /*     int     flags;
 /*     const char *queue;
index 91ecb467a35b8a4bdc2dc2a30e5c64211d21df3b..df4c8608f1564a0110516794ecb011e62e1ea534 100644 (file)
@@ -108,7 +108,7 @@ static int deliver_pass_send_request(VSTREAM *stream, DELIVER_REQUEST *request,
               ATTR_TYPE_STR, MAIL_ATTR_RRCPT, request->return_receipt,
               ATTR_TYPE_LONG, MAIL_ATTR_TIME, request->arrival_time,
               ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, offs,
-              ATTR_TYPE_STR, MAIL_ATTR_ORCPT, orcpt ? orcpt : "",
+              ATTR_TYPE_STR, MAIL_ATTR_ORCPT, orcpt,
               ATTR_TYPE_STR, MAIL_ATTR_RECIP, addr,
               ATTR_TYPE_NUM, MAIL_ATTR_OFFSET, 0,
               ATTR_TYPE_END);
index b855d13a2e8161a704a125e94ddbc9de1445b32f..08a95f32601ae56b25600665db66f67275472181 100644 (file)
@@ -246,7 +246,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
            return (-1);
        }
        recipient_list_add(&request->rcpt_list, offset,
-                      *vstring_str(orig_addr) ? vstring_str(orig_addr) : 0,
+                          vstring_str(orig_addr),
                           vstring_str(address));
     }
 
index 0cd707aa38172b3eda26a1f2272e126d0ba448b4..9468016ee51a9f9c10641d56c209d7b61ac5c9b8 100644 (file)
 #include <iostuff.h>
 #include <attr.h>
 
+ /*
+  * External protocols.
+  */
+#define MAIL_PROTO_SMTP                "SMTP"
+#define MAIL_PROTO_ESMTP       "ESMTP"
+#define MAIL_PROTO_QMQP                "QMQP"
+
  /*
   * Names of services: these are the names if INET ports, UNIX-domain sockets
   * or FIFOs that a service listens on.
index 9969d2ad45e5854072d8bdc40b03bacf1a965c63..b704e9b342c646fa41bd05bd87d68d7eb12f183c 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only, unless they include the same bugfix as a patch release.
   */
-#define MAIL_RELEASE_DATE      "20021026"
+#define MAIL_RELEASE_DATE      "20021028"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "1.1.11-" MAIL_RELEASE_DATE
index 1153b7c6a118df49f01e154976d4360ff584a5e7..3228c09b94481ba403da8bd926184904aedfe7db 100644 (file)
@@ -100,7 +100,7 @@ void    recipient_list_add(RECIPIENT_LIST *list, long offset,
        list->info = (RECIPIENT *)
            myrealloc((char *) list->info, list->avail * sizeof(RECIPIENT));
     }
-    list->info[list->len].orig_addr = orig_rcpt ? mystrdup(orig_rcpt) : 0;
+    list->info[list->len].orig_addr = mystrdup(orig_rcpt);
     list->info[list->len].address = mystrdup(rcpt);
     list->info[list->len].offset = offset;
     list->len++;
@@ -113,8 +113,7 @@ void    recipient_list_free(RECIPIENT_LIST *list)
     RECIPIENT *rcpt;
 
     for (rcpt = list->info; rcpt < list->info + list->len; rcpt++) {
-       if (rcpt->orig_addr)
-           myfree(rcpt->orig_addr);
+       myfree(rcpt->orig_addr);
        myfree(rcpt->address);
     }
     myfree((char *) list->info);
index 38be3d2b6c5968263c0a3ca85f6cc3d41d8db7b6..759ab9fef8fb2c568424948a115eaa164fd0448c 100644 (file)
@@ -177,8 +177,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     for (recipient = list.info; recipient < list.info + list.len; recipient++)
        attr_print(stream, ATTR_FLAG_MORE,
                   ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, recipient->offset,
-                  ATTR_TYPE_STR, MAIL_ATTR_ORCPT,
-                  recipient->orig_rcpt ? recipient->orig_rcpt : "",
+                  ATTR_TYPE_STR, MAIL_ATTR_ORCPT, recipient->orig_rcpt,
                   ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient->address,
                   ATTR_TYPE_END);
     attr_print(stream, ATTR_FLAG_NONE,
index fae69c51c3feda5bf5ce693c87f776c6236f8f93..a2e5298051c889740aa9c6baf8a1ddc47d8dab1b 100644 (file)
@@ -402,7 +402,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
            if (message->rcpt_list.len < recipient_limit) {
                message->rcpt_unread--;
                qmgr_rcpt_list_add(&message->rcpt_list, curr_offset,
-                                  orig_rcpt, start);
+                                  orig_rcpt ? orig_rcpt : "unknown", start);
                if (orig_rcpt) {
                    myfree(orig_rcpt);
                    orig_rcpt = 0;
index 94287fade4c8003719e7f65c3520d4d740c24f79..9868c9fcab5bc2ed630d088903b189f7b0f33f02 100644 (file)
@@ -80,7 +80,7 @@ void    qmgr_rcpt_list_add(QMGR_RCPT_LIST *list, long offset,
        list->info = (QMGR_RCPT *)
            myrealloc((char *) list->info, list->avail * sizeof(QMGR_RCPT));
     }
-    list->info[list->len].orig_rcpt = (orcpt ? mystrdup(orcpt) : 0);
+    list->info[list->len].orig_rcpt = mystrdup(orcpt);
     list->info[list->len].address = mystrdup(rcpt);
     list->info[list->len].offset = offset;
     list->info[list->len].queue = 0;
@@ -94,8 +94,7 @@ void    qmgr_rcpt_list_free(QMGR_RCPT_LIST *list)
     QMGR_RCPT *rcpt;
 
     for (rcpt = list->info; rcpt < list->info + list->len; rcpt++) {
-       if (rcpt->orig_rcpt)
-           myfree(rcpt->orig_rcpt);
+       myfree(rcpt->orig_rcpt);
        myfree(rcpt->address);
     }
     myfree((char *) list->info);
index 136b3dcb7f1f1aab068b1cae367405735e66c524..1986a074811c77ec13bd3cfd101707ea1100a9be 100644 (file)
@@ -172,8 +172,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     for (recipient = list.info; recipient < list.info + list.len; recipient++)
        attr_print(stream, ATTR_FLAG_MORE,
                   ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, recipient->offset,
-                  ATTR_TYPE_STR, MAIL_ATTR_ORCPT,
-                  recipient->orig_rcpt ? recipient->orig_rcpt : "",
+                  ATTR_TYPE_STR, MAIL_ATTR_ORCPT, recipient->orig_rcpt,
                   ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient->address,
                   ATTR_TYPE_END);
     attr_print(stream, ATTR_FLAG_NONE,
index 91f70482f3f81edd66838cc8957425fcd0454ab4..6952a93c7747702681ea16d6ba142a69afa04359 100644 (file)
@@ -278,7 +278,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
 #define FUDGE(x)       ((x) * (var_qmgr_fudge / 100.0))
            if (message->rcpt_list.len < FUDGE(var_qmgr_rcpt_limit)) {
                qmgr_rcpt_list_add(&message->rcpt_list, curr_offset,
-                                  orig_rcpt, start);
+                                  orig_rcpt ? orig_rcpt : "unknown", start);
                if (orig_rcpt) {
                    myfree(orig_rcpt);
                    orig_rcpt = 0;
index 94287fade4c8003719e7f65c3520d4d740c24f79..9868c9fcab5bc2ed630d088903b189f7b0f33f02 100644 (file)
@@ -80,7 +80,7 @@ void    qmgr_rcpt_list_add(QMGR_RCPT_LIST *list, long offset,
        list->info = (QMGR_RCPT *)
            myrealloc((char *) list->info, list->avail * sizeof(QMGR_RCPT));
     }
-    list->info[list->len].orig_rcpt = (orcpt ? mystrdup(orcpt) : 0);
+    list->info[list->len].orig_rcpt = mystrdup(orcpt);
     list->info[list->len].address = mystrdup(rcpt);
     list->info[list->len].offset = offset;
     list->info[list->len].queue = 0;
@@ -94,8 +94,7 @@ void    qmgr_rcpt_list_free(QMGR_RCPT_LIST *list)
     QMGR_RCPT *rcpt;
 
     for (rcpt = list->info; rcpt < list->info + list->len; rcpt++) {
-       if (rcpt->orig_rcpt)
-           myfree(rcpt->orig_rcpt);
+       myfree(rcpt->orig_rcpt);
        myfree(rcpt->address);
     }
     myfree((char *) list->info);
index 6b76ae51c652daf7e59f143d5924d5a90c321e34..b7b9b8e96fd37dee66cb8865f382c26f3a8e17b9 100644 (file)
@@ -117,4 +117,7 @@ qmqpd_state.o: ../../include/vbuf.h
 qmqpd_state.o: ../../include/vstring.h
 qmqpd_state.o: ../../include/mail_stream.h
 qmqpd_state.o: ../../include/cleanup_user.h
+qmqpd_state.o: ../../include/mail_proto.h
+qmqpd_state.o: ../../include/iostuff.h
+qmqpd_state.o: ../../include/attr.h
 qmqpd_state.o: qmqpd.h
index 60f42c08ab982860d81e0a6ac4b1bdbb2a96f28c..96dda4d4f2aff039bd0c8ae9159468ebc8c96dc3 100644 (file)
@@ -191,8 +191,7 @@ static void qmqpd_open_file(QMQPD_STATE *state)
                  MAIL_CLASS_PUBLIC, var_cleanup_service);
     state->cleanup = state->dest->stream;
     state->queue_id = mystrdup(state->dest->id);
-    msg_info("%s: client=%s proto=%s", state->queue_id,
-            state->namaddr, state->protocol);
+    msg_info("%s: client=%s", state->queue_id, state->namaddr);
 
     /*
      * Record the time of arrival. Optionally, enable content filtering (not
index 8e5b46c9c4e850e3a4afc6a4f142be75f408c7b4..6f0240d9e6fa43a474349de46454b52174e1a49f 100644 (file)
@@ -47,6 +47,7 @@
 
 #include <mail_stream.h>
 #include <cleanup_user.h>
+#include <mail_proto.h>
 
 /* Application-specific. */
 
@@ -72,7 +73,7 @@ QMQPD_STATE *qmqpd_state_alloc(VSTREAM *stream)
     state->reason = 0;
     state->sender = 0;
     state->recipient = 0;
-    state->protocol = "QMQP";
+    state->protocol = MAIL_PROTO_QMQP;
     state->where = "initializing client connection";
     state->why_rejected = vstring_alloc(10);
     return (state);
index 168cb0e93d829a408f546a0a12c06f09bb5a3bfd..1b98eb0814072f55780ad44cc1bd89677f080fb0 100644 (file)
@@ -278,6 +278,9 @@ smtpd_state.o: ../../include/msg.h
 smtpd_state.o: ../../include/cleanup_user.h
 smtpd_state.o: ../../include/mail_params.h
 smtpd_state.o: ../../include/mail_error.h
+smtpd_state.o: ../../include/mail_proto.h
+smtpd_state.o: ../../include/iostuff.h
+smtpd_state.o: ../../include/attr.h
 smtpd_state.o: smtpd.h
 smtpd_state.o: ../../include/vstring.h
 smtpd_state.o: ../../include/argv.h
index ebdbd93e1c4b72f98a50e3c1d38df07abaa455d1..f6aa6f6d01d386fbdf6d78b18aee33b66282ff27 100644 (file)
@@ -453,8 +453,6 @@ static int helo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "501 Syntax: HELO hostname");
        return (-1);
     }
-    if (state->helo_name != 0)
-       helo_reset(state);
     if (argc > 2)
        collapse_args(argc - 1, argv + 1);
     if (SMTPD_STAND_ALONE(state) == 0
@@ -463,8 +461,14 @@ static int helo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
+    if (state->helo_name != 0)
+       helo_reset(state);
+    chat_reset(state, var_smtpd_hist_thrsh);
+    mail_reset(state);
+    rcpt_reset(state);
     state->helo_name = mystrdup(printable(argv[1].strval, '?'));
-    state->protocol = "SMTP";
+    if (strcmp(state->protocol, MAIL_PROTO_ESMTP) != 0)
+       state->protocol = MAIL_PROTO_SMTP;
     smtpd_chat_reply(state, "250 %s", var_myhostname);
     return (0);
 }
@@ -485,13 +489,6 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "501 Syntax: EHLO hostname");
        return (-1);
     }
-    if (state->helo_name != 0)
-       helo_reset(state);
-#ifndef RFC821_SYNTAX
-    chat_reset(state, var_smtpd_hist_thrsh);
-    mail_reset(state);
-    rcpt_reset(state);
-#endif
     if (argc > 2)
        collapse_args(argc - 1, argv + 1);
     if (SMTPD_STAND_ALONE(state) == 0
@@ -500,8 +497,13 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
+    if (state->helo_name != 0)
+       helo_reset(state);
+    chat_reset(state, var_smtpd_hist_thrsh);
+    mail_reset(state);
+    rcpt_reset(state);
     state->helo_name = mystrdup(printable(argv[1].strval, '?'));
-    state->protocol = "ESMTP";
+    state->protocol = MAIL_PROTO_ESMTP;
     smtpd_chat_reply(state, "250-%s", var_myhostname);
     smtpd_chat_reply(state, "250-PIPELINING");
     if (var_message_limit)
index 2887544acd6f70cb6757c152223758a0a262aae6..d7c6cadce82bdbf00e40dd4f350d9c6474e635ba 100644 (file)
@@ -52,6 +52,7 @@
 #include <cleanup_user.h>
 #include <mail_params.h>
 #include <mail_error.h>
+#include <mail_proto.h>
 
 /* Application-specific. */
 
@@ -86,7 +87,7 @@ void    smtpd_state_init(SMTPD_STATE *state, VSTREAM *stream)
     state->sender = 0;
     state->recipient = 0;
     state->etrn_name = 0;
-    state->protocol = "SMTP";
+    state->protocol = MAIL_PROTO_SMTP;
     state->where = SMTPD_AFTER_CONNECT;
     state->recursion = 0;
     state->msg_size = 0;