From 4aa7d00b89def9a69fcbf72c986719158d0b7a3c Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Thu, 22 Feb 2024 10:21:33 +0100 Subject: [PATCH 1/7] add support for sending to multiple recipients via sendmail --- lib/urlwatch/mailer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/urlwatch/mailer.py b/lib/urlwatch/mailer.py index 2dc74cc8..3027e3fd 100644 --- a/lib/urlwatch/mailer.py +++ b/lib/urlwatch/mailer.py @@ -112,7 +112,7 @@ def __init__(self, sendmail_path): self.sendmail_path = sendmail_path def send(self, msg): - p = subprocess.Popen([self.sendmail_path, '-oi', '-f', msg['From'], msg['To']], + p = subprocess.Popen([self.sendmail_path, '-oi', '-f', msg['From']] + msg['To'].split(','), stdin=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) From ba15d9b4eef4b5f3ae5d05bd2ec304c2eb12ed84 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Thu, 22 Feb 2024 14:26:46 +0100 Subject: [PATCH 2/7] Update reporters.rst --- docs/source/reporters.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/reporters.rst b/docs/source/reporters.rst index 4da683f0..ff6f58b0 100644 --- a/docs/source/reporters.rst +++ b/docs/source/reporters.rst @@ -69,6 +69,7 @@ At the moment, the following reporters are built-in: - **prowl**: Send a detailed notification via prowlapp.com - **pushbullet**: Send summary via pushbullet.com - **pushover**: Send summary via pushover.net +- **sendmail**: Pipe a message to the system sendmail command - **shell**: Pipe a message to a shell command - **slack**: Send a message to a Slack channel - **stdout**: Print summary on stdout (the console) From ac03cf46f95d7ffdc1b5ea52ddf5e6e1248a3197 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Thu, 22 Feb 2024 14:28:45 +0100 Subject: [PATCH 3/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99436961..065ab5aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ ### Fixed +- Fix multiple recipients for sendmail reporter (#797) - Fix documentation for watching Github tags and releases, again (#723) - Fix `--test-reporter` command-line option so `separate` configuration option is no longer ignored when sending test notifications (#772, by marunjar) - Fix line height and dark mode regression (#774 reported by kongomongo, PRs #777 and #778 by trevorshannon) From 67cac71fbf1328a320ab9b04766d66f600968953 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Fri, 23 Feb 2024 10:31:40 +0100 Subject: [PATCH 4/7] Update reporters.rst --- docs/source/reporters.rst | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/source/reporters.rst b/docs/source/reporters.rst index ff6f58b0..78c22db5 100644 --- a/docs/source/reporters.rst +++ b/docs/source/reporters.rst @@ -61,7 +61,7 @@ The list of built-in reporters can be retrieved using:: At the moment, the following reporters are built-in: - **discord**: Send a message to a Discord channel -- **email**: Send summary via e-mail / SMTP +- **email**: Send summary via e-mail / SMTP / sendmail - **ifttt**: Send summary via IFTTT - **mailgun**: Send e-mail via the Mailgun service - **matrix**: Send a message to a room using the Matrix protocol @@ -69,7 +69,6 @@ At the moment, the following reporters are built-in: - **prowl**: Send a detailed notification via prowlapp.com - **pushbullet**: Send summary via pushbullet.com - **pushover**: Send summary via pushover.net -- **sendmail**: Pipe a message to the system sendmail command - **shell**: Pipe a message to a shell command - **slack**: Send a message to a Slack channel - **stdout**: Print summary on stdout (the console) @@ -291,6 +290,20 @@ public Matrix room, as the messages quickly become noisy: minimal: true enabled: true +E-Mail via sendmail +--------------------- + +You can send email via the system's sendmail command provided by the MTA. You need to set "method: sendmail" in the config file. + +.. code:: yaml + + report: + email: + enabled: true + from: 'postmaster@example.com' + method: sendmail + + E-Mail via GMail SMTP --------------------- From 381972f7a5c1055c2e970c343820f29df88890d7 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Fri, 23 Feb 2024 16:33:20 +0100 Subject: [PATCH 5/7] Update reporters.rst --- docs/source/reporters.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/reporters.rst b/docs/source/reporters.rst index 78c22db5..592de608 100644 --- a/docs/source/reporters.rst +++ b/docs/source/reporters.rst @@ -301,6 +301,7 @@ You can send email via the system's sendmail command provided by the MTA. You ne email: enabled: true from: 'postmaster@example.com' + to: 'recipient@bar.com' method: sendmail From 5fa5e2bef043711919e5c267c9caa3006601641e Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Tue, 12 Mar 2024 07:28:46 +0100 Subject: [PATCH 6/7] Update CHANGELOG.md Co-authored-by: Thomas Perl --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 065ab5aa..8b119a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ ### Fixed -- Fix multiple recipients for sendmail reporter (#797) +- `email` reporter: Allow multiple recipients for `sendmail` method (#797, by monperrus) - Fix documentation for watching Github tags and releases, again (#723) - Fix `--test-reporter` command-line option so `separate` configuration option is no longer ignored when sending test notifications (#772, by marunjar) - Fix line height and dark mode regression (#774 reported by kongomongo, PRs #777 and #778 by trevorshannon) From a87388a8d244a33ac3e2edad0bd7761b6a962709 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Tue, 12 Mar 2024 07:28:54 +0100 Subject: [PATCH 7/7] Update docs/source/reporters.rst Co-authored-by: Thomas Perl --- docs/source/reporters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/reporters.rst b/docs/source/reporters.rst index 592de608..5db20dfa 100644 --- a/docs/source/reporters.rst +++ b/docs/source/reporters.rst @@ -293,7 +293,7 @@ public Matrix room, as the messages quickly become noisy: E-Mail via sendmail --------------------- -You can send email via the system's sendmail command provided by the MTA. You need to set "method: sendmail" in the config file. +You can send email via the system's ``sendmail`` command provided by the MTA. You need to set ``method: sendmail`` in the config file: .. code:: yaml