Conversation
PHPlistMailer always used getConfig('domain') as the SMTP HELO/EHLO
name. When sending through a remote SMTP server (PHPMAILERHOST), many
Exim/DirectAdmin servers reject a remote client that greets with the
server's own local domain, so sending fails even with valid SMTP
authentication.
Changing the "domain" setting is not a workaround, as it is also used
for the [DOMAIN] placeholders in the default addresses.
Add an optional PHPMAILER_HELO constant. When it is not defined or
empty, the previous behaviour (the "domain" setting) is kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PHPlistMaileralways sets the SMTP HELO/EHLO name to the list domain:When phpList sends through a remote SMTP server (
PHPMAILERHOST), the greeting is the bare list domain (e.g.mydomain.com). Many Exim/DirectAdmin mail servers reject a remote client that uses the server's own local domain as its HELO, so sending fails even with valid SMTP authentication.Changing the
domainsetting is not a workaround: it is also used for the[DOMAIN]placeholders in the default addresses (webmaster@[DOMAIN],noreply@[DOMAIN],listreports@[DOMAIN]inadmin/defaultconfig.php).Fix
Add an optional
PHPMAILER_HELOconstant:If it is not defined or empty, the current behaviour is kept, so this is fully backward compatible. A commented-out, documented example is added to
config_extended.phpnext to the otherPHPMAILER_*SMTP settings:// define('PHPMAILER_HELO', 'www.mydomain.com');This has been running as a local patch in production on 3.6.12.