phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

phpBB2, Yahoo! DMARC, and Error 554 5.7.9


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
asavage
Board Member



Joined: 21 May 2013

Posts: 12



PostPosted: Thu Apr 24, 2014 3:02 am 
Post subject: phpBB2, Yahoo! DMARC, and Error 554 5.7.9

I've begun receiving these emails, bounced from Yahoo!, with this phrase:

554 5.7.9: Message not accepted for policy reasons

https://help.yahoo.com/kb/SLN7253.html?impressions=true

When a user sends an email and has the "Send a copy of this e-mail to yourself" option box checked, the email is sent twice: once to the intended target, and a copy to the user.

The email copy that goes to the user has these headers:

Subject: whatever
To: myuser@yahoo.com
Reply-to: myuser@yahoo.com
From: myuser@yahoo.com

Due to Yahoo!'s new DMARC policy, because I am sending an email from my ISP's SMTP server but with a From: address of yahoo.com, the email copy to the user is bouncing.

I think I need to change From: field in the email copy to the user, to have a From: of my board's admin email.

Any thoughts?
Back to top
StarWolf3000
Board Member



Joined: 10 Jun 2010

Posts: 103
Location: Germany


flag
PostPosted: Thu May 15, 2014 10:59 am 
Post subject: Re: phpBB2, Yahoo! DMARC, and Error 554 5.7.9

This would require that you use Yahoo's own SMTP server and not the one from your ISP. However, if you enter the SMTP settings for Yahoo in the ACP, you always "ran into problems sending mail".

The Yahoo SMTP server requires you to use STARTTLS (regardless of the port being used, which is by default 25), which isn't supported by phpBB's SMTP implementation (even not on phpBB 3.x).

I edited includes/smtp.php, admin/admin_board.php, templates/mytemplate/admin/board_config_body.tpl and lang_admin.php to provide partial support for TLS and SSL protocols (using ssl:// and tls:// prefixes and added SMTP port config option). You have to enable OpenSSL to make this work in PHP. This didn't work with Yahoo's SMTP server, but with GMail's SSL/TLS authentication.

includes/smtp.php:
Code:
Find:

if( !$socket = @fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
   message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}

Replace with:

$smtp_port = isset($board_config['smtp_port']) ? intval($board_config['smtp_port']) : 25;
if( !$socket = @fsockopen($board_config['smtp_host'], $smtp_port, $errno, $errstr, 20) )
{
   message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}

admin/admin_board.php:
Code:
Find:

"L_SMTP_SERVER" => $lang['SMTP_server'],

After add:

"L_SMTP_PORT" => $lang['SMTP_port'],

Find:

"SMTP_HOST" => $new['smtp_host'],

After add:

"SMTP_PORT" => (int) $new['smtp_port'],

language/lang_english/lang_admin.php:
Code:
Find:

$lang['SMTP_server'] = 'SMTP Server Address';

After add:

$lang['SMTP_port'] = 'SMTP Server Port';

templates/your_template/admin/board_config_body.tpl:
Code:
Find:

<tr>
   <td class="row1">{L_SMTP_SERVER}</td>
   <td class="row2"><input class="post" type="text" name="smtp_host" value="{SMTP_HOST}" size="25" maxlength="50" /></td>
</tr>

After add:

<tr>
   <td class="row1">{L_SMTP_PORT}</td>
   <td class="row2"><input class="post" type="text" name="smtp_port" value="{SMTP_PORT}" size="10" maxlength="5" /></td>
</tr>

SQL:
Code:
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25');

In ACP, enter General Configuration and scroll down to Mail Settings. There you will find the new SMTP port option with default value 25. If your SMTP server requires TLS, then prefix the address with tls:// (for example: tls://smtp.gmail.com), for SSL use ssl:// (ssl://smtp.gmail.com). There are no other authentication methods implemented than LOGIN.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0262 seconds using 15 queries. (SQL 0.0015 Parse 0.0008 Other 0.0238)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo