util/name_mask.[hc], global/ehlo_mask.[hc], smtpd/smtpd.c,
smtp/smtp.c, smtp/smtp_proto.c.
+20041219
+
+ Bugfix: postcat without -o was broken. File: postcat/postcat.c.
+
+20041220
+
+ Dummy VSTREAM read-write routines. Files: util/dummy_read.c,
+ util/dummy_write.c.
+
Open problems:
Med: implement ${name[?:]value} in main.cf or update the
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20041219"
+#define MAIL_RELEASE_DATE "20041220"
#define MAIL_VERSION_NUMBER "2.2"
#define VAR_MAIL_VERSION "mail_version"
int first = 1;
int ch;
off_t offset;
+ int in_message = 0;
#define TEXT_RECORD(rec_type) \
(rec_type == REC_TYPE_CONT || rec_type == REC_TYPE_NORM)
vstream_printf("*** ENVELOPE RECORDS %s ***\n", VSTREAM_PATH(fp));
first = 0;
}
- if ((prev_type == REC_TYPE_CONT && !TEXT_RECORD(rec_type))
- || !(flags & PC_FLAG_OFFSET))
+ if (prev_type == REC_TYPE_CONT && in_message && !msg_verbose
+ && ((flags & PC_FLAG_OFFSET) != 0 || !TEXT_RECORD(rec_type)))
VSTREAM_PUTCHAR('\n');
if (flags & PC_FLAG_OFFSET)
vstream_printf("%9lu ", (unsigned long) offset);
vstream_printf("%s: %s", rec_type_name(rec_type),
asctime(localtime(&time)));
break;
- case REC_TYPE_CONT:
+ case REC_TYPE_CONT: /* REC_TYPE_FILT collision */
if (msg_verbose)
- vstream_printf("%s: ", rec_type_name(rec_type));
+ vstream_printf("unterminated_text: ");
vstream_fwrite(VSTREAM_OUT, STR(buffer), LEN(buffer));
if (msg_verbose)
VSTREAM_PUTCHAR('\n');
break;
case REC_TYPE_MESG:
vstream_printf("*** MESSAGE CONTENTS %s ***\n", VSTREAM_PATH(fp));
+ in_message = 1;
break;
case REC_TYPE_XTRA:
vstream_printf("*** HEADER EXTRACTED %s ***\n", VSTREAM_PATH(fp));
+ in_message = 0;
break;
case REC_TYPE_END:
vstream_printf("*** MESSAGE FILE END %s ***\n", VSTREAM_PATH(fp));
write_buf.c write_wait.c auto_clnt.c attr_clnt.c attr_scan_plain.c \
attr_print_plain.c sane_connect.c neuter.c name_code.c \
uppercase.c unix_recv_fd.c stream_recv_fd.c unix_send_fd.c \
- stream_send_fd.c dict_sdbm.c hex_code.c
+ stream_send_fd.c dict_sdbm.c hex_code.c dummy_read.c dummy_write.c
OBJS = alldig.o argv.o argv_split.o attr_print0.o attr_print64.o \
attr_scan0.o attr_scan64.o base64_code.o basename.o binhash.o \
chroot_uid.o clean_env.o close_on_exec.o concatenate.o ctable.o \
write_buf.o write_wait.o auto_clnt.o attr_clnt.o attr_scan_plain.o \
attr_print_plain.o sane_connect.o $(STRCASE) neuter.o name_code.o \
uppercase.o unix_recv_fd.o stream_recv_fd.o unix_send_fd.o \
- stream_send_fd.o dict_sdbm.o hex_code.o
+ stream_send_fd.o dict_sdbm.o hex_code.o dummy_read.o dummy_write.o
HDRS = argv.h attr.h base64_code.h binhash.h chroot_uid.h clean_env.h \
connect.h ctable.h dict.h dict_db.h dict_cdb.h dict_dbm.h dict_env.h \
dict_cidr.h dict_ht.h dict_ni.h dict_nis.h \
doze.o: sys_defs.h
doze.o: msg.h
doze.o: iostuff.h
+dummy_read.o: dummy_read.c
+dummy_read.o: sys_defs.h
+dummy_read.o: msg.h
+dummy_read.o: iostuff.h
+dummy_write.o: dummy_write.c
+dummy_write.o: sys_defs.h
+dummy_write.o: msg.h
+dummy_write.o: iostuff.h
dup2_pass_on_exec.o: dup2_pass_on_exec.c
duplex_pipe.o: duplex_pipe.c
duplex_pipe.o: sys_defs.h
--- /dev/null
+/*++
+/* NAME
+/* dummy_read 3
+/* SUMMARY
+/* dummy read operation
+/* SYNOPSIS
+/* #include <iostuff.h>
+/*
+/* int dummy_read(fd, buf, buf_len, timeout, context)
+/* int fd;
+/* void *buf;
+/* unsigned len;
+/* int timeout;
+/* void *context;
+/* DESCRIPTION
+/* dummy_read() reports an EOF condition without side effects.
+/*
+/* Arguments:
+/* .IP fd
+/* File descriptor in the range 0..FD_SETSIZE. Its value is logged
+/* when verbose logging is turned on.
+/* .IP buf
+/* Read buffer pointer. Not used.
+/* .IP buf_len
+/* Read buffer size. Its value is logged when verbose logging is
+/* turned on.
+/* .IP timeout
+/* The deadline in seconds. Not used.
+/* .IP context
+/* Application context. Not used.
+/* DIAGNOSTICS
+/* None.
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <msg.h>
+#include <iostuff.h>
+
+/* dummy_read - dummy read operation */
+
+int dummy_read(int fd, void *unused_buf, unsigned len,
+ int unused_timeout, void *unused_context)
+{
+ if (msg_verbose)
+ msg_info("dummy_read: fd %d, len %d", fd, len);
+ return (0);
+}
--- /dev/null
+/*++
+/* NAME
+/* dummy_write 3
+/* SUMMARY
+/* dummy write operation
+/* SYNOPSIS
+/* #include <iostuff.h>
+/*
+/* int dummy_write(fd, buf, buf_len, timeout, context)
+/* int fd;
+/* void *buf;
+/* unsigned len;
+/* int timeout;
+/* void *context;
+/* DESCRIPTION
+/* dummy_write() implements a data sink without side effects.
+/*
+/* Arguments:
+/* .IP fd
+/* File descriptor in the range 0..FD_SETSIZE. Its value is logged
+/* when verbose logging is turned on.
+/* .IP buf
+/* Write buffer pointer. Not used.
+/* .IP buf_len
+/* Write buffer size. Its value is logged when verbose logging is
+/* turned on.
+/* .IP timeout
+/* The deadline in seconds. Not used.
+/* .IP context
+/* Application context. Not used.
+/* DIAGNOSTICS
+/* None.
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <msg.h>
+#include <iostuff.h>
+
+/* dummy_write - dummy write operation */
+
+int dummy_write(int fd, void *unused_buf, unsigned len,
+ int unused_timeout, void *unused_context)
+{
+ if (msg_verbose)
+ msg_info("dummy_write: fd %d, len %d", fd, len);
+ return (len);
+}
extern int stream_send_fd(int, int);
extern int unix_recv_fd(int);
extern int unix_send_fd(int, int);
+extern int dummy_read(int, void *, unsigned, int, void *);
+extern int dummy_write(int, void *, unsigned, int, void *);
#define BLOCKING 0
#define NON_BLOCKING 1