forwardemail / forwardemail/forwardemail.net

Outbound SMTP relay ignores domain adult-content/phishing protection settings

Open Beginner friendly
#586 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.7k
Forks
203
PR merge metrics
No merged PRs in 30d

Description

Outbound messages sent via SMTP relay are unconditionally scanned for phishing, malware, and adult-content links (via Cloudflare's Family and Security DNS resolvers) in Emails.queue(), app/models/emails.js around lines 1787 to 1889, regardless of the domain's has_adult_content_protection / has_phishing_protection settings (app/models/domains.js, lines 358 to 365, both default true). The domain object is fully loaded in that function, but neither field is ever referenced there.

Repro: uncheck "Adult-related content protection" on a domain's Advanced Settings page, then send an outbound message via SMTP relay containing a link to a hostname Cloudflare's Family DNS (family.cloudflare-dns.com) categorizes as adult/sensitive. The message still bounces with a 554 5.6.0 from the same check the toggle is supposed to control.

Expected: unchecking the setting suppresses the adult-content portion of this check for outbound sends, matching how it's described on the settings page and in the FAQ.

Actual: the setting has no effect on outbound relay, the check always runs.

Suggested fix: gate the message-building logic in Emails.queue() on domain.has_adult_content_protection / domain.has_phishing_protection, mirroring the equivalent (currently inactive, see Issue 2) logic in helpers/get-recipients.js lines 137 to 165.

Contributor guide

Open the contributing guide

Research direction

Start in app/models/emails.js, reading Emails.queue() around lines 1787–1889, then compare the protection logic in helpers/get-recipients.js lines 137–165 and the settings fields in app/models/domains.js lines 358–365. Done means outbound SMTP relay checks honor the domain’s adult-content and phishing protection settings, including the reported adult-content toggle scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.