phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017933phplist applicationEmailpublic17-11-15 20:2301-12-15 23:50
Reporterpoolet1 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.2.3 
Target VersionNeeds more infoFixed in Version3.2.4 
Summary0017933: Incorrect Hostname Provided to SMTP Server
DescriptionHostname reported via SMTP is the website address instead of the domain name. Settings configured in Config -> Settings in the web GUI. While I imagine these are often the same, I wasn't able to send email because I'm running phpList on a different port and that caused the SMTP server to give an 'invalid host name' error. I saw on tcpdump that the "Website address (without http://)" [^] setting was being provided instead of the "Domain Name of your server (for email)".
Steps To Reproduceran command:
tcpdump -i <interface> port 25 -X
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0057354)
michiel (manager)
28-11-15 17:08


phpMailer will use the "Hostname" for the SMTP greeting.

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/PHPMailer/class.smtp.php#L706 [^]
https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/PHPMailer/class.phpmailer.php#L1580 [^]


This is set in phpList here: https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/class.phplistmailer.php#L128 [^]

which is first taken from the SERVER_NAME and then it will fall back to the "domain" config setting.

Check that your servername is correct.
(0057366)
duncanc (developer)
30-11-15 23:04

I don't think that this is working as you intend.

phpmailer uses $this->Helo

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/PHPMailer/class.phpmailer.php#L1579 [^]

which is set by phplistmailer to the website address

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/class.phplistmailer.php#L116 [^]

This is confirmed by using smtp debug

CLIENT -> SERVER: EHLO www.dcameron.me.uk

which is my value for "website address", not the "domain name of your server".
(0057367)
michiel (manager)
01-12-15 08:28

But is www.dcameron.me.uk your SERVER_NAME ? Then it is as expected.

I guess we can change it to use the config domain and fall back to SERVER_NAME instead.
(0057368)
duncanc (developer)
01-12-15 09:02

I was trying to explain how the code currently seems to work.

phpmailer uses $this->Helo and if that is not set falls back to use $this->Hostname.

But the code in phplistmailer always seems to set $this->Helo to the website address. It does also set $this->Hostname to SERVER_NAME but because of setting this->Helo that is not used.
(0057371)
michiel (manager)
01-12-15 23:46

Ah, yes, true. phplistmailer sets the Helo,

so https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/class.phplistmailer.php#L128 [^] is not used.

It makes more sense to set the Helo to the "domain" setting. Will change that.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker