43be008 Jan 3, 2003
520 lines (340 sloc) 17.1 KB
2001-02-01 Bruce Guenter <>
* src/ (send_all): If sending the file fails, skip to the
next file instead of aborting sending completely.
2000-12-29 Bruce Guenter <>
* Released version 1.00RC5
2000-10-05 Bruce Guenter <>
* lib/ Fixed the prototype for getdomainname.
2000-10-02 Bruce Guenter <>
* protocols/ (docmd): Return proper error codes for
permanent and temporary SMTP failures.
2000-08-28 Bruce Guenter <>
* Released version 1.00RC4
* lib/ (RULE(domain)): Modified to handle (and strip) a
trailing period in the domain name.
2000-08-15 Bruce Guenter <>
* lib/ (getnames): Added an extern declaration of
getdomainname for systems that don't declare it.
2000-08-10 Bruce Guenter <>
* Released version 1.00RC3
* src/ (read_header): Fixed header parsing logic.
2000-08-07 Bruce Guenter <>
* src/ Treat the first non-header line as the first line
of the body.
* src/ Ignore the -L option (set the identifier for
syslog messages).
2000-07-12 Bruce Guenter <>
* src/ Added code to handle buggy named pipes that require
both a reader and a writer to be opened simultaneously.
* lib/ (tcpconnect): AF_INET should have been PF_INET
in call to socket. Also, the sin_family needed to be set to
2000-07-03 Bruce Guenter <>
* lib/ (getnames): Fixed typo that caused systems
without "domainname" in struct utsname to fail to compile.
2000-06-28 Bruce Guenter <>
* Released version 1.00RC2
* lib/ (getnames): Changed the logic here to append the
domain name to the node name to produce the fully qualified host
name if the node name does not already contain the domain name.
* protocols/ Changed all the calls to smtp::docmd to use
the start of the range instead of the expected response. This may
have been causing some SMTP sessions to fail.
2000-06-19 Bruce Guenter <>
* lib/ (tcpconnect): Removed an extraneous const from
the call to connect.
2000-06-15 Bruce Guenter <>
* Released version 1.00RC1
* Fixed up copyright notices in all the sources.
* lib/ (make_date): Totally reworked the logic here if
tm_gmtoff is detected to fix timezone and DST detection bugs.
2000-01-11 Bruce Guenter <>
* Released version 0.40
* lib/ Fixed up to autodetect (with the help of
configure) the tm_isdst and tm_gmtoff flags in struct tm.
2000-01-11 Bruce Guenter <>
* lib/ Reordered the include files here to avoid
problems with FreeBSD headers.
2000-01-10 Bruce Guenter <>
* lib/ Renamed isspecial to issymbol to avoid problems
on FreeBSD caused by an existing "isspecial" macro.
* src/ (cli_main): Fixed typo that caused parseargs to
not be called.
1999-10-22 Bruce Guenter <>
* protocols/ (cli_main): Use the already opened FD to
load the message from instead of opening it.
* src/ (send_one): Open the named file for writing before
attempting to send message, and pass it to exec_protocol.
(exec_protocol): Dup the open message to FD 0 before executing
1999-10-21 Bruce Guenter <>
* Released version 0.39
* lib/list.h: Added a const_list_iterator, as well as a copy
constructor for list<T>.
1999-10-20 Bruce Guenter <>
* src/ (parse_line): Added test for non-RFC header lines
(ie lines starting with anything except a sequence of
non-whitespace characters follows by a colon).
(read_header): Test if the first header line is a continuation
line and fail if so.
* src/ (load_remotes): Fixed parsing of "remotes" control
file to allow any whitespace between, before, and after elements,
as well as to handle lines starting with a '#' as comments.
1999-10-04 Bruce Guenter <>
* Released version 0.38
* src/ (load_config): Don't fail reading the configuration
if pausetime can't be read.
1999-09-23 Bruce Guenter <>
* Released version 0.37
* lib/ (RULE(route_spec)): Made the "phrase" optional to
allow addresses like "<foo@bar>" (note, no comment) to be parsed.
1999-09-16 Bruce Guenter <>
* src/ (send_all): Load the config each time the queue is
(do_select): Removed the logic here to handle reloading the config
on HUP, since it's reloaded all the time.
(load_files): Removed the 'stat' on the queue directory as an
indicator of if it needs to be rescanned, and made the contents
reloaded always.
(do_select): Force a reload of the queue if the select times out.
1999-09-11 Bruce Guenter <>
* Released version 0.36
* src/ Rewrote to use the CLI library.
* src/ Rewrote to use the CLI library.
* protocols/ Rewrote to use the CLI library.
1999-09-02 Bruce Guenter <>
* Released version 0.35
1999-08-26 Bruce Guenter <>
* src/ (remote): Parse options from the string.
(load_remotes): Handle options after the protocol name.
(exec_protocol): Build an argument list including options.
* protocols/ (parse_args): Added support for a port
* protocols/ Adapted to use generic interface.
* protocols/ Adapted to use generic interface.
* protocols/ (main): Started writing a generic protocol
library, which will open the message file and determine a port
* src/ (load_files): Stat the queue before opening it to
see if the contents have changed.
1999-07-22 Bruce Guenter <>
* lib/ (getnames): Switched the implementation of
domainname and hostname to use uname(2). This fixes a problem
observed with empty domain names.
1999-07-16 Bruce Guenter <>
* lib/ Rewrote this parsing framework to do a top-level
tokenization before parsing, and then parse based on those
1999-07-15 Bruce Guenter <>
* Imported latest mystring and fdbuf libraries, and adapted the
rest of the code to call the new routines.
1999-03-30 Bruce Guenter <>
* Integrated new modularized mystring library from vmailmgr.
1999-03-27 Bruce Guenter <>
* Released version 0.33
* src/ (copyenv): Only do the envelope remapping on
recipient addresses.
* lib/ Wrote test code for the list class (not
compiled, but included in the distribution).
* lib/list.h (remove): Fixed (hopefully) the code to advance the
prev/curr pointers after removing a node.
* src/ (catchsender): Removed an extraneous return line.
* doc/nullmailer-queue.8: Updated to describe the admin address
* src/ (main): Load in the "admin" address and localhost
to determine how to remap addresses.
If the hostname is localhost, remap this address to the admin
1999-03-04 Bruce Guenter <>
* Released version 0.32
* lib/ (unquote): Wrote this routine to remove quoting
and escaped characters from a string.
(quote): Wrote this routine to add necessary quoting and escaping
to addresses.
(RULE(quoted_string)): Unquote strings before returning them.
Modified many other routines to handle unquoting.
1999-02-25 Bruce Guenter <>
* Released version 0.31
* (install-root): Neede to make nullmailer-queue
setuid nullmail here.
* HOWTO: Added a quick guide to getting nullmailer running.
1999-02-23 Bruce Guenter <>
* Released version 0.30
* src/ (struct header_field): Do not empty the recipient
list when a resent field is seen if header recipients are being
* doc/nullmailer-inject.1: Adjusted the section on setting the
host name to account for the below change.
* src/ (setup_from): Set the host name to defaulthost
instead of hostname(), and canonicalize host and shost before
using them.
* lib/ (fdbuf_copy): Added an initial EOF test and
moved the loop's EOF test to the end of the loop.
1999-02-22 Bruce Guenter <>
* src/ (send_body): Removed the test to see if fin is at
EOF before calling fdbuf_copy.
* lib/ (fdbuf_copy): Revised loop termination
condition from in.last_count() == 0 (which could happen at EOF) to
!in.eof() (since EOF is not an error condition).
* Released version 0.29
* src/ Fixed a number of offsets in the header_has_* and
header_field_* declarations.
* doc/nullmailer-inject.1: Modified the documentation to describe
the "-n" (do not queue) and "-v" (show envelope) flags.
* src/ Added handling for flags to print out the message
and optionally the envelope instead of queueing the message.
* src/ (parseargs): Added a whole long list of sendmail
flags to ignore.
* lib/ (RULE(route)): fixed missing pointer advance
1999-02-21 Bruce Guenter <>
* test/ Moved this testing code out of the main source code module.
1999-02-20 Bruce Guenter <>
* lib/ (RULE(address)): Reversed order of group and
(RULE(phrase)): Fixed the extra trailing space added by this rule
along with cleaning up how this rule works.
(RULE(mailboxes)): Added this rule, a parallel of addresses, for
use in group.
(RULE(group)): Fixed several bugs in this rule.
1999-02-19 Bruce Guenter <>
* lib/ (RULE(quoted_string)): Fixed inclusion of quotes
in quoted addresses.
(TEST_ADDRESS): Added in a self-test framework
(RULE(comment)): fixed missing comment carry-through
(RULE(group)): fixed missing comment insertion
(RULE(addresses)): fixed missing comment insertion
(RULE(local_part)): forgot to advance pointer if a comment was
(RULE(domain)): forgot to advance pointer after SKIPDELIM
(RULE(addr_spec)): forgot to advance pointer after SKIPDELIM
1999-02-18 Bruce Guenter <>
* Released version 0.28
* src/ (main): Pass "-e" to inject (use either) instead
of "-a" (use args only) if sendmail was not passed a "-t",
otherwise pass "-b" (use both) instead of "-h" (use header only).
* spec: Fixed the useradd part of this script to add the
"nullmail" user instead of "$1".
* init: Reworked large parts of this script to make it work on my
* src/ (read_trigger): Modified behavior of this routine to
read a chunk of data from the trigger before closing it. This
prevents the trigger from being "pulled" after it's been reopened.
* src/ Prefixed all error messages with "sendmail:".
* src/ (setup_from): Added code to handle the "c" flag --
use "address (comment)" style in the generated from line instead
of "comment <address>".
(exec_queue): Fixed error message to print out the actual value of
SBIN_DIR, plus prefixing the message with "nullmailer-inject".
* Released version 0.27
* src/ (main): Whoops -- write should have been writeln.
* protocols/ Completed (with minimal testing) the QMQP
* lib/ (fdbuf_copy): Added a "noflush" option to make
calling flush on the output fdbuf optional.
* lib/ (make_date): Fixed bug: neglected to
NUL-terminate the timezone string.
* lib/ (canonicalize): Moved this function out of
* lib/ (errorstr): Added some new error codes
* lib/ (getchar): Wrote this routine to read in a single
(getnetstring): Wrote this routine to read in a netstring
* lib/ (strnl2net): Wrote this routine that converts a
string plus a newline character into a netstring. This avoids an
extra memory allocation and copy to do the concatenation before
making the netstring.
* protocols/ Started a QMQP protocol module.
* lib/ (str2net): Wrote this routine to convert
strings into netstrings (for details, see
* protocols/ (main): Moved the message file open above the
connection to avoid making a connection if the file is unreadable.
* lib/ (rewind): Wrote this routine to rewind an open
* src/ (make_recipient_list): Completed code to handle
the "t" flag.
* doc/nullmailer-inject.1: Added section describing the parsing of
the NULLMAILER_FLAGS environment variable.
* src/ (struct header_field): Added code to handle fields
that are ignored.
(fix_header): Added preliminary code to add in a missing to field.
(parse_flags): Wrote this routine to handle the NULLMAILER_FLAGS
environment variable.
(parse_args): Added a call to parse_flags.
1999-02-17 Bruce Guenter <>
* Released version 0.26
* Moved, address.h, into lib.
1999-02-16 Bruce Guenter <>
* src/ (deliver): Fixed unique filename generator to call
itoa only once per constructor, and to avoid calling time() and
getpid() more than necessary.
* src/ (exec_protocol): Stripped out the error messages
printed in this routine, since they go nowhere anyways.
(send_one): Added tracing information about program execution.
* src/ (make_messageid): Can't have two calls to itoa
as arguments to the same function call (mystring constructor in
this case) because itoa uses a static buffer.
* src/ (exec_queue): Execute nullmailer-queue from
* lib/defines.h: Added a definition for SBIN_DIR.
1999-02-15 Bruce Guenter <>
* Released version 0.25
* doc/nullmailer-send.8: Updated the documentation to reflect the
new parsing code for "remotes".
* src/ (make_messageid): Changed the format of the
message-id string to make it easier to generate and more unique.
(make_date): Fixed timezone number generator code.
* lib/ (itoa): Fixed bug in padding code that caused the
string to be padded with unending NUL bytes instead of zeros.
* lib/ (config_readlist): Modified to strip all
the lines that are read in, to ignore lines that start with a
pound ('#') or are empty, and to return false if no lines were
* lib/ (config_read): Modified to strip the
resulting string.
* lib/ Revised lstrip, rstrip, and strip to return
*this if no modifications to the string were necessary.
* src/ (load_config): Rewrote the logic of this routine to
always load all the config files, and moved the loading of the
remotes into a separate section.
(load_remotes): Added support for loading "hostname protocol"
pairs from the remotes file.
* protocols/ (main): Filename is argv[2], not argv[1].
* src/ (RULE(local_part)): Fixed another pointer
increment bug.
* src/ (main): Moved check for no recipients into here.
1999-02-14 Bruce Guenter <>
* lib/ Fixed a problem that could cause
nullmailer-inject (and possibly others) to core dump on exit.
* src/ (send_body): Fixed bug that caused transmission of
an empty body (legal) to nullmailer-queue to fail.
(read_header): Added a check to ensure that at least one recipient
was given.
1999-02-13 Bruce Guenter <>
* src/ Rewrote the portion of this code that executes the
protocol program to not do a connect, and to expect a numerical
error code from the exit status of the program. Also implemented
a configurable pause between queue runs.
* protocols/ Rewrote this module extensively. It now
expects the hostname as the first command-line parameter and the
filename as the second, and returns a single error code (no
text error messages and no pipes).
1999-02-12 Bruce Guenter <>
* src/ (RULE(domain)): Fixed pointer increment bug in
this rule.
* doc/nullmailer-inject.1: Updated to reflect status of
configuration variable reading.
* src/ (make_messageid): Use idhost instead of
* src/ (read_config): Read the defaultdomain,
defaulthost, and idhost config files.
* src/ (canonicalize): Use the defaulthost and
defaultdomain strings, declared in src/, instead of
hostname() and domainname().
* src/ Added code to parse the command line options as
documented in the man page.
1999-02-11 Bruce Guenter <>
* Released version 0.22
* src/ Completed the basics of this program.
* doc/nullmailer-inject.1: Filled in the DESCRIPTION a little bit.