$mydestination include files. This makes Postfix more
compatible with sendmail.cw files. File: util/match_list.c.
- Feature: specify "mydomain = domain.name" to have the local
- domain name automagically appended to $myhostname. Files:
- global/mail_params.c, postconf/postconf.c.
+ Feature: if your machines have short host names, specify
+ "mydomain = domain.name", and you no longer have to specify
+ "myhostname = host.domain.name". Files: global/mail_params.c,
+ postconf/postconf.c.
-Future:
+19990420
- Planned: must be able to list the same hash table in
- virtual_maps and mydestination.
+ Cleanup: bounce mail when a mailbox goes over file quota,
+ instead of deferring delivery. File: local/mailbox.c.
- Planned: delivered-to cache instead of table.
+19990421
- Planned: hide internal loop info so that delivered-to is
- no longer required.
-
- Planned: DNS lookups for address canonicalization.
-
- Planned: no more slow-down when qmgr reaches the end of
- the in-memory recipient list while there's still more
- recipients in the queue file.
+ Feature: auto-detection of changes to DB or DBM lookup
+ tables now includes the case where a file is unlinked.
+ Philip A. Prindeville, Mirapoint, Inc., USA. File:
+ util/dict.c.
- Planned: pop pre-authentication by Joerg Henne.
+19990422
- Planned: ident lookup by Jon Ribbens.
+ Robustness: Lotus mail sends MAIL FROM: <@> instead of <>.
+ Problem reported by Erik Toubro Nielsen, IFAD, Denmark.
+ Files: trivial-rewrite/rewrite.c (@ becomes empty address)
+ and global/rewrite_clnt.c (allow empty response).
- Planned: $logname, $home, $shell, $user, $sender expansions
- in shell commands, mailbox_command, forward_path.
+ Bugfix: showq could segfault when writing to a broken pipe.
+ Problem reported by Bryan Fullerton, Canadian Broadcasting
+ Corporation. Files: util/vbuf_print.c.
- Planned: forward_path, for example $home/.forward (default)
- or /var/forward/$logname (for mail servers).
+ Cleanup: got rid of the "fatal: write error: Broken pipe"
+ message when mailq output is piped into a program that
+ terminates early.
- Planned: control From_, Return-Path, Delivered-To and other
- features with local delivery to mailbox or command.
+ Cleanup: bounce messages are multipart/mixed with the error
+ report as part of the first message segment, because users
+ had trouble extracting the delivery error report from the
+ attachment.
-Incompatible changes with snapshot-19990409:
+Incompatible changes with snapshot-19990422:
===========================================
- If an address extension (+foo) matches a user's .forward+foo file
listed in the .forward+foo file. This is more consistent with the
way Postfix expands aliases.
-Major changes with snapshot-19990409:
+Major changes with snapshot-19990422:
=====================================
In addition to several little bugfixes, none related to security,
$domain (recipient domain), and $extension (address extension).
Initial code by Philip A. Prindeville, Mirapoint, Inc., USA.
-- No more Postfix lockups on Solaris. The code no longer uses
-Solaris UNIX-domain sockets, because they are still broken,
-even with Solaris 7.
+- No more Postfix lockups on Solaris (knock on wood). The code no
+longer uses Solaris UNIX-domain sockets, because they are still
+broken, even with Solaris 7.
- Workaround for the Solaris mailtool, which keeps an exclusive
kernel lock on the mailbox while its window is not iconified (specify
errors (always 450) and hard errors (unknown_address_reject_code,
default 450).
-- MIME-encapsulated bounce messages as per RFC 1892. Initial
-implementation by Philip A. Prindeville, Mirapoint, Inc., USA.
+- MIME-encapsulated bounce messages, making it easier to recover
+bounced mail. Initial implementation by Philip A. Prindeville,
+Mirapoint, Inc., USA. Support for RFC 1894 (DSN) will have to wait
+until Postfix internals have been revised to support RFC 1893.
- Separately configurable "postmaster" addresses for single bounces
(bounce_notice_recipient), double bounces (2bounce_notice_recipient),
* MIME header.
*/
post_mail_fprintf(bounce, "MIME-Version: 1.0");
+#ifdef DSN
post_mail_fprintf(bounce, "Content-Type: %s; report-type=%s;",
- "multipart/report", "plain");
+ "multipart/report", "delivery-status");
+#else
+ post_mail_fprintf(bounce, "Content-Type: multipart/mixed;");
+#endif
post_mail_fprintf(bounce, "\tboundary=\"%s\"", boundary);
post_mail_fputs(bounce, "");
post_mail_fputs(bounce, "This is a MIME-encapsulated message.");
/*
* MIME header.
*/
+#ifdef DSN
post_mail_fprintf(bounce, "--%s", boundary);
post_mail_fprintf(bounce, "Content-Description: %s", "Delivery error report");
- post_mail_fprintf(bounce, "Content-Type: %s", "text/plain");
+ post_mail_fprintf(bounce, "Content-Type: %s", "message/delivery-status");
post_mail_fputs(bounce, "");
+#endif
/*
* If the bounce log cannot be found, do not raise a fatal run-time
mail_name = Postfix
mail_owner = postfix
mail_spool_directory = /var/mail
-mail_version = Snapshot-19990414
+mail_version = Snapshot-19990422
mailbox_command =
mailbox_transport =
maps_rbl_domains = rbl.maps.vix.com
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
-#define DEF_MAIL_VERSION "Snapshot-19990414"
+#define DEF_MAIL_VERSION "Snapshot-19990422"
extern char *var_mail_version;
/* LICENSE
if (msg_verbose)
msg_info("rewrite_clnt: %s: %s -> %s",
rule, addr, vstring_str(result));
+#if 0
if (addr[0] != 0 && STR(result)[0] == 0)
msg_warn("%s: null result for: <%s>", myname, addr);
else
+#endif
return (result);
}
sleep(10); /* XXX make configurable */
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
/* Utility library. */
#include <mail_params.h>
#include <deliver_pass.h>
+#ifndef EDQUOT
+#define EDQUOT EFBIG
+#endif
+
/* Application-specific. */
#include "local.h"
set_eugid(var_owner_uid, var_owner_gid);
if (status)
- defer_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
- "cannot append to file %s: %s", mailbox, vstring_str(why));
+ status = (errno == EDQUOT ? bounce_append : defer_append)
+ (BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
+ "cannot append to file %s: %s", mailbox, vstring_str(why));
else
sent(SENT_ATTR(state.msg_attr), "mailbox");
myfree(mailbox);
int n;
/*
- * Connect to the show queue service.
+ * Connect to the show queue service. Terminate silently when piping into
+ * a program that terminates early.
*/
+ signal(SIGPIPE, SIG_DFL);
if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) {
while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0)
if (vstream_fwrite(VSTREAM_OUT, buf, n) != n)
msg_fatal("-t can be used only in delivery mode");
if (extract_recipients && argv[OPTIND])
- msg_fatal("cannot delete recipients with -t");
+ msg_fatal("cannot handle command-line recipients with -t");
/*
* Start processing. Some modes are implemented internally (enqueue
* whitespace, so that it won't be considered as being part of our own
* Received: header. What an ugly Kluge.
*/
- if (vstream_ferror(state->cleanup))
+ if (vstream_fflush(state->cleanup))
state->err = CLEANUP_STAT_WRITE;
for (prev_rec_type = 0; /* void */ ; prev_rec_type = curr_rec_type) {
&& VSTRING_LEN(tree->tail->vstr) == 0)
return;
+ /*
+ * Treat a lone @ as if it were an empty address.
+ */
+ if (tree->head == tree->tail
+ && tree->tail->type == '@') {
+ tok822_free_tree(tok822_sub_keep_before(tree, tree->tail));
+ tok822_sub_append(tree, tok822_alloc(TOK822_QSTRING, ""));
+ return;
+ }
+
/*
* Strip source route.
*/
/* Application context from the caller.
/* .PP
/* dict_changed() returns non-zero when any dictionary needs to
-/* be re-opened because it has changed.
+/* be re-opened because it has changed or because it was unlinked.
/*
/* dict_load_file() reads name-value entries from the named file.
/* Lines that begin with whitespace are concatenated to the preceding
msg_warn("%s: table %s: null time stamp", myname, h->key);
if (fstat(dict->fd, &st) < 0)
msg_fatal("%s: fstat: %m", myname);
- status = (st.st_mtime != dict->mtime);
+ status = (st.st_mtime != dict->mtime || st.st_nlink == 0);
}
myfree((char *) ht_info_list);
return (status);
s = va_arg(ap, char *);
if (prec > 0 || (width > 0 && width > strlen(s))) {
if (VBUF_SPACE(bp, (width > prec ? width : prec) + INT_SPACE))
- break;
+ return (bp);
sprintf((char *) bp->ptr, vstring_str(fmt), s);
VBUF_SKIP(bp);
} else {
case 'x':
case 'X':
if (VBUF_SPACE(bp, (width > prec ? width : prec) + INT_SPACE))
- break;
+ return (bp);
if (long_flag)
sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, long));
else
case 'f':
case 'g':
if (VBUF_SPACE(bp, (width > prec ? width : prec) + DBL_SPACE))
- break;
+ return (bp);
sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, double));
VBUF_SKIP(bp);
break;
break;
case 'p':
if (VBUF_SPACE(bp, (width > prec ? width : prec) + PTR_SPACE))
- break;
+ return (bp);
sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, char *));
VBUF_SKIP(bp);
break;