From cd1d97bebf73ba513a3b89df92cc3030f264f7d8 Mon Sep 17 00:00:00 2001
From: Brian Picciano
Date: Tue, 9 Aug 2022 20:56:34 -0600
Subject: [PATCH] don't allow gmail addresses to subscribe
---
srv/src/http/mailinglist.go | 4 ++++
srv/src/http/tpl/follow.html | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/srv/src/http/mailinglist.go b/srv/src/http/mailinglist.go
index 90e602c..eab2f51 100644
--- a/srv/src/http/mailinglist.go
+++ b/srv/src/http/mailinglist.go
@@ -18,6 +18,10 @@ func (a *api) mailingListSubscribeHandler() http.Handler {
len(email) >= 512 {
apiutil.BadRequest(rw, r, errors.New("invalid email"))
return
+
+ } else if strings.ToLower(parts[1]) == "gmail.com" {
+ apiutil.BadRequest(rw, r, errors.New("gmail does not allow its users to receive email from me, sorry"))
+ return
}
err := a.params.MailingList.BeginSubscription(email)
diff --git a/srv/src/http/tpl/follow.html b/srv/src/http/tpl/follow.html
index 48b7541..501b310 100644
--- a/srv/src/http/tpl/follow.html
+++ b/srv/src/http/tpl/follow.html
@@ -42,6 +42,12 @@
complete the process if you don't immediately see anything in your inbox.
+
+ Unfortunately Google considers all emails from my mail server to be spam. I'm
+ tired of seeing the bounce errors on my side, so I'm disabling the ability to
+ sign up for the mailing list with a GMail address. Sorry (not sorry).
+
+