Commit Graph
34 Commits
Author SHA1 Message Date
medmunds 06f51a5c34 Change default SMTP_SECURE to "tls"
Secure by default. Also try to minimize configuration errors.
(Many ESPs/ISPs require STARTTLS, and most support it.)
2021-03-21 16:20:32 +01:00
medmunds db96778064 Prefer Python to curl when both available 2021-03-21 16:20:32 +01:00
medmunds d8918ea156 Use email.policy.default in Python 3 implementation
Improves standards compatibility and utf-8 handling
in Python 3.3-3.8. (email.policy.default becomes the
default in Python 3.9.)
2021-03-21 16:20:32 +01:00
medmunds 3503474bb8 Add Date email header in Python implementation 2021-03-21 16:20:32 +01:00
medmunds eb1606b086 Clarify _readaccountconf_mutable_default 2021-03-21 16:20:32 +01:00
medmunds 1330a092fa Clean email headers and warn on unsupported address format
Just in case, make sure CR or NL don't end up in
an email header.
2021-03-21 16:20:32 +01:00
medmunds d3c74cfb45 Implement _rfc2822_date helper 2021-03-21 16:20:32 +01:00
medmunds d044545520 Rework read/save config to not save default values
Add and use _readaccountconf_mutable_default and
_saveaccountconf_mutable_default helpers to capture
common default value handling.

New approach also eliminates need for separate
underscore-prefixed version of each conf var.
2021-03-21 16:20:32 +01:00
medmunds d1cdc1c6a0 Add _clearaccountconf_mutable() 2021-03-21 16:20:32 +01:00
medmunds dc8d91ea39 Use PROJECT_NAME and VER for X-Mailer header
Also add X-Mailer header to Python version
2021-03-21 16:20:32 +01:00
medmunds fe3e8a7bb6 More than one blank line is an abomination, apparently
I will not try to use whitespace to group code visually
2021-03-21 16:20:32 +01:00
medmunds ce2ff25edd Implement curl version of smtp notify-hook 2021-03-21 16:20:32 +01:00
medmunds 65a1b892e3 Prep for curl or Python; clean up SMTP_* variable usage 2021-03-21 16:20:32 +01:00
medmunds e272fde95e Add instructions for reporting bugs 2021-03-21 16:20:32 +01:00
medmunds d48bff0e20 Only save config if send is successful 2021-03-21 16:20:32 +01:00
medmunds 6e61c34f0f Make shfmt happy
(I'm open to better ways of formatting the heredoc
that embeds the Python script.)
2021-03-21 16:20:32 +01:00
medmunds 2d9506eb54 Implement smtp notify hook
Support notifications via direct SMTP server connection.
Uses Python (2.7.x or 3.4+) to communicate with SMTP server.
2021-03-21 16:20:32 +01:00
medmunds afe6f4030e Change default SMTP_SECURE to "tls"
Secure by default. Also try to minimize configuration errors.
(Many ESPs/ISPs require STARTTLS, and most support it.)
2021-02-17 11:39:16 -08:00
medmunds 6e49c4ffe0 Prefer Python to curl when both available 2021-02-17 11:28:50 -08:00
medmunds 28d9f00610 Use email.policy.default in Python 3 implementation
Improves standards compatibility and utf-8 handling
in Python 3.3-3.8. (email.policy.default becomes the
default in Python 3.9.)
2021-02-17 09:57:44 -08:00
medmunds 8f688e5e13 Add Date email header in Python implementation 2021-02-17 09:46:13 -08:00
medmunds 5a182eddbf Clarify _readaccountconf_mutable_default 2021-02-16 14:41:21 -08:00
medmunds 4b615cb3a9 Clean email headers and warn on unsupported address format
Just in case, make sure CR or NL don't end up in
an email header.
2021-02-16 14:02:09 -08:00
medmunds b36247a091 Implement _rfc2822_date helper 2021-02-16 13:13:26 -08:00
medmunds 6e77756d6a Rework read/save config to not save default values
Add and use _readaccountconf_mutable_default and
_saveaccountconf_mutable_default helpers to capture
common default value handling.

New approach also eliminates need for separate
underscore-prefixed version of each conf var.
2021-02-16 12:49:27 -08:00
medmunds 585c0c3818 Add _clearaccountconf_mutable() 2021-02-16 09:33:39 -08:00
medmunds 6ff75f9a9f Use PROJECT_NAME and VER for X-Mailer header
Also add X-Mailer header to Python version
2021-02-15 12:23:48 -08:00
medmunds ffe7ef4764 More than one blank line is an abomination, apparently
I will not try to use whitespace to group code visually
2021-02-14 20:06:07 -08:00
medmunds 30dae70e2b Implement curl version of smtp notify-hook 2021-02-14 19:56:23 -08:00
medmunds 557a747d55 Prep for curl or Python; clean up SMTP_* variable usage 2021-02-14 16:42:25 -08:00
medmunds fe273b3829 Add instructions for reporting bugs 2021-02-14 13:10:30 -08:00
medmunds 2439bb30e8 Only save config if send is successful 2021-02-14 13:10:30 -08:00
medmunds e48b6bd22d Make shfmt happy
(I'm open to better ways of formatting the heredoc
that embeds the Python script.)
2021-02-14 13:10:30 -08:00
medmunds 1de9ffacb0 Implement smtp notify hook
Support notifications via direct SMTP server connection.
Uses Python (2.7.x or 3.4+) to communicate with SMTP server.
2021-02-14 13:10:30 -08:00