Skip to content
Snippets Groups Projects
Commit 441574a3 authored by Noah Hall's avatar Noah Hall
Browse files

change spamtrap/registration form behavior to avoid using up mailgun quota on spam

parent 41184432
Branches
No related tags found
No related merge requests found
......@@ -128,6 +128,10 @@ app.post('/registration', (req, res) => {
return (err) => submitlog.info(`$message: `, err);
}
// This function logs spamtrap hits, we just need to drop spam.
// Previously we sent a false ack email to spam requests, but
// this was causing problems with Mailgun! So, no more false acks.
if (!spamTrap(req.body)) {
if (req.body.email) {
// Send acknowledgement email to registrant
const acknowledgementConfig = {
......@@ -150,10 +154,6 @@ app.post('/registration', (req, res) => {
maillog.error(`cannot send registration acknowledgement, no email set in registration`);
}
// This function logs spamtrap hits, we just need to drop spam
// (transparently to the spammer). i.e. We send the registration
// notification (above), but nothing else.
if (!spamTrap(req.body)) {
if (gitlab) {
try {
gitlab.newRegistrationIssue(templateContext)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment