-1

I have a SMF forum installed on my own server. But for some reason that I am unable to found, SMF send emails for new user-activation without any "from" email address, just as "apache". Obviously, most email server does not allow that and the email is never received.

I get the following postfix message to my postmaster account.

<email@dest.example.com>: host dest.example.com[255.255.255.255] said: 501
<apache>: sender address must contain a domain (in reply to MAIL FROM
command)

Reporting-MTA: dns; my.example.com
X-Postfix-Queue-ID: 62653A403D7
X-Postfix-Sender: rfc822; apache
Arrival-Date: Sat, 13 Jul 2013 01:44:57 +0200 (CEST)

Final-Recipient: rfc822; email@dest.example.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; dest.example.com
Diagnostic-Code: smtp; 501 <apache>: sender address must contain a domain

Return-Path: <apache>
Received: by my.example.com (Postfix, from userid 48)
    id 62653A403D7; Sat, 13 Jul 2013 01:44:57 +0200 (CEST)
To: email@dest.example.com
Subject: EXAMPLE TITLE
X-PHP-Originating-Script: 48:Subs-Post.php
From: "MY PAGE TITLE" <noreply@my.example.com>
Date: Fri, 12 Jul 2013 23:44:57 -0000
X-Mailer: SMF
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="SMF-2b3ce4fbf69b6d2e40cb7c5b15d5a97c"
Content-Transfer-Encoding: 7bit
Message-Id: <20130712234457.62653A403D7@my.example.com>

I think the problem may be:

  1. Some configuration for php/apache/postfix is missing.
  2. SMF need some additional configuration or has a bug.
  3. any other idea?

PS: The SMF is configured to send emails by PHP (not SMTP)

Any idea of how to solve this problem?

EDITING: Following the SMTP communication.

 In:  220 server.domain.com ESMTP Exim 4.69 Fri, 26 Jul 2013 12:51:21 -0400
 Out: EHLO my.example.com
 In:  250-server.domain.com Hello my.example.com [79.143.177.174]
 In:  250-SIZE 20971520
 In:  250-PIPELINING
 In:  250-AUTH PLAIN LOGIN
 In:  250-STARTTLS
 In:  250 HELP
 Out: MAIL FROM:<apache>
 Out: RCPT TO:<email@dest.example.com>
 Out: DATA
 In:  501 <apache>: sender address must contain a domain
 In:  503 sender not yet given
 In:  503-All RCPT commands were rejected with this error:
 In:  503-503 sender not yet given
 In:  503 Valid RCPT command must precede DATA
 Out: RSET
 Out: QUIT
 In:  250 Reset OK
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85

1 Answers1

1

Your sender is apache because your webserver runs with this local user.

To ensure that your forum is sending mails from a explicit sender you can add this information to your php.ini

sendmail_path = /usr/sbin/sendmail -t -i -F 'noreply@domain.tld' -f 'forum registration <noreply@domain.tld>'

-F => name of sender -f => from header

deagh
  • 2,647
  • 1
  • 30
  • 29