From 7c2d84df1c05d41ba9eafb6f64abd694166e55c3 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Sat, 20 Nov 2021 00:43:53 -0500 Subject: gnu: sendgmail: Don't limit domain name of sender. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are three open pull requests adding this functionality: - https://github.com/google/gmail-oauth2-tools/pull/17 (October 2019) - https://github.com/google/gmail-oauth2-tools/pull/26 (May 2020) - https://github.com/google/gmail-oauth2-tools/pull/37 (May 2021) (The patch here is identical to #26, so I just closed this one.) Meanwhile, the most recent commit to the upstream repository was in May 2019: that was the commit that first added `sendgmail`. This commit adjusts Guix's `sendgmail`, following Postel's advice, to make the command "liberal in its receiving behavior" (RFC 760): it always accepts email addresses with any domain name, as in #26, and it accepts (and ignores) the `-gsuite` flag used in #17. * gnu/packages/patches/sendgmail-remove-domain-restriction.patch: New file. This is the patch from #26. * gnu/packages/patches/sendgmail-accept-ignored-gsuite-flag.patch: New file, based on #17. * gnu/local.mk (dist_patch_DATA): Add the new patches. * gnu/packages/mail.scm (sendgmail)[source]: Apply the new patches. Increment the "revision" argument to `git-version` from 0 to 1. Signed-off-by: Ludovic Courtès --- gnu/packages/mail.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gnu/packages/mail.scm') diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index b75c1a0965..e52b48a2d6 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -4661,7 +4661,7 @@ feeds, converts them into emails, and sends them.") (define-public sendgmail (let ((commit "e3229155a4037267ce40f1a3a681f53221aa4d8d") - (revision "0")) + (revision "1")) (package (name "sendgmail") (version (git-version "0.0.0" revision commit)) @@ -4672,6 +4672,9 @@ feeds, converts them into emails, and sends them.") (url "https://github.com/google/gmail-oauth2-tools") (commit commit))) (file-name (git-file-name name version)) + (patches (search-patches + "sendgmail-remove-domain-restriction.patch" + "sendgmail-accept-ignored-gsuite-flag.patch")) (sha256 (base32 "1cxpkiaajhq1gjsg47r2b5xgck0r63pvkyrkm7af8c8dw7fyn64f")))) @@ -4691,5 +4694,9 @@ feeds, converts them into emails, and sends them.") "The @command{sendgmail} command provides a minimal sendmail-compatible front-end that connects to Gmail using OAuth2. It is specifically designed for use with @code{git send-email}. The command needs a Gmail API key to -function.") +function. + +Guix's version of @command{sendgmail} has been patched for compatibility with +all known forks, including support for non-@code{@@gmail.com} email +addresses.") (license license:asl2.0)))) -- cgit v1.2.3