Project

General

Profile

Actions

Bug #22541

closed

t3lib_readmail->analyseReturnError() doesn't recognize "Bad host"-Messages from sendmail

Added by Stephan Großberndt over 14 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-04-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

A mail that could not be delivered by sendmail due to a bad host and was returned is not correctly categorized by t3lib_readmail->analyseReturnError()

I have included a patch to fix the issue.

This is the message from the "Undelivered mail returning to sender"-mail:

This is the mail system at host <host>.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<>: Host or domain name not found. Name service
error for name=sdffsdsdsfddgdgd.de type=A: Host not found

(issue imported from #M14240)


Files

Actions #1

Updated by Chris topher over 14 years ago

Hi Stephan,

thank you for your patch!

Please send it to the Core List!
To see what to do, check out http://typo3.org/teams/core/core-mailinglist-rules/

Actions #2

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Stephan Großberndt over 11 years ago

Yes, the issue still exists. The else-if statement to set the correct reason (bad host instead of unknown) for return of non-qmail, non-postfix return mails has to be added in line 199 in 4.5.26.

I guess this has not changed fundamentally in 6.1, so it should apply there too.

Since the PHP Manual states not to use preg_match for pure checking if one string contains another for performance reasons I modified the code (as well for the added else-if for bad host as for the following two cases:

} else if (stristr($cp['reason_text'], 'Host or domain name not found') || stristr($cp['reason_text'], 'Host not found')) {
    $cp['reason'] = 2; // Bad host
} else if (stristr($cp['reason_text'], 'over quota') || stristr($cp['reason_text'], 'mailbox full')) {
    $cp['reason'] = 551; // Mailbox full
} else if (stristr($cp['reason_text'], 'Error in Header')) {
    $cp['reason'] = 554;
Actions #4

Updated by Alexander Opitz over 11 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Christian Kuhn almost 10 years ago

  • Status changed from New to Rejected
  • Is Regression set to No

This issue will not be solved in 4.5 anymore since this version is in security-only mode now.

class t3lib_readmail was removed from core with version 6.2 in favor of swiftmailer api, so the issue is not valid there anymore.

Actions

Also available in: Atom PDF