Commit Graph

29 Commits

Author SHA1 Message Date
medmunds
86818463f1 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-08-10 09:28:23 +02:00
medmunds
07a04f42c5 Implement _rfc2822_date helper 2021-08-10 09:28:23 +02:00
medmunds
3ed3e3095c 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-08-10 09:28:23 +02:00
medmunds
ff009f4c2f Use PROJECT_NAME and VER for X-Mailer header
Also add X-Mailer header to Python version
2021-08-10 09:28:23 +02:00
medmunds
f4a2dc1fcc More than one blank line is an abomination, apparently
I will not try to use whitespace to group code visually
2021-08-10 09:28:02 +02:00
medmunds
0f4a0441cf Implement curl version of smtp notify-hook 2021-08-10 09:28:02 +02:00
medmunds
30b54b8d0f Prep for curl or Python; clean up SMTP_* variable usage 2021-08-10 09:28:02 +02:00
medmunds
0fc1654faf Add instructions for reporting bugs 2021-08-10 09:28:02 +02:00
medmunds
7eef1e6623 Only save config if send is successful 2021-08-10 09:28:02 +02:00
medmunds
a835838749 Make shfmt happy
(I'm open to better ways of formatting the heredoc
that embeds the Python script.)
2021-08-10 09:28:02 +02:00
medmunds
2000240aa6 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-08-10 09:28:02 +02:00
Alexander Kulumbeg
58ff7722cd Revert "Syncing with the original repo (#2)"
This reverts commit c384ed960c.
2021-08-10 09:27:23 +02:00
medmunds
60027ca7fe 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-08-10 09:25:09 +02:00
medmunds
f8ee124742 Prefer Python to curl when both available 2021-08-10 09:25:09 +02:00
medmunds
3cfb423e89 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-08-10 09:25:09 +02:00
medmunds
9570cce7e3 Add Date email header in Python implementation 2021-08-10 09:25:09 +02:00
medmunds
d4fde8dad3 Clarify _readaccountconf_mutable_default 2021-08-10 09:25:09 +02:00
medmunds
c7ce0fd780 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-08-10 09:25:09 +02:00
medmunds
d9df5df2d0 Implement _rfc2822_date helper 2021-08-10 09:25:09 +02:00
medmunds
a4590b9707 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-08-10 09:25:09 +02:00
medmunds
362bd62152 Use PROJECT_NAME and VER for X-Mailer header
Also add X-Mailer header to Python version
2021-08-10 09:25:09 +02:00
medmunds
7f1586678c More than one blank line is an abomination, apparently
I will not try to use whitespace to group code visually
2021-08-10 09:25:09 +02:00
medmunds
897db8d038 Implement curl version of smtp notify-hook 2021-08-10 09:25:09 +02:00
medmunds
03c8cacb67 Prep for curl or Python; clean up SMTP_* variable usage 2021-08-10 09:25:09 +02:00
medmunds
3aec3fc436 Add instructions for reporting bugs 2021-08-10 09:25:09 +02:00
medmunds
897be36a26 Only save config if send is successful 2021-08-10 09:25:09 +02:00
medmunds
dd2844d5b8 Make shfmt happy
(I'm open to better ways of formatting the heredoc
that embeds the Python script.)
2021-08-10 09:25:09 +02:00
medmunds
e770250bb9 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-08-10 09:25:09 +02:00
neil
b50e701cae
Add notification (#2241)
* add cron notify

* fix format

* fix format
2019-04-29 22:13:54 +08:00