Mailserver-Fehler version 2.4.3 (Bugs)

by Tommy Nilsson ⌂, Saturday, July 14, 2018, 09:19 (2084 days ago)

Hello
After updating one of my forums from version 2.3.4 to version 2.4.3, the forum can´t send mails to users - they get:

registered_send_error = Das Benutzerkonto wurde eingerichtet aber der Aktivierungslink konnte nicht gesendet werden (Mailserver-Fehler). Bitte den Administrator kontaktieren um das Konto manuell zu aktivieren.

It works fine in one of my other forums that still runs version 2.3.4.

Has this been fixed in one of the never versions?

/Tommy

Avatar

Mailserver-Fehler version 2.4.3

by Micha ⌂, Saturday, July 14, 2018, 16:16 (2084 days ago) @ Tommy Nilsson

Hi,

Has this been fixed in one of the never versions?

Version 2.3.4 was released in 2015. If I take a look to the history of the function.inc.php, nothing was changed in the area around the mail-function. The standard php mail function is called.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Mailserver-Fehler version 2.4.3

by Tommy Nilsson ⌂, Sunday, July 15, 2018, 19:15 (2083 days ago) @ Micha

Hi,

Has this been fixed in one of the never versions?


Version 2.3.4 was released in 2015. If I take a look to the history of the function.inc.php, nothing was changed in the area around the mail-function. The standard php mail function is called.

/Micha

Any idea where to look to figure out why this doesn´s work in my installation of version 2.4.3?

/Tommy

Avatar

Mailserver-Fehler version 2.4.3

by Micha ⌂, Monday, July 16, 2018, 08:22 (2082 days ago) @ Tommy Nilsson

Hi,

Any idea where to look to figure out why this doesn´s work in my installation of version 2.4.3?

The mail function my_mail is used to send mails via the forum software. So, you should validate why this functions doesn't work as expected. Maybe, you have to set some mail parameters/flags. Can you check, if the php mail function works for you (outside the forum)?

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

Mailserver-Fehler version 2.4.3

by Auge ⌂, Tuesday, July 17, 2018, 19:30 (2081 days ago) @ Tommy Nilsson

Hello

After updating one of my forums from version 2.3.4 to version 2.4.3, the forum can´t send mails to users - they get:

registered_send_error = Das Benutzerkonto wurde eingerichtet aber der Aktivierungslink konnte nicht gesendet werden (Mailserver-Fehler). Bitte den Administrator kontaktieren um das Konto manuell zu aktivieren.

There was, as Milo stated, not a single bit changed in the related function my_mail between version 2.3.4 and 2.4.3. On the other hand I'm not sure, if there was changes in the code around the function calls in the several scripts (the function is in use when registering, when posting, when mailing from the contact form …).

But, that said, it is IMHO remarkable, that noone else reported any problems at that point.

It works fine in one of my other forums that still runs version 2.3.4.

Does the forum with version 2.3.4 run on the same server as the one with version 2.4.3 (the one with the broken mailing function)?

Did you perform the test of the mailing function outside the forum, as Milo proposed?

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Mailserver-Fehler version 2.4.3

by Tommy Nilsson ⌂, Wednesday, July 18, 2018, 08:23 (2080 days ago) @ Auge

Hello

After updating one of my forums from version 2.3.4 to version 2.4.3, the forum can´t send mails to users - they get:

registered_send_error = Das Benutzerkonto wurde eingerichtet aber der Aktivierungslink konnte nicht gesendet werden (Mailserver-Fehler). Bitte den Administrator kontaktieren um das Konto manuell zu aktivieren.


There was, as Milo stated, not a single bit changed in the related function my_mail between version 2.3.4 and 2.4.3. On the other hand I'm not sure, if there was changes in the code around the function calls in the several scripts (the function is in use when registering, when posting, when mailing from the contact form …).

But, said that, it is IMHo remarkable, that noone else reported any problems at that point.

It works fine in one of my other forums that still runs version 2.3.4.


Does the forum with version 2.3.4 run on the same server as the one with version 2.4.3 (the one with the broken mailing function)?

Did you perform the test of the mailing function outside the forum, as Milo proposed?

Tschö, Auge

Hi
My mistake - it doesn´t work in version 2.3.4 either (my test worked only because I used my own mailaddress).
BUT! I think I have figured out what is wrong. My host (One.com) has blocked the option to send emails with "from" mailaddresses that does not belong to the actual domain.

Snippet from php mail:

$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

I did a couple of tests on the domain Signalposten.dk:

This didn´t work:

$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

This DID work:

$headers = 'From: info@signalposten.dk' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

Looking in the function my_mail in functions.inc.php it looks like you put the users mailaddress in the "From" field and thats why it fails.

If I´m right, you should put the forum mailaddress in the "From" field and the users mailaddress in the "Reply-to" field. My test at Signalposten.dk worked using this approach.

What are your thoughts?

BTW: I´m not the only one with this problem. My colleague in Sweden has the exact same problem (also hosted on One.com):
http://www.jvmv2.se/forum/index.php?id=208286

/Tommy

Avatar

Mailserver-Fehler version 2.4.3

by Auge ⌂, Wednesday, July 18, 2018, 08:56 (2080 days ago) @ Tommy Nilsson

Hello

Thank you for your detailed tests and explanations. Your proposal belonging the "From" and "Reply-To" headers sounds logical and promising.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

Mailserver-Fehler version 2.4.3

by Auge ⌂, Wednesday, July 18, 2018, 16:39 (2080 days ago) @ Tommy Nilsson

Hello

… it doesn´t work in version 2.3.4 either (my test worked only because I used my own mailaddress).
BUT! I think I have figured out what is wrong. My host (One.com) has blocked the option to send emails with "from" mailaddresses that does not belong to the actual domain.

As I assumed, it depends on the servers configuration.

I did a couple of tests on the domain Signalposten.dk:

This didn´t work:

$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

This DID work:

$headers = 'From: info@signalposten.dk' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

Looking in the function my_mail in functions.inc.php it looks like you put the users mailaddress in the "From" field and thats why it fails.

The "From"-header gets build from line #2254 to line #2261 of the file includes/functions.inc.php in the master branch (2018-07-17).

That's, what the code currently looks like:

  if($from == '')
   {
    $headers = "From: " . encode_mail_name($settings['forum_name'], $mail_charset, $mail_header_separator)." <".$settings['forum_email'].">". $mail_header_separator;
   }
  else
   {
    $headers  = "From: " . mail_header_filter($from) . $mail_header_separator;
   }

If I´m right, you should put the forum mailaddress in the "From" field and the users mailaddress in the "Reply-to" field. My test at Signalposten.dk worked using this approach.

Currently there is no occurence of a "Reply-To"-header. I would like to change the code to:

 
   $headers = "From: " . encode_mail_name($settings['forum_name'], $mail_charset, $mail_header_separator)." <".$settings['forum_email'].">". $mail_header_separator;
  if($from == '')
   {
    $headers .= "Reply-to: " . mail_header_filter($from) . $mail_header_separator;
   }

That way the sender ("From") is the forum in every case and a "Reply-to" header gets added, if a divergent senders address is set.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Mailserver-Fehler version 2.4.3

by Tommy Nilsson ⌂, Thursday, July 19, 2018, 07:22 (2079 days ago) @ Auge

Currently there is no occurence of a "Reply-To"-header. I would like to change the code to:

 
$headers = "From: " . encode_mail_name($settings['forum_name'], $mail_charset, $mail_header_separator)." <".$settings['forum_email'].">". $mail_header_separator;
if($from == '')
{
$headers .= "Reply-to: " . mail_header_filter($from) . $mail_header_separator;
}

That way the sender ("From") is the forum in every case and a "Reply-to" header gets added, if a divergent senders address is set.

Tschö, Auge

I hope this will solve the problem. Will this fix be included in version 2.4.13?

/Tommy

Avatar

Mailserver-Fehler version 2.4.3

by Auge ⌂, Thursday, July 19, 2018, 07:38 (2079 days ago) @ Tommy Nilsson

Hello

I would like to change the code to:

$headers = "From: " . encode_mail_name($settings['forum_name'], $mail_charset, $mail_header_separator)." <".$settings['forum_email'].">". $mail_header_separator;
if($from == '') {
$headers .= "Reply-to: " . mail_header_filter($from) . $mail_header_separator;
}

That way the sender ("From") is the forum in every case and a "Reply-to" header gets added, if a divergent senders address is set.


I hope this will solve the problem. Will this fix be included in version 2.4.13?

That's the plan.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread