Robustness: save and restore the resolver _res.options
settings before and after DNS lookup, to avoid surprises
- in third-party code. File: dns/dns_lookup.c.
+ in third-party code. This may eliminate some "localhost
+ not found" problems. File: dns/dns_lookup.c.
20031216
Bickers.
Change: queue minfree limit is now 1.5 * message size limit.
- Files: smtpd/smtpd_check.c.
+ File: smtpd/smtpd_check.c.
+
+ Bugfix: apply hostname restriction even when host address
+ lookup fails in check_{sender,recipient}_{ns,mx}_access.
+ File: smtpd/smtpd_check.c.
20040115
report really serious trouble with the destination. Files:
*qmgr/qmgr_deliver.c.
- Bugfix: report lost connection and timeout as a serious
- destination problem. Files: [sl]mtp/[sl]mtp_trouble.c.
-
Cleanup: in postfix-files, symbolic links and hard links
are now first-class entries with explicit mention of
source and destination pathnames. Files: postfix-install,
20040116
- Cleanup: sendmail -v caused one mail delivery reports upon
+ Cleanup: sendmail -v caused one mail delivery report upon
every delivery attempt, not just the first one. The fix is
to "kill" a queue file record after the first delivery
- attempt. Files: *qmgr/qmgr_active.c, *qmgr/qmgr_message.c,
- global/rec_type.c.
+ attempt. This means a new record type. Files: *qmgr/qmgr_active.c,
+ *qmgr/qmgr_message.c, global/rec_type.c.
-Open problems:
+ Cleanup: in anticipation of other built-in rate limiters,
+ the client_connection_rate_time_unit parameter is renamed
+ to client_rate_time_unit.
+
+ Documentation: finished the HOSTING_README file with an
+ overview of methods to host domains with Postfix.
- Low: in the SMTP client, pass the session, request and
- state structures as separate arguments.
+Open problems:
High: when virtual aliasing is turned off after content
filtering, local submissions may escape virtual aliasing.
+This document describes mail delivery via LMTP including Cyrus.
+For an overview of all methods to host domains with Postfix, see
+the HOSTING_README file.
+
1 - Postfix LMTP support
========================
$readme_directory/ULTRIX_README:f:root:-:644
$readme_directory/UUCP_README:f:root:-:644
$readme_directory/VERP_README:f:root:-:644
-$readme_directory/VIRTUAL_MAILBOX_README:f:root:-:644
-$readme_directory/VIRTUAL_README:f:root:-:644:o
+$readme_directory/VIRTUAL_README:f:root:-:644
$readme_directory/XCLIENT_README:f:root:-:644
$readme_directory/XFORWARD_README:f:root:-:644
# connection attempts any client is allowed to make to this service
# per time unit.
#
-# The time unit is specified with the rate_limiter_time_unit
+# The time unit is specified with the client_rate_time_unit
# configuration parameter, and defaults to one minute.
#
# By default, every client can make as many connections as Postfix
to this program. Use the <b>postfix reload</b> command after a
configuration change.
- <b>rate_limiter_time_unit</b>
+ <b>client_rate_time_unit</b>
The unit of time over which connection rates are
calculated.
<p>
-<dt> <a name="rate_limiter_time_unit"> <b>rate_limiter_time_unit</b></a>
+<dt> <a name="client_rate_time_unit"> <b>client_rate_time_unit</b></a>
(default: 60s) <dd> The time unit for computing the client connection
and other rates.
<b>smtpd_client_connection_rate_limit</b>
The maximal number of connections per unit time
- (specified with <b>rate_limiter_time_unit</b>) that any
+ (specified with <b>client_rate_time_unit</b>) that any
client is allowed to make to this service. When a
client exceeds the limit, the SMTP server logs a
warning with the client name/address and the ser-
The following \fBmain.cf\fR parameters are especially relevant to
this program. Use the \fBpostfix reload\fR command after
a configuration change.
-.IP \fBrate_limiter_time_unit\fR
+.IP \fBclient_rate_time_unit\fR
The unit of time over which connection rates are calculated.
.IP \fBclient_connection_status_update_time\fR
Time interval for logging the maximal connection count
name/address and the service name as configured in master.cf.
.IP \fBsmtpd_client_connection_rate_limit\fR
The maximal number of connections per unit time (specified
-with \fBrate_limiter_time_unit\fR) that any client
+with \fBclient_rate_time_unit\fR) that any client
is allowed to make to this service. When a client exceeds
the limit, the SMTP server logs a warning with the client
name/address and the service name as configured in master.cf.
/* The following \fBmain.cf\fR parameters are especially relevant to
/* this program. Use the \fBpostfix reload\fR command after
/* a configuration change.
-/* .IP \fBrate_limiter_time_unit\fR
+/* .IP \fBclient_rate_time_unit\fR
/* The unit of time over which connection rates are calculated.
/* .IP \fBclient_connection_status_update_time\fR
/* Time interval for logging the maximal connection count
(local)->anvil_remote = (remote); \
} while(0)
+/* Test if this remote site is listed for this local client. */
+
+#define ANVIL_LOCAL_REMOTE_LINKED(local, remote) \
+ ((local)->anvil_remote == (remote))
+
/* Drop connection from local server. */
#define ANVIL_LOCAL_DROP_ONE(local, remote) \
(unsigned long) client_stream, ident);
/*
- * Look up the remote client.
+ * Update local and remote info if this remote site is listed for this
+ * local client.
*/
- if ((anvil_remote =
- (ANVIL_REMOTE *) htable_find(anvil_remote_map, ident)) != 0)
+ if ((anvil_local = (ANVIL_LOCAL *) vstream_context(client_stream)) != 0
+ && (anvil_remote =
+ (ANVIL_REMOTE *) htable_find(anvil_remote_map, ident)) != 0
+ && ANVIL_LOCAL_REMOTE_LINKED(anvil_local, anvil_remote)) {
ANVIL_REMOTE_DROP_ONE(anvil_remote);
-
- /*
- * Update the local client information.
- */
- if ((anvil_local = (ANVIL_LOCAL *) vstream_context(client_stream)) != 0)
ANVIL_LOCAL_DROP_ONE(anvil_local, anvil_remote);
+ }
if (msg_verbose)
msg_info("%s: anvil_local 0x%lx",
myname, (unsigned long) anvil_local);
#define DEF_SMTPD_HOGGERS "$" VAR_MYNETWORKS
extern char *var_smtpd_hoggers;
-#define VAR_ANVIL_TIME_UNIT "rate_limiter_time_unit"
+#define VAR_ANVIL_TIME_UNIT "client_rate_time_unit"
#define DEF_ANVIL_TIME_UNIT "60s"
extern int var_anvil_time_unit;
* 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 "20040116"
+#define MAIL_RELEASE_DATE "20040119"
+#define MAIL_VERSION_NUMBER "2.0.17"
#define VAR_MAIL_VERSION "mail_version"
-#define DEF_MAIL_VERSION "2.0.16-" MAIL_RELEASE_DATE
+#ifdef SNAPSHOT
+#define DEF_MAIL_VERSION MAIL_VERSION_NUMBER "-" MAIL_RELEASE_DATE
+#else
+#define DEF_MAIL_VERSION MAIL_VERSION_NUMBER
+#endif
extern char *var_mail_version;
/*
request->arrival_time,
"%s", vstring_str(why));
}
- if (request->hop_status == 0)
- request->hop_status = mystrdup(vstring_str(why));
/*
* Cleanup.
"%s", vstring_str(why));
SMTP_RCPT_DROP(state, rcpt);
}
- /* XXX This assumes no fall-back relay. */
- if (request->hop_status == 0)
- request->hop_status = mystrdup(vstring_str(why));
}
/*
/* name/address and the service name as configured in master.cf.
/* .IP \fBsmtpd_client_connection_rate_limit\fR
/* The maximal number of connections per unit time (specified
-/* with \fBrate_limiter_time_unit\fR) that any client
+/* with \fBclient_rate_time_unit\fR) that any client
/* is allowed to make to this service. When a client exceeds
/* the limit, the SMTP server logs a warning with the client
/* name/address and the service name as configured in master.cf.
vstring vstring_vstream doze select_bug stream_test mac_expand \
watchdog unescape hex_quote name_mask rand_sleep sane_time ctable \
inet_addr_list attr_print64 attr_scan64 base64_code attr_print0 \
- attr_scan0 host_port attr_scan_plain attr_print_plain
+ attr_scan0 host_port attr_scan_plain attr_print_plain htable
LIB_DIR = ../../lib
INC_DIR = ../../include
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
+htable: $(LIB)
+ mv $@.o junk
+ $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
+ mv junk $@.o
+
depend: $(MAKES)
(sed '1,/^# do not edit/!d' Makefile.in; \
set -e; for i in [a-z][a-z0-9]*.c; do \
tests: valid_hostname_test mac_expand_test dict_test unescape_test \
hex_quote_test ctable_test inet_addr_list_test base64_code_test \
attr_scan64_test attr_scan0_test dict_pcre_test host_port_test \
- dict_cidr_test attr_scan_plain_test
+ dict_cidr_test attr_scan_plain_test htable_test
valid_hostname_test: valid_hostname valid_hostname.in valid_hostname.ref
./valid_hostname <valid_hostname.in 2>valid_hostname.tmp
diff attr_scan_plain.ref attr_scan_plain.tmp
rm -f attr_scan_plain.tmp
+htable_test: htable /usr/share/dict/words
+ ./htable < /usr/share/dict/words
+
# do not edit below this line - it is generated by 'make depend'
alldig.o: alldig.c
alldig.o: sys_defs.h
list[count] = 0;
return (list);
}
+
+#ifdef TEST
+#include <vstring_vstream.h>
+#include <myrand.h>
+
+int main(int unused_argc, char **unused_argv)
+{
+ VSTRING *buf = vstring_alloc(10);
+ int count = 0;
+ HTABLE *hash;
+ HTABLE_INFO **ht_info;
+ HTABLE_INFO **ht;
+ HTABLE_INFO *info;
+ int i;
+ int r;
+
+ /*
+ * Load a large number of strings and delete them in a random order.
+ */
+ hash = htable_create(10);
+ while (vstring_get(buf, VSTREAM_IN) != VSTREAM_EOF)
+ htable_enter(hash, vstring_str(buf), (void *) count++);
+ ht_info = htable_list(hash);
+ for (i = 0; i < hash->used; i++) {
+ r = myrand() % hash->used;
+ info = ht_info[i];
+ ht_info[i] = ht_info[r];
+ ht_info[r] = info;
+ }
+ for (ht = ht_info; *ht; ht++)
+ htable_delete(hash, ht[0]->key, (void (*) (char *)) 0);
+ if (hash->used > 0)
+ msg_panic("%d entries not deleted", hash->used);
+ return (0);
+}
+
+#endif
#include <fcntl.h>
#include <stdarg.h>
#include <setjmp.h>
+#include <unistd.h>
/*
* Utility library.