Reputation: 14825
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 protected]>: 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 protected]
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 protected]
Subject: EXAMPLE TITLE
X-PHP-Originating-Script: 48:Subs-Post.php
From: "MY PAGE TITLE" <[email protected]>
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: <[email protected]>
I think the problem may be:
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 protected]>
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
Upvotes: -1
Views: 2468
Reputation: 2722
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 '[email protected]' -f 'forum registration <[email protected]>'
-F => name of sender -f => from header
Upvotes: 1