Skip to content

Commit

Permalink
Merge branch 'release/v20190914.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jetmore committed Oct 6, 2019
2 parents 8d4e34f + 135eaca commit 9ea6012
Show file tree
Hide file tree
Showing 6,706 changed files with 48,018 additions and 2,354 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Thumbs.db
# sublime project files
*.sublime-project
*.sublime-workspace

# I used to have this versioned but I removed it from all commits. Eventually it will
# move to real bug tracking butin the mean time allow it to live ignored in my local repo
punchlist.txt
72 changes: 72 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,75 @@
* 20181104 Rename LICENSE and README to have .txt extension
* 20181104 Update release tooling after development environment changes
> 20181104 released 20181104.0
* 20181110 --add-header documentation was still referencing a single-char,
no longer valid, replacement token. Replace with the correct token.
* 20181110 Doc fix for default body - %SWAKS_VERSION% missing trailing char.
* 20181110 Fix issue with malformed headers. Don't fall over if header
doesn't contain a colon or looks like an illegal continuation.
* 20181110 Fix --attach* option processing to remove possibly ambiguity
* 20181110 Implement --body-attach option to allow more granularity in
setting body information (different mime types, alternatives, etc).
* 20181201 Config file fixes around searching default $SWAKS_HOME, $HOME,
and $LOGDIR locations:
- Searching default locations for the first existing
PATH/.swaksrc did not actually work as documented.
- If none of the default search environment variables was set,
Swaks would not process the "portable" defaults optionally
stored in the actual swaks script.
* 20181202 Since there is no inherent order to options provided in environment
variables, sort them before processing to define an order.
* 20181202 Document the general rule that when processing duplicate options,
the last option specified wins, both inter- and intra-method.
* 20181202 Document the unreliability of using environment variables to unset
other environment variable options with the "no-" prefix.
* 20181203 Fix bug causing in "no-" option processing to work unreliably.
* 20181204 Tidying and clarifying the OPTION PROCESSING section of the docs.
* 20181204 Adding an ENVIRONMENT VARIABLES section to the doc.
* 20181208 When processing config file options with no leading '-' and any
environment variable config, prefix the option with '--' for
processing, not '-'. Bandaid for very minor difference between
'-' and '--' option processing which I hope to fix soon.
* 20181210 --version and --help should work even if they aren't the very
first option.
* 20181210 Add a flag for --dump-mail in the OUTPUT section of --dump
* 20181210 Turn on case-sensitivity for configuration options. Needed to
make -S distinct from -s, as documented.
* 20181210 Turn off option bundling. No practical use and it could cause
real confusion (with bundling turned on, -foobar was "-f oobar"
instead of an unknown option.
* 20181225 Add validation to --proxy-family (when proxy-version=1) and
--proxy-version options.
* 20181225 --copy-routing should error when no argument given.
* 20190105 Update copyright year to 2019
* 20190105 Add documentation for missing --quit-after synonym STARTTLS
* 20190216 Adding data and dot as valid --drop-after-send and --drop-after
arguments
* 20190618 Typo in documentation for --ehlo, reported by Konstantin Stephan
* 20190710 Clarify how XCLIENT arguments are grouped in --xclient doc
* 20190712 Enforce key=value format for arguments to --auth-extra and
--auth-map
* 20190713 Small code tidy around %DATE% token replacement
* 20190713 Add %NEWLINE% as a new --data token
* 20190713 If the arg to --data looks like a file but is not openable,
error and exit instead of using it the file name as the raw
data value
* 20190713 --attach option processing was calling die() instead of
ptrans/exit on error
* 20190713 Fix handling of --option=arg option format which prevented it
from being used with --header and --attach* options
* 20190814 --tls-optional-strict was incorrectly marked internally as
optionally accepting an argument
* 20190814 --use-old-data-tokens was not completely removed, clean up
* 20190815 Updating copyright year to 2019
* 20190815 --protocol's argument was incorrectly marked as optional
* 20180816 Rework how the --show-time-lapse option is tracked internally
and displayed in --dump output
* 20190817 Rearrange internal option definition structure in preparation
for major rework
* 20190817 Remove interactive prompts for helo and from when hostname
cannot be determined internally. Just error instead.
* 20190817 Cleaning up error messages that contained extra newlines
* 20190817 Remove re-prompting for port when an invalid service name was
supplied. Just error and exit instead
* 20191005 Fixed typos in base.pod and recipes.pod
> 20191006 released 20190914.0
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Swaks - Swiss Army Knife for SMTP

Swaks is a featureful, flexible, scriptable, transaction-oriented SMTP test tool written and maintained by [John Jetmore](https://jetmore.org/john/). It is free to use and licensed under the GNU GPLv2. Features include:

* SMTP extensions including TLS, authentication, pipelining, PROXY, PRDR, and XCLIENT
* Protocols including SMTP, ESMTP, and LMTP
* Transports including UNIX-domain sockets, internet-domain sockets (IPv4 and IPv6), and pipes to spawned processes
* Completely scriptable configuration, with option specification via environment variables, configuration files, and command line

The official project page is https://jetmore.org/john/code/swaks/.

## Download

The latest version of Swaks is **20190914.0**, which can be downloaded as a [package](https://jetmore.org/john/code/swaks/files/swaks-20190914.0.tar.gz) or a [standalone script](https://jetmore.org/john/code/swaks/files/swaks-20190914.0/swaks).

There is also a [versions page](https://jetmore.org/john/code/swaks/versions.html) which lists every released version of Swaks, complete with changelogs and download links.

## Documentation

The [reference documentation](https://jetmore.org/john/code/swaks/latest/doc/ref.txt) from the latest release, which includes quick-start examples, is available. There is also an [Occasionally Asked Questions](https://jetmore.org/john/code/swaks/faq.html) document.

## Communications

Feedback and meaningful questions about how to use Swaks are welcome. However, since Swaks is only maintained by a single person as a hobby, there is no guarantee of a timely response.

### Release Notification

* [Send a mail](mailto:[email protected]). You will receive notifications of new releases via email. No other email will ever be sent to this list.
* [Follow @SwaksSMTP](https://twitter.com/SwaksSMTP) on twitter. Very rarely contains non-release content.
* [Blog](https://www.jetmore.org/john/blog/c/swaks/). Swaks-specific blog category (RSS available). Very rarely contains non-release content.

### Help and Feedback

* [Issues](https://github.com/jetmore/swaks/issues) - Open an issue for feature requests and bugs.
* [Contact the author](mailto:[email protected]) - suggestion, tips, patches, feedback, critiques always welcome.

## License

[GNU GPLv2](https://choosealicense.com/licenses/gpl-2.0/)
70 changes: 41 additions & 29 deletions RELEASE/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,24 @@ Check the following files
doc/recipes.txt
Hints, tips, tricks that don't fit in the reference

------------------------------
Source
------------------------------
The Swaks source code is available at https://github.com/jetmore/swaks

------------------------------
Communication
------------------------------
The main Swaks website is currently http://jetmore.org/john/code/swaks/

Ways to stay up to date on new releases:
Homepage: http://jetmore.org/john/code/swaks/
Online Docs: http://jetmore.org/john/code/swaks/latest/doc/ref.txt
http://jetmore.org/john/code/swaks/faq.html
Announce List: send mail to [email protected]
Project RSS: http://jetmore.org/john/blog/c/swaks/feed/
Twitter: http://www.twitter.com/SwaksSMTP
Help: send questions to [email protected]
Homepage: https://jetmore.org/john/code/swaks/
Online Docs: https://jetmore.org/john/code/swaks/latest/doc/ref.txt
https://jetmore.org/john/code/swaks/faq.html
Announce List: send mail to [email protected]
Project RSS: https://jetmore.org/john/blog/c/swaks/feed/
Twitter: https://www.twitter.com/SwaksSMTP
Help: send questions to [email protected]
Bugs / Feature Requests: https://github.com/jetmore/swaks/issues

------------------------------
Authorship
Expand Down Expand Up @@ -81,27 +86,34 @@ A full copy of this license should be available in the LICENSE.txt file.
------------------------------
Change Summary
------------------------------
v20181104.0
v20190914.0
New Features:
* Added --dump-mail option.
* Added --xclient-delim, --xclient-destaddr, --xclient-destport,
--xclient-no-verify, and --xclient-before-starttls options.
* Source is now available on github.com/jetmore/swaks
* Added --body-attach option to allow more granularity in setting body
information
* Added 'data' and 'dot' as valid --drop-after-send and
--drop-after arguments
* Added %NEWLINE% as a new --data token
Notable Changes:
* XCLIENT can now send multiple XCLIENT requests. Because of this,
--xclient and --xclient-ATTR values are no longer merged into one
string. This breaks previously documented behavior.
* Numerous improvements to the output of --dump and --dump-as-body,
including the ability to limit output by section, layout improvements,
adding missing options to output, and fixing bugs.
* Options provided via environment variable are now sorted before
processing to provide a deterministic processing order
* Option bundling is no longer enabled. This fixes several option
processing oddities, like "-foobar" being interpreted as
"-f oobar"
* If the arg to --data looks like a file but is not openable, error
and exit instead of using it the file name as the raw data value
* Remove interactive prompts for --helo and --from when hostname cannot
be determined internally, just error and exit instead. If the user
was not expecting an interactive experience, don't start one
* Remove re-prompting for port when an invalid service name was supplied,
just error and exit instead. If the user was not expecting an
interactive experience, don't start one
Notable Bugs Fixed:
* Fixed bug preventing Proxy from working with --tls-on-connect.
* XCLIENT is now sent after STARTTLS to match with Postfix's expectations.
* Fixed bug which could allow mail sending to proceed without a valid
recipient.
* Replacing a multi-line header via --header or --h-HEADER now replaces
the entire header, not just the first line.
* The option for specifying the local port was documented as --local-port
but implemented as --lport. Both are now documented and implemented.
* Fixed two bugs which prevented interactions between --dump,
--auth-hide-password, --dump-as-body, and --dump-as-body-shows-password
from producing consistent output.
* Handle malformed headers more gracefully in header replacement
* Fix bug causing the processing of options prefixed with the negating
"no-" to work unreliably
* --version and --help should work even if they aren't the very
first option
* -S is now a distinct option from -s, as documented
* Fix bug preventing the --option=arg option format from being
unusable with --header and --attach* options
73 changes: 73 additions & 0 deletions RELEASE/doc/Changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,78 @@
> 20191006 released 20190914.0
* 20191005 Fixed typos in base.pod and recipes.pod
* 20190817 Remove re-prompting for port when an invalid service name was
supplied. Just error and exit instead
* 20190817 Cleaning up error messages that contained extra newlines
* 20190817 Remove interactive prompts for helo and from when hostname
cannot be determined internally. Just error instead.
* 20190817 Rearrange internal option definition structure in preparation
for major rework
* 20180816 Rework how the --show-time-lapse option is tracked internally
and displayed in --dump output
* 20190815 --protocol's argument was incorrectly marked as optional
* 20190815 Updating copyright year to 2019
* 20190814 --use-old-data-tokens was not completely removed, clean up
* 20190814 --tls-optional-strict was incorrectly marked internally as
optionally accepting an argument
* 20190713 Fix handling of --option=arg option format which prevented it
from being used with --header and --attach* options
* 20190713 --attach option processing was calling die() instead of
ptrans/exit on error
* 20190713 If the arg to --data looks like a file but is not openable,
error and exit instead of using it the file name as the raw
data value
* 20190713 Add %NEWLINE% as a new --data token
* 20190713 Small code tidy around %DATE% token replacement
* 20190712 Enforce key=value format for arguments to --auth-extra and
--auth-map
* 20190710 Clarify how XCLIENT arguments are grouped in --xclient doc
* 20190618 Typo in documentation for --ehlo, reported by Konstantin Stephan
* 20190216 Adding data and dot as valid --drop-after-send and --drop-after
arguments
* 20190105 Add documentation for missing --quit-after synonym STARTTLS
* 20190105 Update copyright year to 2019
* 20181225 --copy-routing should error when no argument given.
* 20181225 Add validation to --proxy-family (when proxy-version=1) and
--proxy-version options.
* 20181210 Turn off option bundling. No practical use and it could cause
real confusion (with bundling turned on, -foobar was "-f oobar"
instead of an unknown option.
* 20181210 Turn on case-sensitivity for configuration options. Needed to
make -S distinct from -s, as documented.
* 20181210 Add a flag for --dump-mail in the OUTPUT section of --dump
* 20181210 --version and --help should work even if they aren't the very
first option.
* 20181208 When processing config file options with no leading '-' and any
environment variable config, prefix the option with '--' for
processing, not '-'. Bandaid for very minor difference between
'-' and '--' option processing which I hope to fix soon.
* 20181204 Adding an ENVIRONMENT VARIABLES section to the doc.
* 20181204 Tidying and clarifying the OPTION PROCESSING section of the docs.
* 20181203 Fix bug causing in "no-" option processing to work unreliably.
* 20181202 Document the unreliability of using environment variables to unset
other environment variable options with the "no-" prefix.
* 20181202 Document the general rule that when processing duplicate options,
the last option specified wins, both inter- and intra-method.
* 20181202 Since there is no inherent order to options provided in environment
variables, sort them before processing to define an order.
* 20181201 Config file fixes around searching default $SWAKS_HOME, $HOME,
and $LOGDIR locations:
- Searching default locations for the first existing
PATH/.swaksrc did not actually work as documented.
- If none of the default search environment variables was set,
Swaks would not process the "portable" defaults optionally
stored in the actual swaks script.
* 20181110 Implement --body-attach option to allow more granularity in
setting body information (different mime types, alternatives, etc).
* 20181110 Fix --attach* option processing to remove possibly ambiguity
* 20181110 Fix issue with malformed headers. Don't fall over if header
doesn't contain a colon or looks like an illegal continuation.
* 20181110 Doc fix for default body - %SWAKS_VERSION% missing trailing char.
* 20181110 --add-header documentation was still referencing a single-char,
no longer valid, replacement token. Replace with the correct token.
> 20181104 released 20181104.0
* 20181104 Update release tooling after development environment changes
* 20181104 Rename LICENSE and README to have .txt extension
* 20181104 Spelling fixes
* 20181104 Clean up contact/notifications - remove Google+ everywhere, add
RSS and Twitter to base.pod
Expand Down
10 changes: 5 additions & 5 deletions RELEASE/doc/recipes.pod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=pod

=head1 swaks - Recipes for use
=head1 Swaks - Recipes for use

Because swaks is a very flexible tool it can be hard to fully grasp what it can do (and few people want or need to). However, I have used swaks in interesting ways, and others have done the same and shared them with me. I hate for these interesting ideas go to waste, so I am including them in this file.
Because Swaks is a very flexible tool it can be hard to fully grasp what it can do (and few people want or need to). However, I have used Swaks in interesting ways, and others have done the same and shared them with me. I hate for these interesting ideas go to waste, so I am including them in this file.

=head1 Simple address verification

Expand Down Expand Up @@ -39,7 +39,7 @@ This allows you to quickly ask a mail server whether a recipient is valid (depen

=back

This is a valid email (the mail server returned 250 in response to my RCPT request). This is fairly verbose though. Note the "0" in my command prompt is the exit status of the last command ($?). Since swaks tries to be good about setting a useful return value, I could make vrfy totally silent:
This is a valid email (the mail server returned 250 in response to my RCPT request). This is fairly verbose though. Note the "0" in my command prompt is the exit status of the last command ($?). Since Swaks tries to be good about setting a useful return value, I could make vrfy totally silent:

=over 4

Expand Down Expand Up @@ -67,9 +67,9 @@ This works well if you use $? in your command prompt, but if not it is less usef

=head1 Stress-testing an SMTP server

I've received a couple of different requests and a couple of different patches over the years to add functionality to have swaks fork and send a bunch of emails to a single address. I may still add this functionality some day, but I still feel pretty strongly that ultimately swaks core is a single transaction. Forking multiple swaks seems just outside the scope of the tool.
I've received a couple of different requests and a couple of different patches over the years to add functionality to have Swaks fork and send a bunch of emails to a single address. I may still add this functionality some day, but I still feel pretty strongly that ultimately Swaks core is a single transaction. Forking multiple Swaks seems just outside the scope of the tool.

However, this does seem to be something people want to do. To that end, here is a quick-and-dirty shell script that is (almost) a drop in replacement for swaks:
However, this does seem to be something people want to do. To that end, here is a quick-and-dirty shell script that is (almost) a drop in replacement for Swaks:

=over 4

Expand Down
Loading

0 comments on commit 9ea6012

Please sign in to comment.