Milter can now update its own macros instead of clobbering
the global copy that is shared with other Milters. Also an
opportunity to clean up some ad-hoc code for sending macro
- lists from smtp(8) to cleanup(8). Files: milter/milter.c,
+ lists from smtpd(8) to cleanup(8). Files: milter/milter.c,
milter/milter8.c, milter/milter_macros.c.
20071224
milter/milter.c, milter/milter8.c, milter/milter_macros.c.
Cleanup: name_code(3) and name_mask(3) now support read-only
- tables. Files: util/name_code.[hc] util/name_mask.[hc].
+ tables. Files: util/name_code.[hc], util/name_mask.[hc].
+
+20071227
+
+ Cleanup: further refinements of the Milter code, allowing
+ for multiple macro overrides. The code is now ready for
+ serious testing. File: milter/milter8.c.
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20071224"
+#define MAIL_RELEASE_DATE "20071227"
#define MAIL_VERSION_NUMBER "2.5"
#ifdef SNAPSHOT
/*
* Mapping from external macro set numbers to our internal MILTER_MACROS
- * structure members, without using an array or switch statement.
+ * structure members, without using a switch statement.
*/
static const size_t milter8_macro_offsets[] = {
offsetof(MILTER_MACROS, conn_macros), /* SMFIM_CONNECT */
&& milter8_read_data(milter, &data_len,
MILTER8_DATA_HLONG, &mac_type,
MILTER8_DATA_STRING, buf,
- MILTER8_DATA_END) == 0) {
+ MILTER8_DATA_MORE) == 0) {
smfim_name = str_name_code(smfim_table, mac_type);
if (smfim_name == 0) {
msg_warn("milter %s: ignoring unknown macro type %u",
#endif
} else if ((fd = LOCAL_RECV_FD(vstream_fileno(stream))) < 0) {
FREE_MACROS_AND_RETURN(0);
+ } else {
#ifdef MUST_READ_AFTER_SENDING_FD
- } else if (attr_print(stream, ATTR_FLAG_NONE,
+ (void) attr_print(stream, ATTR_FLAG_NONE,
ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
- ATTR_TYPE_END) != 0) {
- FREE_MACROS_AND_RETURN(0);
+ ATTR_TYPE_END);
#endif
- } else {
#define NO_PROTOCOL ((char *) 0)
if (msg_verbose)