www.jetmore.org/john/code

Nothing's guaranteed. If it breaks it's not my fault. All programs have
usage information available through --help option.
 
bak - low cognitive-load file archiving
exipick - display messages from Exim queue based on a variety of criteria
exixpand - An overlay for Exim string expansion testing (exim -be) providing history, command editing, and macro expansion
gen-auth - generate and decode SMTP authentication strings (PLAIN, LOGIN, CRAM-MD5, SPA)
parse-ipod-db - display info on music in iPod DB (unsupported)
myclear - clear to bottom of terminal instead of top
rand - generate random numbers for scripts
swaks - Swiss Army Knife SMTP

bak - low cognitive-load file archiving (latest version)

TODO
- 20030422 work w/ directories, too...
- 20030422 work across file systems?

Version History 20030322.0
* 19990415 initial implementation
* 20021028 changed #! line from /local to /usr
* 20021028 rewritten 3.5 years later
             - ensures files exist
             - mkdirs bak dir rel to file, rather than CWD
             - preserves file attrs (owner, grp, mode)
             - better error checking
             - suffix from .# to .YYYYMMDD.#
             - changed to 'use strict';
* 20021104 added -p option to select path for save dir.  By default it
           uses the same path as the argument
* 20021104 added -d option to specify name of save dir.  By default it
           uses 'bak'
* 20021104 added -n option to add one line note to comment file
* 20021104 added -c option to add multiline comment to comment file
* 20021104 added better error checking
* 20021202 added ext_usage function for --help
* 20021202 started filling in info for detailed --help option
* 20021223 added -n and -c options to usage strings
* 20021223 changed behaviour of comment strings.  Now the comments
           go into <file>.note (not <file>.<dstr>.<s>.note
* 20021223 changed default save location to BAK (from bak)
* 20021223 finished --help screen
* 20021226 added -a option
* 20021226 .note file now gets created w/ x bits masked off.
* 20021226 added "0" entry for exit status in --help
* 20021226 moved from usage() model to mexit() model
* 20030322 added --version, moved --help to POD

exipick - display messages from Exim queue based on a variety of criteria (latest version)
If you would like to receive email notifications when new versions are released, please send an email to updates-exipick@jetmore.net

TODO

Version History 20100104.1
* 20070628 updated copyright to 2007
* 20070628 added support for $max_received_linelength (4.68-PH/11)
* 20071217 added header_path and data_path variables,haven't documented
* 20080422 fixed documentation bug regarding behavior of -r and -f
* 20100104 fixed doc type, exim bug 942, reported by andreas
* 20100104 updated copyright date to 2010
* 20100104 documented data_path and header_path variables
20061117.2
* 20061016 implemented $h_ shortcuts for $header_ variables
* 20061017 re-implemented header parsing.  Processing of h_*,
           message_headers, reply_address, and received_count is now
           defered until var is actually requested
* 20061017 implemented rh_* and bh_*, and reimplemented h_* vars
           to match spec. I'm 100% sure rh_ is right, I'm pretty
           sure bh_ is right, and I feel pretty good about h_.  Perl
           Encode module is required to translate between character sets
* 20061017 created --charset option to override default local charset
* 20061017 made $message_headers match spec definition and implemented
           new var $message_headers_raw as per 4.64-PH/13
> 20061017 released 20061017.1-dev to exim-users@exim.org
* 20061019 explicitly pre-set a couple of boolean vars to "0" to match
           exim's behaviour
* 20061019 added --just-vars option to aid debugging
* 20061116 processing was allowed to go on too long when a criterion
           was found to be invalid resulting in non-sensical errors.
* 20061116 20061107 numeric operators did not handle negative values
           correctly
* 20061117 added and documented $message_body_missing variable
* 20061117 added and documented $received_ip_address and
           $received_port (4.64-PH/43)
* 20061117 punted on h_ vars.  rh_ and bh_ match exim behavior, h_
           always matches bh_ (like exim w/ no iconv support) until
           I can figure out how to make perl and exim match
* 20061117 rejiggered bh_ and h_ line endings to match new
           behavior in 4.64-PH/27
20060919.0
* 20060919 changed spool reading code to handle arbitrary acl_ 
           variables (4.64-PH/09)
* 20060919 an args starting with '^' supplied to --show-vars is now
           a regular expression applied against all variable names.
           Variable names matching will be displayed.
* 20060919 fixed getopt declaration to make args to some options
           required, not optional (--spool, -f, -r, -s, -y, -o,
           --sort, --freeze, --thaw, --show-vars)
20060721.2
* 20060606 added --reverse option (and -R for exiqgrep compatibility)
* 20060606 added --random option
* 20060609 added --size option
* 20060622 Updated FSF address in GPL notice
* 20060623 implemented and documented --sort option
* 20060623 changed guts of Exim::SpoolFile::print_message to
           Exim::SpoolFile::format_message and made print_message
           a wrapper call to format_message
* 20060623 reimplemented --sort, storing output from format_message
           instead of using IO::Scalar/tie/untie method, which
           was slower than I'd like.
* 20060721 format_message/print_message change 0n 6/23 introduced
           bug where -i no longer worked.  fixed.
* 20060721 removed requirement for IO::Scalar left over from
           previous --sort implementation
* 20060721 added --not to negate all tests
* 20060721 redid --help text to hopefully be more clear.  added
           ToolExipick and ToolExipickManPage pages to wiki.  Added
           link to ToolExipickManPage in exim spec
20060307.1
* 20060216 20050728 added --unsorted to enable unsorted output in
           all output formats (previously only available via exim
           options -bpr, -bpru, and -bpra)
* 20060222 added --freeze and --thaw methods
* 20060223 documented --freeze and --thaw
* 20060223 added and documented ! operator to negate entire criteria.
* 20060223 fixed bug where -bpc and -c didn't work w/ --freeze
* 20060223 performance enhancements (11.5% reduction in execution
           time from previous version)
* 20060302 (done 20060224) checkin more perf enhancement (~24%
           from initial review)
20060216.1
* 20060216 removed parentheses from 'next' and 'last' calls that
           specified labels.  This cause compilation failure on
           older perls (5.005_03 specifically)
* 20060216 refactored code to remove -w error on deprecated split
           usage in new-ish perls
* 20060216 updated copyright year
* 20060216 20050701 -bpc always showed count of all messages on
           queue.  Changed to only show those matching criteria
20051215.3
* 20051215 fixed --show-vars/-b bug ("Vars:" was shown regardless
           of whether --show-vars was used);
* 20051215 made var retrieval using get_var() caseless
* 20051215 added support for new -aclc and -aclm spool format
           introduced in 4.61-PH/06
20050802.0
* 20050802 added message_exim_id var (4.53-PH/04)
20050604.1
* 20050604 20050516 fixed so eq/ne crit can use quotes on the value
           if you want (kept doing it out of habit)
* 20050604 20050603 documented --flatq, --show-vars, --show-tests
* 20050604 20050603 documented --show-vars, confirmed working status
* 20050604 implemented new var shown_message_size and documented
* 20050604 finally implemented exiqgrep's -s option and documented
* 20050604 fixed --show-vars to display in the order specified
* 20050604 20050603 made --show-vars work w/ -i, --flatq, -b
* 20050604 noted in docs $received_time is now a std var as of 4.51
* 20050604 fixed login/uid/gid parsing per exim change 4.51-PH/34
* 20050604 add variable message_linecount (4.51-PH/41)
20050225.0
* 20050117 set $| to unbuffer STDOUT
* 20050223 updated copyright date to 2005
* 20050223 Fixed spool file reading of login/uid/gid line per
           exim ChangeLog 4.50/80
* 20050223 added $host_lookup_deferred, $smtp_active_hostname,
           $spam_score, $spam_score_int, $bmi_verdicts (exim-4.50)
* 20050224 actually added $spam_score this time
* 20050225 added --show-tests option to show criteria exactly as they
           are processed against each message
* 20050225 added $each_recipients, $each_recipients_del and
           $each_recipients_undel pseudo vars
* 20050225 in documentation, mark every variable with a $ to make it
           easier to read.  Other doc cleanups.
* 20050225 reformatted some of the code for easier reading
20041110.0
* 20041102 added optimization when searching for specific message_id
* 20041103 changed '=' op to be caseless by dafault, added --caseful
           option to change this back to old behavior.
* 20041110 fixed recipients_del POD to note that it includes
           generated addrs
* 20041110 added variables recipients_{del,undel}_count
20040725.0
* 20040301 doc fixes (just stupid typos)
* 20040422 added --show-rules opt to display compiled rules
* 20040422 fixed bug in compilation regexps.  caused 'recipients =
           domain.net' to parse as var = 'recipients = domain.' and
           cmp = '("$var" ne "t") ? 1 : 0'
* 20040724 added $body_zerocount, $allow_unqualified_recipient,
           $allow_unqualified_sender (exim-4.41)
20040221.0
* 20040220 added f, r, y, o, z, x, c, l, i, b options to mimic
           interface to exiqgrep
* 20040220 added --flatq option (I hate exiqgrep's -b output)
* 20040221 documented new options
* 20040221 added and documented -show-vars option
20040104.2
* 20031229 started building Exim::HeaderFile module internally, got
           loose structure and started figuring out how to parse hdr
* 20031229 finished header parsing, started modeling how to access data
* 20031231 finished rough model of module and program
* 20031231 reworked module to handle multiple messages per instance
* 20031231 add on-demand body loading
* 20031231 implemented message_body_size and message_size
* 20040101 fix to read headers > 999 bytes
* 20040101 better handling of messages which disappear (get delivered)
* 20040101 fixed calc for message_size to match exim's method
* 20040101 reworked criteria processing to support multiple types
* 20040102 changed output to match exim's if -D file missing
* 20040102 allow M/K, d/h/m suffixes on numeric comparisons
* 20040102 changed Exim::HeaderFile to Exim::SpoolFile
* 20040102 fixed misc bugs in criteria processing
* 20040102 fixed recipient parsing to handle multiple styles of listing
* 20040102 added meaningful error framework to Exim::SpoolFile
* 20040102 added release framework
* 20040102 added -spool, -bp, -bpa, -bpc, -bpr, -bpra, -bpru, -bpu opts
* 20040102 fixed bug w/ multiple criteria using same variable
* 20040102 added -and and -or to specify type of processing
* 20040102 fixed bug in calculation of received_count
* 20040104 wrote --help POD
* 20040104 fixed stupid bug in -bpc calculation
* 20040104 changed deliver_firsttime to first_delivery and
           deliver_manual_thaw to manually_thawed
* 20040104 allow variably cased criteria vars (to allow header_To, etc)
* 20040104 add originator_login to output when applicable

exixpand - An overlay for Exim string expansion testing (exim -be) providing history, command editing, and macro expansion (latest version)

TODO
- 20040421 need to handle wrapped lines better
- 20040422 do .commands need to be added to history
- 20040422 how do history and multiline editing work together?
- 20040521 should somehow keep track of MACROs, also.  possibly
           a little harder because we don't get the $ leader?
- 20040715 catch ^C as a line-clearer (EOT to exit)
- 20041124 use IPC::Open3 to talk to exim.  wrap in a timer to
           handle deadlock issues

Version History 20050922.1
* 20040421 built basic wrapper w/ history support
* 20040421 added .track, .untrack, and .showvar commands for doing
           internal variable interpolation
* 20040421 started adding support for header variables
* 20040421 added warning for unrecognized commands
* 20041125 added docs
* 20041125 moved quit|exit to .quit|.exit
* 20050922 updated copyright
* 20050922 updated/moved/commented exim binary path

gen-auth - generate and decode SMTP authentication strings (PLAIN, LOGIN, CRAM-MD5, SPA) (latest version)
If you would like to receive email notifications when new versions are released, please send an email to updates-gen-auth@jetmore.net

TODO

Version History 20060620.0
* 20040315 added rce and rcd methods
* 20040316 added and documented encrypt and saltencrypt methods
* 20040316 added -s option to suppress echo on all inputs
* 20040316 added wcsencode and wcsdecode methods
* 20041110 added md5-hex and md5-base64 methods
* 20060201 updated copyright date from 2003 to 2006
* 20060201 rewrote (simplified) get-digest().
* 20060201 added and documented CRAM-SHA1 support
* 20060430 added rot13 support
* 20060430 adde atbash support (needed it for google/davinci game)
* 20060620 added and documented APOP support (contributed by
           anthonyu#killa.net)
* 20060620 general doc revisions for format, typos, etc.  Documented
           previously undocumented methods rot13, atbash
* 20060620 change license to straight GPL
* 20060620 implemented and documented HTTP-BASIC
20031101.2
* 20031101 fixed bug in NTLM (worked w/ exim but not communigate)
20031027.2
* 20031027 reworked command line/stdin processing to be more unified
* 20031027 allow '<>' as args on command line meaning empty string
* 20031027 made Digest::MD5 required only for CRAM-MD5, exit cleanly
           if not found
* 20031027 added NTLM/SPA/MSN authentication (using Authen::NTLM)
* 20031027 updated --help text
20030322.1
* 20030322 unique exit status for unrecognized type
* 20030322 added --help, --version, made release compliant
* 20030322 turned off extraneous printing in CRAM-MD5
* 20030322 changed to allow case-insensitive type specifications
20030312.0
* 20030312 fixed problem with base 64 encoding on lines longer than
           76 chars encoded (~58 plain)
20030310
* 20030310 initial version

parse-ipod-db - display info on music in iPod DB (latest version)

TODO
- 20031027 implement complete DB format as detailed in ACM article.

Version History 20040316.0
* 20040316 placed under the GPL and added comment declaring the 
           script abondonware
20030601.0
* 20030531 initial version

myclear - clear to bottom of terminal instead of top (latest version)

TODO

Version History 20030322.0
* 20030322 added --help, --verion, made release compliant
20030319.0
* 20020514 initial implementation
* 20030122 added ability to use Term::ReadKey (if present) to get
           dimensions of screen.  This means that variable screen
           sizes finally work.  Left old code if ReadKey not installed.
* 20030122 cleaned up the code a bit

rand - generate random numbers for scripts (latest version)

TODO

Version History 20030319.2
* 20030319 added --version, changed --help to use POD
20030319.1
* 20011017 initial implementation
* 20021226 'use strict' compliant
* 20021226 fix $max (defined but not used)
* 20021226 changed default from 0-99 to 1-100.
* 20021226 added usage() function
* 20021226 added and populated ext_usage function
* 20021226 allowed max to be an arbitrary range (x-y means >=x and
           <=y
* 20021226 -s option for specifying srand seed
* 20021226 -n option to specify a number of random nums to produce
* 20021226 option specifying int or float (-f)
* 20021226 added -p option to set precision for float.
* 20021226 option to change default from 0->x-1 to 1->x (-i)
* 20021226 moved from usage() model to mexit() model
* 20030319 changed contact addess to proj-rand

swaks - Swiss Army Knife SMTP; Command line SMTP testing, including TLS and AUTH (latest version)
If you would like to receive email notifications when new versions are released, please send an email to updates-swaks@jetmore.net

TODO
- 20031020 support NTLM natively to prevent namespace confusion
- 20031107 support DIGEST-MD5 natively?
- 20031211 need to come up with better documentation scheme
           since perldoc behaviour varies so much between releases
- 20031217 consider the trust half of TLS (cert verification, etc)

Version History 20061116.0
* 20060622 Updated FSF address in GPL notice
* 20060623 added url to CONTACT section of docs
* 20060718 20050625 added --protocol option.  'esmtp' is default with
           legacy behaviour.  'smtp' only sends HELO, not EHLO.
* 20060718 20050605 added 'lmtp' as a valid protocol
* 20060719 documented all --quit-after synonyms, including new lhlo
           based ones.
* 20060719 documented --protocol option and args, including new
           lmtp protocol
* 20060719 fixed tls/quit-during-second-helo bug introduced by
           addition of --protocol
* 20060719 20050709 TLS options now work on --pipe connections
* 20060724 added and tested local base64 replacements, but haven't
           hooked them in yet (waiting for requirement rewrite)
* 20060803 added and tested load(), but haven't hooked in yet
           (part of requirement rewrite)
* 20060804 20060201 rewrote module support.  Capabilities are checked
           by labels, not with literal modules.  Allows checking
           in main code not to change when behind the scenes
           implementations change.  added avail() and avail_err(),
           test_support(), removed load_modules(), try_load().  Also
           some speed gains because program now only loads modules
           needed for speific invocation - previously preloaded
           every available module, regardless of need.
* 20060804 moved all other modules to conditionally load, as needed.
           This is IO::Socket, IPC::Open2, Time::Local,
           Sys::Hostname, and Getopt::Long.  Time::Local and
           Sys::Hostname are optional (they are not always used,
           and can now be worked around if not available).  IO::Socket
           is now only loaded is doing a socket connection and
           IPC::Open2 only needed for a --pipe session.
* 20060804 added test_support() call to --dump output for testing
* 20060804 changed all base64 calls to use local functions if
           MIME::Base64 isn't available.  Module is still prefered
           due to "many eyes" and speed.  Removed MIME::Base64 from
           auth requirements.
* 20060804 didn't realize eb64 needed to support line endings because
           of use in encoding mime bodies.  Add in feature.
* 20060804 fixed get_date_string() to return a true GMT string, not
           the local time w/ a GMT stamp if date_manip unavailable
* 20060804 redid the REQ docs to reflect current requirements
           and behaviours.
* 20060817 redid --support/avail() again to support concept of
           optional (optimizing) modules for full disclosure in output
* 20060914 added --header option which, if header already exists,
           overwrites it.  Otherwise adds to --add-header processing.
* 20060914 added --header-HEADER option where --h-Text foo is
           a synonym for --header "Text: foo"
* 20060914 removed some extraneous /e opts from body-processing regexps
* 20061010 made AUTH auth_types case insensitive as required in
           rfc2554.  debian bug 392182
* 20061010 fixed bug time bomb with handling legacy AUTH= ESMTP
           lines noticed while addressing the above.
* 20061010 20060914 documented --header and --h-Header options
           (though badly.  I really need to redo the docs)
* 20061011 20061010 --port can now be a service name as well as
           a port number.  Internally, now tries resolve 'smtp' and
           'smtps' services as default ports reverting to old 25/465
           behaviour if those aren't found  
* 20061018 set default port for LMTP to 'lmtp'/24 and documented
* 20061018 implemented groundwork for overloading --protocol with
           broad protocol types.  implemented overload->simple
           protocol mapping, still missing TLS and AUTH mapping
* 20061023 finished implementing protocol overloading (tls and auth)
* 20061115 documented rfc3848 --protocol options and behaviours 
* 20061115 20060806 fixed bug where From: was prompted for on some -q
           types that don't require it, too (Helo: too)
20060621.0
* 20060121 updated copyright to 2006
* 20060121 fiddled w/ --dump output, trying to get every possible
           option displayed (for test suite)
* 20060121 commented out --auth-hide-password option since we aren't
           handling it anyway.  Was undocumented also.
* 20060131 fixed bug in checking for Authen::DigestMD5 when
           trying DIGEST-MD5 auth type (reported by jh.plonk.de)
* 20060201 simplified get_digest() code and allowed different
           digest types to be used
* 20060201 implemented CRAM-SHA1 auth type (suggested jh.plonk.de)
* 20060201 20050909 can now specify -a as a comma delimited list of ok
           types to try, in order of preference
* 20060201 fixed --dump to handle new auth type format
* 20060201 20050909 fixed stupid message 'ANY authentication not
           supported' if no auth type is specified and the server
           doesn't advertise auth
* 20060201 20050721 changed auto sender address generation to try
           to get lowest logged-in user name for the local_part.
           If that method fails, use old method of looking up $<
* 20060201 added --force-getpwuid option to force old method of
           looking up $< to generate sender local part
* 20060201 20050810 fixed stupid inefficiency where both do_smtp_rcpt()
           and caller of do_smtp_rcpt() are handling comma-delim
           recipient list.
* 20060210 20060131 change --pipe to use open2().  This causes child
           stderr not to be handled by swaks - user can redirect
           as desired.  Fixed bug noted by jh.plonk.de
> 20060210 released 20060210.0-dev to jh.plonk.de
* 20060218 swaks choked if server advertised STARTTLS over a
           --tls-on-connect connection.  fixed.  (jpeacock.rowman.com)
* 20060221 20051102 despite some error messages to the contrary,
           swaks did not handle the remote end closing its
           connection unexpectedly.  Fixed transaction routines
           to detect and handle properly.
* 20060221 with io handling on broken connections working better,
           remove the CHLD and PIPE signal handlers so --pipe behaves
           more like sockets
* 20060221 misc code tidying
* 20060221 20060130 if quiting before rcpt and link type is --socket
           or --pipe, do not prompt for recipient.
> 20060221 released 20060221.4-dev to jh.plonk.de
* 20060222 swaks died on SIGPIPE on unexpected disconnect over
           --socket.  fixed.
* 20060307 20050510 added simple implementation of --body, --attach,
           and --attach-type options (debian bug 354084)
* 20060308 --attach/--body tweaks (add closing boundary in mime,
           added ability to use - for multiple body/attach parts,
           allowed --body and --attach to coexist, added docs
           for the three options)
* 20060309 20050406 added --pipeline option
> 20060309 released 20060309.0-dev to exim-users.exim.org
* 20060526 removed old (pre-pipeling) transaction code
* 20060526 added and document --add-header option (debian bug 366317)
* 20060621 added comments to top of code about viewing docs
* 20060621 added note at top and in docs about update email address
20050709.1
* 20050629 fixed bug where latent $@ errors caused socket connections
           to seem to fail (run --socket on a server w/o Net::DNS)
* 20050709 fixed bug where TLS multiline responses were broken if
           sent in multiple packets (reported by
           charlieb.budge.apana.org.au)
20050625.8
* 20050625 fixed bug in do_smtp_tls where it ignored timeout on
           on STARTTLS call
* 20050625 fixed bug where <> not correctly handled for user/pass
* 20050625 cleaned up some unused global vars
* 20050625 moved socket from passed var to part of global link struct
* 20050625 moved tls info from disconnected global vars to link struct
* 20050625 cleaned up lots of orphaned code and trimmed socket passing
* 20050625 moved timeout into link struct and cleaned up code
* 20050625 saved many lines of code by adding do_smtp_quit
* 20050625 moved all connection level into into %G::link very early
* 20050625 20050517 added --pipe option to be able to conduct
           smtp transaction with a child process.  See debian 
           bug ID 309462
* 20050625 fixed a couple of bugs in --auth-optional (one caused it
           not to work at all, the other caused it not to work if 
           either -a not also used or some arg not supplied)
* 20050625 20050605 added --socket option to allow smtp over
           unix domain socket
20050605.3
* 20050605 updated copyright dates
* 20050605 20050510 added OS test on getpwuid to allow running on
           Win32, spent some time evaluating capabilities (reported
           alexander.hass#e-domizil.de)
* 20050605 added portability section to documentation
* 20060605 20040909 the line ending translation was very slow for 
           large files.  fixed.
20040404.1
* 20040404 added --no-data-fixup option to allow a literal DATA
           value to be passed in
* 20040404 by default, translate all bare newlines to CRLF.  Fixed
           Debian bug 241368
* 20040404 updated copyright dates
20040128.1
* 20031226 hostname verification broke FROM and HELO options in -l
           file.  fixed.
* 20040115 fixed some badly formatted POD
* 20040115 added --dump option (show generated options but don't send)
* 20040115 couldn't use -ao to define specific auth type - fixed
* 20040128 fixed doc bug re: default DATA value (sugg. ametzler)
* 20040128 added new quit type of 'first-helo' (for the first helo
           in a STARTTLS session).  Changed HELO type to be second
           helo in a TLS session instead of first.
* 20040128 added error checking for -q opt - error out if unknown val.
           (sugg. ametzler)
* 20040128 added a few -q aliases (ehlo, first-ehlo, starttls, from, to)
* 20040128 if -q opt is one which doesn't require a to address 
           (everything before rcpt) and server is otherwise specified,
           don't require a to address. (sugg. ametzler)
* 20040128 reworked a split to quell a perl -w gripe
20031218.0
* 20031212 added --tls-on-connect option to support smtps (suggested
           by Benjamin Ritcey <exim#ritcey.com>)
* 20031212 -tlsc implementation uncovered deficiencies in error
           checking in start_tls().  reworked.
* 20031212 print SSL error code if negotiation failed
* 20031212 oops.  fixed so that -tlsc doesn't cause double EHLO
* 20031212 Added X-Mailer header to default DATA.
* 20031212 in some situations a hostname may not be found automatically
           (for instance, on my laptop when my VPN is active).  In this
           situation, prompt for helo string and from address.
* 20031218 reworked local hostname determination.  hostname() almost
           never fails but gethostbyname can, use first results if 
           second call fails.
20031211.2
* 20031211 the subscripting in the date routine was incorrect, failed
           to compile on older perls
* 20031211 removed -U and -F options from the perldoc call for --help.
           (unknown by older perls
* 20031211 since perldoc didn't want to run as root anyway I caught 
           that case and printed a more informative message
* 20031211 duh.  if --help run as root, just change to uid 1 before 
           running perldoc.  no fuss no muss
20031210.0
* 20031201 changed name from vmail to swaks (SWiss Army Knife Smtp)
* 20031201 changed copyright/license to GPL
* 20031207 changed %D body token to be compliant for an RFC Date: header
* 20031207 add 'Date: %D' header to default data string (probably 
           should have been there all along but this was specifically
           added to address a change in the handling of messages
           without Date: headers by exim in 4.30)
* 20031210 handle default routing correctly for domain literal 
           to addresses (@[1.2.3.4]).  Had to specify server explicitly
           using -s before.
* 20031210 moved "Trying..." above actual socket creation, which
           makes much more sense in a timeout situation
* 20031210 implemented automatic routing of RFC821 decimal domain
           literals (user@#16909060).
20031111.0
* 20011219 initial implementation
* 20011220 added ability to specify pieces to be prompted for
           interactively. trumps both file and CL args (-i)
* 20011220 altered transaction hints (-->, <--) to make more clear
* 20011220 added %D token for body
* 20011220 added smart default for helo (get_hostname())
* 20011220 added smart default for from
* 20011220 added smart server lookup based off of to address
* 20011220 changed so it prompts for to if one not supplied (instead
           of erroring and dying)
* 20020116 added -g option to allow DATA to be read from STDIN
* 20020201 rewrote to use IO::Socket instead of LWP::Socket
* 20021108 removed nslookup refs and implemented Net::DNS to get MX
* 20021108 added -m option to force emulation of 'Mail -v'
* 20021112 added -q option to force premature 'quit'.  it accepts
           'connect', 'helo', 'mail', 'rcpt' as params and sends quit
           immediately following the named transaction.
* 20021126 removed the old, commented LWP::Socket code.
* 20021126 started cleaning up transaction code a bit
* 20021126 finished implementation of transact.
* 20021126 removed references to WCS::Util to make more portable
* 20021126 if server isn't specified and Net::DNS not installed, use
           localhost as mail server (portability)
* 20030204 added -n option to summarize DATA send instead of sending
           whole thing (more useful when sending real (and possibly
           large) emails w/ the -g option).
* 20030306 reworked transaction architecture so more features can be
           added in the future
* 20030306 exit status changes on unexpected occurrances now
* 20030306 added code to allow multiline SMTP responses
* 20030306 use '***' to flag unexpected SMTP responses
* 20030306 closes the conection politely if something unexoected happens
* 20030306 added ability to specify multiple recipients
* 20030306 changed option processing from ::Std to ::Long to allow
           for future expansion
* 20030306 changed HELO code to try EHLO, fall back to HELO
* 20030306 fixed bug in just sending \n instead of \r\n (affected
           mx01.guardent.com (PIX), though not our servers)
* 20030306 did away w/ -i option.  Now the arg of those opts is
           optional - if the arg is given an opt, it is used.  if
           arg is given w/o opt, will prompt on STDIN.  If no arg given
           use default (mostly, depends on opt
* 20030307 if -l file can't be processed, print error and fall
           back to other methods
* 20030307 changed -l file processing to simply populate a hash so
           whole function doesn't have to be changed each time opt
           added
* 20030307 added 'auth' as valid value for -q
* 20030307 added basic AUTH for PLAIN
* 20030308 added basic AUTH for LOGIN
* 20030308 added basic AUTH for CRAM-MD5
* 20030309 fixed to try multiple auth type or specific w/ -a <type>
* 20030312 fixed base64 encoding bug (would wrap after ~58 chars)
           (has existed entire implementation)
* 20030312 added -li opt to specify local interface
* 20030312 changed error on socket creation to use print_transaction
* 20030312 added -apt opt to translate all base64 strings to plaintext
* 20030317 fixed AUTH LOGIN bug on null password (has existed for
           entire implementation)
* 20030317 changed -ap to accept 'NULLNULL' to mean empty password
           from command line (otherwise you couldn't script it)
* 20030317 changed -au to accept 'NULLNULL' to mean empty password
           from command line (otherwise you couldn't script it)
* 20030324 changed module handling to load all up front
* 20030324 added --support option to determine capabilities
* 20030326 fixed typo on testing for Net::DNS loading (since 3.24)
* 20030326 fixed error where one too many newlines being added after
           trailing . on -g input.  caused a mailer error (extra
           newline seen as an unknown command
* 20030410 ugh.  fixed problem w/ default data now having two ending
           dots.
* 20030414 laid groundwork for adding TLS (option processing)
* 20030415 added basic TLS support w/ Net::SSLeay
* 20030424 allow null sender (-f NULLNULL)
* 20030826 allow mult recips in form to,to,to (if server is undef,
           uses DNS for domain of last recip in list)
* 20031008 add -to option to allow timeout to be specified in seconds
           on command line. (defaults to 30s)
* 20031008 fixed bug where alarm was not reset after 
* 20031008 allow TIMEOUT to be specified in -l file
* 20031008 changed so you can specify in time format (hms).  This 
           allows you to use 0s to mean no timeout
* 20031008 adjusted Getopt::Long to have case-sensitive single
           char options, but insensitive long opts.  It also turns
           off single-char option bundling, but I don't see this
           as an issue
* 20031008 instead of passing literal prefix to print_transaction(),
           now pass a code (smtp/program/send/receive/ok/error) and
           the sub prints the appropriate prefix.  Allows prefixes
           to be controlled in a central place
* 20031008 changed prefixes so that program errors are differentiated
           from SMTP errors (*** vs. <** or **>)
* 20031008 changed standard diagnostic prints to use print_trans()
           to gain benefit of standard prefixes
* 20031008 standardized printing of program errors to STDERR, all
           other prints to STDOUT
* 20031008 added -S option. -S only prints errors and anything after,
           -S -S only shows errors, -S -S -S never prints anything
* 20031010 DATA portion now has From_ line removed if present
* 20031010 added -nsf (no strip from) option to prevent removal
           of From_ line
* 20031010 added transaction hints for TLS (<~ and ~>)
* 20031010 making TLS confirm to RFC3207 - forget state information
           and re-EHLO after successful TLS negotiation
* 20031010 fixed bug where QUIT not sent if -tls specified but TLS not
           advertised by the server
* 20031010 added 'tls' as valid argument to -q option
* 20031010 -ahp and -apt were defined as string options, but they're
           really boolean, changed definition
* 20031010 removed most of the input validation - this is meant to be
           a test app, not a real agent.  If an admin wants to test
           how his server will handle an underscore in a helo string,
           he should be able to specify it
* 20031010 added %D to the default subject
* 20031010 fix dots once and for all - honor a trailing dot if it
           exists, otherwise add trailing dot.  Quote all other dots
* 20031010 added framework for release (--help, --version), initial
           population of help framework
* 20031014 changed timout CLA from -to to -timeout to avoid confusion
* 20031014 added longer alternatives to most options (that is, -ao
           can also be specified as --auth-optional
* 20031016 typo - changed --supress-data to --suppress-data
* 20031016 documented long options in POD
* 20031016 moved TLS code into sub (mimic AUTh architecture)
* 20031016 arg of '-' to -d sets -g (reads from STDIN)
* 20031019 Added -nth option to turn off transaction hints
* 20031019 added -hr and -hs options to mute parts of transaction
* 20031019 cleaned up getopt code (messy since adding long opts
* 20031019 started adding NTLM support (doesn't work totally yet)
* 20031020 NTLM basicaly works.  Fixed first problem by changing
           expected return value from 334 to 235 in getting final auth
           verdict.  Still issue w/ username (but pass works fine)
* 20031020 switched to alternate Authen::NTLM module to fix username
           issue (seems to work so far but might be safer to switch to
           native implementation)
* 20031021 documented NTLM auth options
* 20031021 added ability to specify %DOMAIN to -ap for NTLM
* 20031021 Added aliases for SPA/MSN to NTLM
* 20031024 started rearranging options.  Move from $O:: namespace
           to %O hash.  %O is for temporary vars, $G:: is for true
           global vars.  moved most of the up-front processing to 
           a subroutine and rearranged
* 20031024 Added module checking for Authen::NTLM
* 20031024 changed server for non-mx domain from localhost to domain's 
           A record
* 20031024 changed "empty" placeholder from NULLNULL to <> for 
           sender, a_user, a_pass
* 20031027 added -stl option to show lapse between send/receive
* 20031101 fixed bug in NTLM auth (worked with exim but not with
           communigate
* 20031107 implemented DIGEST-MD5 (RFC2831)
* 20031107 fixed a typo in NTLM doc
* 20031107 fixed -apt bug in NTLM exchange
* 20031107 added require section to --help
* 20031108 changed -stl to a microtimer by default
* 20031108 changed microtimer precision to thousandths
* 20031108 added back in integer timing if 'i' provided as arg to -stl
           or Time::HiRes unavailable
* 20031108 added -am option to allow aliasing of auth types
* 20031108 reworked do_smtp_auth() to make --auth-map possible and for
           general streamlining
* 20031108 missed a piece in implementing DIGEST-MD5 (missed checking
           for Authen::DigestMD5)