Bugfix: garbage in verbose "flush" server logging. Victor
Duchovni. File: flush/flush.c.
+20020723
+
Incompatibility: smtpd_sasl_local_domain now defaults to
the null string. File: smtpd/smtpd.c, smtpd/smtpd_sasl_glue.c.
20020731
- Cleanup: permit_naked_ip_address is unsafe and will go
- away. Postfix logs a warning. File: smtpd/smtpd_check.c.
+ Cleanup: permit_naked_ip_address is unsafe (especially when
+ used with smtpd_recipient_restrictions) and will go away.
+ Postfix now logs a warning. File: smtpd/smtpd_check.c.
20020801
a new queue, which is appropriately named "hold". Files:
postsuper/postsuper.c, showq/showq.c.
+20020803
+
+ Feature: when a Delivered-To: mail delivery loop is detected,
+ send the bounce to the mailing list owner. This required
+ changes to the local delivery agent, a new bounce client
+ stub, and a new bounce server stub and support routines
+ for one recipient bouncing. Files: local/recipient.c,
+ global/bounce_log.c, global/bounce.c, bounce/bounce.c,
+ bounce/bounce_notify_util.c, bounce/bounce_one_service.c.
+
Open problems:
Medium: should permit_mx_backup defer delivery if DNS
==================================================
Postfix can attach a call tracer whenever a daemon process starts.
+Call tracers come in several kinds.
+
+1) System call tracers such as trace, truss, strace, or ktrace.
+ These show the communication between the process and the kernel.
+
+2) Library call tracers such as sotruss and ltrace. These show
+ calls of library routines, and give a better idea of what is
+ going on within the process.
Append a -D option to the suspect command in /etc/postfix/master.cf,
for example:
PATH=/bin:/usr/bin:/usr/local/bin
(truss -p $process_id 2>&1 | logger -p mail.info) & sleep 5
-Instead of truss use trace or strace.
-
Type "postfix reload" and watch the logfile.
-6 - Running daemon programs under an interactive debugger
-=========================================================
+6 - Running daemon programs under a debugger
+============================================
Append a -D option to the suspect command in /etc/postfix/master.cf,
for example:
smtp inet n - n - - smtpd -D
Edit the debugger_command definition in /etc/postfix/main.cf so
-that it invokes the debugger of your choice, for example:
+that it invokes the debugger of your choice.
- debugger_command =
- PATH=/usr/bin:/usr/X11R6/bin
- xxgdb $daemon_directory/$process_name $process_id & sleep 5
+Two choices are described in detail:
-If you do not have X on the Postfix machine, then xxgdb isn't going
-to work. Instead, you can try to run gdb in non-interactive mode:
+1) If you do not have X Windows installed on the Postfix machine,
+ or if you are not familiar with interactive debuggers, then you
+ can try to run gdb in non-interactive mode:
+ /etc/postfix/main.cf:
+ --------------------
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
>$config_directory/$process_name.$process_id.log & sleep 5
-If you use xxgdb, be sure that gdb is in the command search path,
-and export XAUTHORITY so that X access control works, for example:
+ Type "postfix reload" to make the configuration changes effective.
+
+ Whenever a suspect daemon process is started, an output file
+ is created, named after the daemon and process ID (for example,
+ smtpd.12345.log). When the process crashes, a stack trace (with
+ output from the "where" command) is written to its logfile.
+
+2) If you have X Windows installed on the Postfix machine, then
+ an interactive debugger such as xxgdb can be convenient.
+
+ /etc/postfix/main.cf:
+ --------------------
+ debugger_command =
+ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
+ xxgdb $daemon_directory/$process_name $process_id & sleep 5
+
+ Be sure that gdb is in the command search path, and export
+ XAUTHORITY so that X access control works, for example:
% setenv XAUTHORITY ~/.Xauthority
-Stop and start the Postfix system.
+ Stop and start the Postfix system. This is necessary so that
+ Postfix runs with the proper XAUTHORITY and DISPLAY settings.
-Whenever the suspect daemon process is started, a debugger window
-pops up and you can watch in detail what happens (when using xxgdb)
-or a file is created (if using gdb in non-interactive mode).
+ Whenever the suspect daemon process is started, a debugger window
+ pops up and you can watch in detail what happens (when using
+ xxgdb) or a file is created (if using gdb in non-interactive
+ mode).
7 - Unreasonable behavior
=========================
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-200208XX
+Incompatible changes with Postfix snapshot 1.1.11-20020804
==========================================================
+LDAP API version 1 is no longer supported. The memory allocation
+and deallocation strategy has changed too much to maintain both
+version 1 and 2 at the same time.
+
In mailq output, the queue ID is followed by the ! character when
-the message is in the "hold" queue.
+the message is in the "hold" queue. This may break programs that
+process mailq output.
+
+The "permit_naked_ip_address" restriction on HELO command syntax
+is unsafe when used with smtpd_recipient_restrictions, and will go
+away. The user is requested to use "permit_mynetworks" instead.
+
+The smtpd_sasl_local_domain setting now defaults to the null string,
+rather than $myhostname. This seems to work better with Cyrus SASL
+version 2. This change may cause incompatibility with the saslpasswd2
+command.
+
+Major changes with Postfix snapshot 1.1.11-20020804
+===================================================
+
+New "hold" queue for mail that should not be delivered. "postqueue
+-h" puts mail on hold, and "postqueue -H" releases mail, moving
+mail that was "on hold" to the deferred queue.
+
+Mail is now sent to the mailing list owner when Postfix detects a
+Delivered-To: mail delivery loop. Delivery loops happen when idiots
+forward mail that was already stored in a mailbox, setting the
+envelope recipient address to the To: address (so that mail would
+loop back to the mailing list), and setting the envelope sender
+address to the From: address (so that the error report would be
+sent to the poster).
Incompatible changes with Postfix snapshot 1.1.11-20020717
==========================================================
command, by contacting the Postfix <a href="qmgr.8.html"><b>qmgr</b>(8)</a> daemon.
<b>-p</b> Produce a traditional sendmail-style queue listing.
-
This option implements the traditional <b>mailq</b> com-
mand, by contacting the Postfix <a href="showq.8.html"><b>showq</b>(8)</a> daemon.
+ Each queue entry shows the queue file ID, message
+ size, arrival time, sender, and the recipients that
+ still need to be delivered. If mail could not be
+ delivered upon the last attempt, the reason for
+ failure is shown. This mode of operation is imple-
+ mented by executing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command. The
+ queue ID string is followed by an optional status
+ character:
+
+ <b>*</b> The message is in the <b>active</b> queue, i.e. the
+ message is selected for delivery.
+
+ <b>!</b> The message is in the <b>hold</b> queue, i.e. no
+ further delivery attempt will be made until
+ the mail is taken off hold.
+
<b>-s</b> <i>site</i>
Schedule immediate delivery of all mail that is
queued for the named <i>site</i>. The site must be eligi-
mailq | awk 'BEGIN { RS = "" } \
/ user@example\.com$/ { print $1 } \
- ' | postsuper -d -
+ ' | tr -d '*!' | postsuper -d -
Specify <b>-d</b> <b>ALL</b> to remove all messages; for example,
specify <b>-d</b> <b>ALL</b> <b>deferred</b> to delete mail in the
<b>deferred</b> queue. As a safety measure, the word <b>ALL</b>
must be specified in upper case.
- Note: mail that is put "on hold" will not expire.
+ Note: mail that is put "on hold" will not expire
+ when its time in the queue exceeds the <b>maxi-</b>
+ <b>mal</b><i>_</i><b>queue</b><i>_</i><b>lifetime</b> setting.
<b>-H</b> <i>queue_id</i>
Release mail that was put "on hold". Move one mes-
mail could not be delivered upon the last attempt,
the reason for failure is shown. This mode of oper-
ation is implemented by executing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a>
- command. The queue ID string is followed by an
- optional status character:
-
- <b>*</b> The message is in the <b>active</b> queue, i.e. the
- message is selected for delivery.
-
- <b>!</b> The message is in the <b>hold</b> queue, i.e. no
- further delivery attempt will be made until
- the mail is taken off hold.
+ command.
<b>newaliases</b>
Initialize the alias database. If no input file is
by contacting the Postfix \fBqmgr\fR(8) daemon.
.IP \fB-p\fR
Produce a traditional sendmail-style queue listing.
-
This option implements the traditional \fBmailq\fR command,
by contacting the Postfix \fBshowq\fR(8) daemon.
+
+Each queue entry shows the queue file ID, message
+size, arrival time, sender, and the recipients that still need to
+be delivered. If mail could not be delivered upon the last attempt,
+the reason for failure is shown. This mode of operation is implemented
+by executing the \fBpostqueue\fR(1) command. The queue ID string
+is followed by an optional status character:
+.RS
+.IP \fB*\fR
+The message is in the \fBactive\fR queue, i.e. the message is
+selected for delivery.
+.IP \fB!\fR
+The message is in the \fBhold\fR queue, i.e. no further delivery
+attempt will be made until the mail is taken off hold.
+.RE
.IP "\fB-s \fIsite\fR"
Schedule immediate delivery of all mail that is queued for the named
\fIsite\fR. The site must be eligible for the "fast flush" service.
.ti +4
/ user@example\e.com$/ { print $1 } \e
.br
-\' | postsuper -d -
+\' | tr -d '*!' | postsuper -d -
.sp
Specify \fB-d ALL\fR to remove all messages; for example, specify
\fB-d ALL deferred\fR to delete mail in the \fBdeferred\fR queue.
As a safety measure, the word \fBALL\fR must be specified in upper
case.
.sp
-Note: mail that is put "on hold" will not expire.
+Note: mail that is put "on hold" will not expire when its
+time in the queue exceeds the \fBmaximal_queue_lifetime\fR
+setting.
.IP "\fB-H \fIqueue_id\fR"
Release mail that was put "on hold".
Move one message with the named queue ID from the named
size, arrival time, sender, and the recipients that still need to
be delivered. If mail could not be delivered upon the last attempt,
the reason for failure is shown. This mode of operation is implemented
-by executing the \fBpostqueue\fR(1) command. The queue ID string
-is followed by an optional status character:
-.RS
-.IP \fB*\fR
-The message is in the \fBactive\fR queue, i.e. the message is
-selected for delivery.
-.IP \fB!\fR
-The message is in the \fBhold\fR queue, i.e. no further delivery
-attempt will be made until the mail is taken off hold.
-.RE
+by executing the \fBpostqueue\fR(1) command.
.IP \fBnewaliases\fR
Initialize the alias database. If no input file is specified (with
the \fB-oA\fR option, see below), the program processes the file(s)
* 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 "20020803"
+#define MAIL_RELEASE_DATE "20020804"
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE
recipient.o: ../../include/defer.h
recipient.o: ../../include/mail_params.h
recipient.o: ../../include/split_addr.h
+recipient.o: ../../include/strip_addr.h
recipient.o: ../../include/ext_prop.h
recipient.o: ../../include/mypwd.h
+recipient.o: ../../include/canon_addr.h
recipient.o: local.h
recipient.o: ../../include/been_here.h
recipient.o: ../../include/tok822.h
for (cpp = alias_maps->argv->argv; *cpp; cpp++) {
if ((dict = dict_handle(*cpp)) == 0)
msg_panic("%s: dictionary not found: %s", myname, *cpp);
- if ((dict->flags & DICT_FLAG_FIXED) == 0) {
+ if ((dict->flags & ALIAS_DICT_FLAGS) != ALIAS_DICT_FLAGS) {
msg_warn("invalid alias map type: %s", *cpp);
continue;
}
expansion = mystrdup(alias_result);
if (OWNER_ASSIGN(owner) != 0
- && (owner_rhs = maps_find(alias_maps, owner, DICT_FLAG_FIXED)) != 0) {
+ && (owner_rhs = maps_find(alias_maps, owner, ALIAS_DICT_FLAGS)) != 0) {
canon_owner = canon_addr_internal(vstring_alloc(10),
var_exp_own_alias ? owner_rhs : owner);
SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level);
state.msg_attr.queue_id = rqst->queue_id;
state.msg_attr.fp = rqst->fp;
state.msg_attr.offset = rqst->data_offset;
+ state.msg_attr.encoding = rqst->encoding;
state.msg_attr.sender = rqst->sender;
state.msg_attr.relay = service;
state.msg_attr.arrival_time = rqst->arrival_time;
char *queue_name; /* mail queue id */
char *queue_id; /* mail queue id */
long offset; /* data offset */
+ char *encoding; /* MIME encoding */
char *sender; /* taken from envelope */
char *recipient; /* taken from resolver */
char *domain; /* recipient domain */
*/
#define BOUNCE_ATTR(attr) attr.queue_id, attr.recipient, attr.relay, \
attr.arrival_time
+#define BOUNCE_ONE_ATTR(attr) attr.queue_name, attr.queue_id, attr.encoding, \
+ attr.sender, attr.recipient, \
+ attr.relay, attr.arrival_time
#define SENT_ATTR(attr) attr.queue_id, attr.recipient, attr.relay, \
attr.arrival_time
#define OPENED_ATTR(attr) attr.queue_id, attr.sender
#include <defer.h>
#include <mail_params.h>
#include <split_addr.h>
+#include <strip_addr.h>
#include <ext_prop.h>
#include <mypwd.h>
#include <canon_addr.h>
state.level, state.msg_attr.recipient))
return (0);
+ /*
+ * With each level of recursion, detect and break external message
+ * forwarding loops.
+ *
+ * If the looping recipient address has an owner- alias, send the error
+ * report there instead.
+ *
+ * XXX A delivery agent cannot change the envelope sender address for
+ * bouncing. As a workaround we use a one-recipient bounce procedure.
+ *
+ * The proper fix would be to record in the bounce logfile an error return
+ * address for each individual recipient. This would also eliminate the
+ * need for VERP specific bouncing code, at the cost of complicating the
+ * normal bounce sending procedure, but would simplify the code below.
+ */
+ if (delivered_find(state.loop_info, state.msg_attr.recipient)) {
+ VSTRING *canon_owner = 0;
+
+ if (var_ownreq_special) {
+ char *stripped_recipient;
+ char *owner_alias;
+ const char *owner_expansion;
+
+#define FIND_OWNER(lhs, rhs, addr) { \
+ lhs = concatenate("owner-", addr, (char *) 0); \
+ (void) split_at_right(lhs, '@'); \
+ rhs = maps_find(alias_maps, lhs, ALIAS_DICT_FLAGS); \
+ }
+
+ FIND_OWNER(owner_alias, owner_expansion, state.msg_attr.recipient);
+ if (owner_expansion == 0
+ && (stripped_recipient = strip_addr(state.msg_attr.recipient,
+ (char **) 0,
+ *var_rcpt_delim)) != 0) {
+ myfree(owner_alias);
+ FIND_OWNER(owner_alias, owner_expansion, stripped_recipient);
+ myfree(stripped_recipient);
+ }
+ if (owner_expansion != 0) {
+ canon_owner = canon_addr_internal(vstring_alloc(10),
+ var_exp_own_alias ?
+ owner_expansion : owner_alias);
+ SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level);
+ }
+ myfree(owner_alias);
+ }
+ if (canon_owner) {
+ rcpt_stat = bounce_one(BOUNCE_FLAG_KEEP,
+ BOUNCE_ONE_ATTR(state.msg_attr),
+ "mail forwarding loop for %s",
+ state.msg_attr.recipient);
+ vstring_free(canon_owner);
+ } else {
+ rcpt_stat = bounce_append(BOUNCE_FLAG_KEEP,
+ BOUNCE_ATTR(state.msg_attr),
+ "mail forwarding loop for %s",
+ state.msg_attr.recipient);
+ }
+ return (rcpt_stat);
+ }
+
/*
* Set up the recipient-specific attributes. If this is forwarded mail,
* leave the delivered attribute alone, so that the forwarded message
return (bounce_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
"null username in %s", state.msg_attr.recipient));
- /*
- * With each level of recursion, detect and break external message
- * forwarding loops. If the looping recipient address has an owner-
- * alias, then assume the error report should be sent there instead.
- *
- * XXX A delivery agent cannot change the envelope sender address for
- * bouncing, that would break multi-recipient mail. The fix would be to
- * change the delivery agent to bounce service protocol. The bounce
- * daemon would have to record in the bounce logfile for each bounced
- * recipient the sender address that the recipient would have to be
- * bounced to. This could simplify VERP implementation, at the cost of
- * greatly complicating the normal bounce sending procedure.
- */
- if (delivered_find(state.loop_info, state.msg_attr.delivered)) {
- VSTRING *canon_owner = 0;
-
- if (var_ownreq_special) {
- char *owner;
- const char *owner_rhs;
-
- owner = concatenate("owner-", state.msg_attr.user, (char *) 0);
- owner_rhs = maps_find(alias_maps, owner, ALIAS_DICT_FLAGS);
- if (owner_rhs != 0) {
- canon_owner = canon_addr_internal(vstring_alloc(10),
- var_exp_own_alias ? owner_rhs : owner);
- SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level);
- }
- myfree(owner);
- }
- rcpt_stat = bounce_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
- "mail forwarding loop for %s", state.msg_attr.recipient);
- if (canon_owner)
- vstring_free(canon_owner);
- return (rcpt_stat);
- }
-
/*
* Run the recipient through the delivery switch.
*/
/* by contacting the Postfix \fBqmgr\fR(8) daemon.
/* .IP \fB-p\fR
/* Produce a traditional sendmail-style queue listing.
-/*
/* This option implements the traditional \fBmailq\fR command,
/* by contacting the Postfix \fBshowq\fR(8) daemon.
+/*
+/* Each queue entry shows the queue file ID, message
+/* size, arrival time, sender, and the recipients that still need to
+/* be delivered. If mail could not be delivered upon the last attempt,
+/* the reason for failure is shown. This mode of operation is implemented
+/* by executing the \fBpostqueue\fR(1) command. The queue ID string
+/* is followed by an optional status character:
+/* .RS
+/* .IP \fB*\fR
+/* The message is in the \fBactive\fR queue, i.e. the message is
+/* selected for delivery.
+/* .IP \fB!\fR
+/* The message is in the \fBhold\fR queue, i.e. no further delivery
+/* attempt will be made until the mail is taken off hold.
+/* .RE
/* .IP "\fB-s \fIsite\fR"
/* Schedule immediate delivery of all mail that is queued for the named
/* \fIsite\fR. The site must be eligible for the "fast flush" service.
/* .ti +4
/* / user@example\e.com$/ { print $1 } \e
/* .br
-/* \' | postsuper -d -
+/* \' | tr -d '*!' | postsuper -d -
/* .sp
/* Specify \fB-d ALL\fR to remove all messages; for example, specify
/* \fB-d ALL deferred\fR to delete mail in the \fBdeferred\fR queue.
/* As a safety measure, the word \fBALL\fR must be specified in upper
/* case.
/* .sp
-/* Note: mail that is put "on hold" will not expire.
+/* Note: mail that is put "on hold" will not expire when its
+/* time in the queue exceeds the \fBmaximal_queue_lifetime\fR
+/* setting.
/* .IP "\fB-H \fIqueue_id\fR"
/* Release mail that was put "on hold".
/* Move one message with the named queue ID from the named
/* size, arrival time, sender, and the recipients that still need to
/* be delivered. If mail could not be delivered upon the last attempt,
/* the reason for failure is shown. This mode of operation is implemented
-/* by executing the \fBpostqueue\fR(1) command. The queue ID string
-/* is followed by an optional status character:
-/* .RS
-/* .IP \fB*\fR
-/* The message is in the \fBactive\fR queue, i.e. the message is
-/* selected for delivery.
-/* .IP \fB!\fR
-/* The message is in the \fBhold\fR queue, i.e. no further delivery
-/* attempt will be made until the mail is taken off hold.
-/* .RE
+/* by executing the \fBpostqueue\fR(1) command.
/* .IP \fBnewaliases\fR
/* Initialize the alias database. If no input file is specified (with
/* the \fB-oA\fR option, see below), the program processes the file(s)
msg_warn("SMTPD access map %s has entry with lookup table: %s",
table, value);
msg_warn("do not specify lookup tables inside SMTPD access maps");
- msg_warn("define a restriction class and specify its name instead");
+ msg_warn("define a restriction class and specify its name instead.");
longjmp(smtpd_check_buf, smtpd_check_reject(state, MAIL_ERROR_SOFTWARE,
"451 Server configuration error"));
}
int var_maps_rbl_code;
int var_access_map_code;
int var_reject_code;
+int var_defer_code;
int var_non_fqdn_code;
int var_smtpd_delay_reject;
int var_allow_untrust_route;
VAR_MAPS_RBL_CODE, DEF_MAPS_RBL_CODE, &var_maps_rbl_code,
VAR_ACCESS_MAP_CODE, DEF_ACCESS_MAP_CODE, &var_access_map_code,
VAR_REJECT_CODE, DEF_REJECT_CODE, &var_reject_code,
+ VAR_DEFER_CODE, DEF_DEFER_CODE, &var_defer_code,
VAR_NON_FQDN_CODE, DEF_NON_FQDN_CODE, &var_non_fqdn_code,
VAR_SMTPD_DELAY_REJECT, DEF_SMTPD_DELAY_REJECT, &var_smtpd_delay_reject,
VAR_ALLOW_UNTRUST_ROUTE, DEF_ALLOW_UNTRUST_ROUTE, &var_allow_untrust_route,
helo 1..2.3.4
helo .1.2.3.4
helo 1.2.3.4.5.
+#
+# The defer restriction
+#
+defer_code 444
+helo_restrictions defer
+helo foobar
>>> helo_restrictions permit_naked_ip_address,reject_invalid_hostname,reject_unknown_hostname
OK
>>> helo 123.123.123.123
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
OK
>>> #
>>> # Test the sender restrictions
>>> helo_restrictions permit_naked_ip_address,reject_non_fqdn_hostname
OK
>>> helo [1.2.3.4]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
OK
>>> helo [321.255.255.255]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[321.255.255.255]>: Helo command rejected: invalid ip address; from=<foo>
501 <[321.255.255.255]>: Helo command rejected: invalid ip address
>>> helo [0.255.255.255]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[0.255.255.255]>: Helo command rejected: invalid ip address; from=<foo>
501 <[0.255.255.255]>: Helo command rejected: invalid ip address
>>> helo [1.2.3.321]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[1.2.3.321]>: Helo command rejected: invalid ip address; from=<foo>
501 <[1.2.3.321]>: Helo command rejected: invalid ip address
>>> helo [1.2.3]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[1.2.3]>: Helo command rejected: invalid ip address; from=<foo>
501 <[1.2.3]>: Helo command rejected: invalid ip address
>>> helo [1.2.3.4.5]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[1.2.3.4.5]>: Helo command rejected: invalid ip address; from=<foo>
501 <[1.2.3.4.5]>: Helo command rejected: invalid ip address
>>> helo [1..2.3.4]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[1..2.3.4]>: Helo command rejected: invalid ip address; from=<foo>
501 <[1..2.3.4]>: Helo command rejected: invalid ip address
>>> helo [.1.2.3.4]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[.1.2.3.4]>: Helo command rejected: invalid ip address; from=<foo>
501 <[.1.2.3.4]>: Helo command rejected: invalid ip address
>>> helo [1.2.3.4.5.]
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <[1.2.3.4.5.]>: Helo command rejected: invalid ip address; from=<foo>
501 <[1.2.3.4.5.]>: Helo command rejected: invalid ip address
>>> helo 1.2.3.4
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
OK
>>> helo 321.255.255.255
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <321.255.255.255>: Helo command rejected: invalid ip address; from=<foo>
501 <321.255.255.255>: Helo command rejected: invalid ip address
>>> helo 0.255.255.255
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <0.255.255.255>: Helo command rejected: invalid ip address; from=<foo>
501 <0.255.255.255>: Helo command rejected: invalid ip address
>>> helo 1.2.3.321
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <1.2.3.321>: Helo command rejected: invalid ip address; from=<foo>
501 <1.2.3.321>: Helo command rejected: invalid ip address
>>> helo 1.2.3
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <1.2.3>: Helo command rejected: invalid ip address; from=<foo>
501 <1.2.3>: Helo command rejected: invalid ip address
>>> helo 1.2.3.4.5
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <1.2.3.4.5>: Helo command rejected: invalid ip address; from=<foo>
501 <1.2.3.4.5>: Helo command rejected: invalid ip address
>>> helo 1..2.3.4
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <1..2.3.4>: Helo command rejected: invalid ip address; from=<foo>
501 <1..2.3.4>: Helo command rejected: invalid ip address
>>> helo .1.2.3.4
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <.1.2.3.4>: Helo command rejected: invalid ip address; from=<foo>
501 <.1.2.3.4>: Helo command rejected: invalid ip address
>>> helo 1.2.3.4.5.
+./smtpd_check: warning: restriction permit_naked_ip_address is deprecated. Use permit_mynetworks instead
./smtpd_check: reject: HELO from foo[131.155.210.17]: 501 <1.2.3.4.5.>: Helo command rejected: invalid ip address; from=<foo>
501 <1.2.3.4.5.>: Helo command rejected: invalid ip address
+>>> #
+>>> # The defer restriction
+>>> #
+>>> defer_code 444
+OK
+>>> helo_restrictions defer
+OK
+>>> helo foobar
+./smtpd_check: reject: HELO from foo[131.155.210.17]: 444 <foobar>: Helo command rejected: Try again later; from=<foo>
+444 <foobar>: Helo command rejected: Try again later
select_bug: select_bug.c $(LIB)
$(CC) $(CFLAGS) -o $@ $@.c $(LIB) $(SYSLIBS)
-translit: $(LIB) $@.o
+translit: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-fsspace: $(LIB) $@.o
+fsspace: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-exec_command: $(LIB) $@.o
+exec_command: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-make_dirs: $(LIB) $@.o
+make_dirs: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-mac_parse: $(LIB) $@.o
+mac_parse: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-vstream_popen: $(LIB) $@.o
+vstream_popen: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-fifo_trigger: $(LIB) $@.o
+fifo_trigger: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-doze: $(LIB) $@.o
+doze: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-mac_expand: $(LIB) $@.o
+mac_expand: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-watchdog: $(LIB) $@.o
+watchdog: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-unescape: $(LIB) $@.o
+unescape: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-hex_quote: $(LIB) $@.o
+hex_quote: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-name_mask: $(LIB) $@.o
+name_mask: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-rand_sleep: $(LIB) $@.o
+rand_sleep: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-sane_time: $(LIB) $@.o
+sane_time: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-ctable: $(LIB) $@.o
+ctable: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-inet_addr_list: $(LIB) $@.o
+inet_addr_list: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-attr_print64: $(LIB) $@.o
+attr_print64: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-attr_scan64: $(LIB) $@.o
+attr_scan64: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-base64_code: $(LIB) $@.o
+base64_code: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-attr_print0: $(LIB) $@.o
+attr_print0: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
-attr_scan0: $(LIB) $@.o
+attr_scan0: $(LIB)
mv $@.o junk
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
mv junk $@.o
diff attr_scan0.ref attr_scan0.tmp
rm -f attr_scan0.tmp
-DB_TYPE = `../postconf/postconf -h default_database_type`
-
dict_test: dict_open testdb dict_test.in dict_test.ref
rm -f testdb.db testdb.dir testdb.pag
- ../postmap/postmap -N testdb
- ./dict_open $(DB_TYPE):testdb write < dict_test.in > dict_test.tmp 2>&1
+ ../postmap/postmap -N hash:testdb
+ ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
diff dict_test.ref dict_test.tmp
- ../postmap/postmap -n testdb
- ./dict_open $(DB_TYPE):testdb write < dict_test.in > dict_test.tmp 2>&1
+ ../postmap/postmap -n hash:testdb
+ ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
diff dict_test.ref dict_test.tmp
rm -f testdb.db testdb.dir testdb.pag dict_test.tmp