Jump to content

Wrong from address in automatic email


w-sky

Recommended Posts

Hi there, I'm sorry, but I am continously getting bogus "from" addresses in the email sent by Revive!

Using Revive Adserver v4.0.2 running on Apache, PHP 7.0.22 and MySQL 5.5.57-0+deb8u1, OPcache enabled.

Instead of the name and address specified in the email section of the configuration, the mails now have the (nonexisting) username "a" and the domain name of our server as sender's address (which will not work for receiving email):

From: "a" <[email protected]>

What can I do? Though the parameter "logOutgoing=1" is configured, I can not find an email log in the revive/var folders.

Edited by w-sky
you should not write [email] just like this
Link to comment
Share on other sites

  • 1 month later...

Well I'm confused too. This malfunction appeared just out of nowhere, neither configuration of Revive nor PHP was changed. To see if it helps. I changed the from address at email settings more than once, settings are being saved and I can see them in .conf.php file – but they don't work.

The mails I receive are showing this address:

From: "a" <[email protected]>

The mails some customers receive show this senders address:

From: "Default Account" <[email protected]>

Which is a valid address at "our-main-domain", but it is not used in Revive anywhere. However, all other mail sending applications on the same server as this Revive instance, Wordpress and plugins of Wordpress, don't show any problem using PHP sendmail. The server is running PHP 7.0 wit OPCache. (though we will soon switch to 7.1) and it's a managed server, so I am controlling just a few options like extensions and everything else is "full standard".

I am not sure at all it's a server problem. But still I would be glad for any help.

Link to comment
Share on other sites

  • 10 months later...

Was this ever resolved? I have a problem with Revive sending emails out from php-fpm@server because Revive does not set the envelope sender (only the from header is set from the address specified in the admin).

If Revive is using PHP mail() directly, there's a 5th parameter which can be used to set this:

"For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option."
http://php.net/manual/en/function.mail.php

Is there a fix or workaround?

Link to comment
Share on other sites

It is not resolved, at least for us. Until August 2017 everything was fine: the "From:" address of all Revive mails was exactly as saved in settings. Since then, it is looking like this:

From: a <[email protected]>

"server01" is the technical server name (not our domain name) and "our-hoster.com" is the domain name of our hosting service. Where the "a" does come from, I do not know.

I am not sure what has happened in August 2017. Maybe it started with PHP updates? We were using 7.0 in 2017, now 7.1, soon 7.2

 

Link to comment
Share on other sites

It's not always possible or desirable to set the envelope sender system wide (https://stackoverflow.com/questions/24183058/how-can-i-force-the-from-header-envelope-sender-in-php-without-putting-it-in) in my view, Revive should be setting the envelope sender properly when calling the mail function.

Libraries like Swift Mailer, PHPMailer et al already do this or let you specify it.

Link to comment
Share on other sites

On 8/12/2018 at 5:44 AM, andrewatfornax said:

Hi @w-sky,

Yes, I'm pretty sure this all comes from your PHP configuration. 

Here are all PHP configuration options and their current settings which are available from my hoster:

display_errors – off
allow_url_fopen – off
expose_php – off
mbstring.func_overload – 0
memory_limit – 160M
max_execution_time – 60
upload_max_filesize – 30M
max_file_uploads – 20
max_input_vars – 1000
extensions – none (available: APC, ImageMagick)
zend_extensions – none (available: Ioncube Loader, Source Guardian, eAccelerator, Zend Guard, OPcache, XDebug)

However I think none of these will help with mail problems. :(

 

Link to comment
Share on other sites

10 hours ago, jamieburchell said:

It's not always possible or desirable to set the envelope sender system wide (https://stackoverflow.com/questions/24183058/how-can-i-force-the-from-header-envelope-sender-in-php-without-putting-it-in) in my view, Revive should be setting the envelope sender properly when calling the mail function.

Agreed. Please raise a ticket and https://documentation.revive-adserver.com/display/DOCS/Missing+Features ! Thanks.

8 hours ago, w-sky said:

However I think none of these will help with mail problems. ?

Correct - please see the PHP documentation linked to from the page above re: how to set this.

Link to comment
Share on other sites

On 8/15/2018 at 12:42 AM, andrewatfornax said:

Correct - please see the PHP documentation linked to from the page above re: how to set this.

Unfortunately I can't. The list of PHP settings in my post above are ALL settings which are available to me (using a "managed server"). For any other changes to PHP settings I will have to open a support ticket at my hoster and ask them to change the configuration, and they might not agree since it is not a PHP error.

 

Link to comment
Share on other sites

  • 1 year later...

Please can I request that the Revive team take another look at this, as it's still an issue today.

I already took the step to force an envelope sender address:

php_value[sendmail_path] = /usr/sbin/sendmail -t -i -f[email protected]

But if you see, it's the other from address that is getting set/mangled by Revive:

To: "Administrator" <team@xxx>
Subject: Impending campaign expiration: XXX
X-PHP-Originating-Script: 1005:Email.php
...
From: "n" <[email protected]>
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 [email protected] header.s=krs header.b="b/nn6hqL";       spf=pass
 (google.com: domain of [email protected] designates XXX as
 permitted sender) [email protected]

 

Line in maillog:

Sep 12 00:05:03 x postfix/cleanup[1549]: 9F27F4696CC: prepend: header From: "n" <n> from local; from=<[email protected]>: X-Mailgun-Native-Send: true

In my Revive config:

[ email ] (without spaces)
logOutgoing=1
headers=
qmailPatch=
fromName="Admin"
fromAddress="[email protected]"
fromCompany="My Company"
useManagerDetails=

Further, all of my Advertisers have email addresses and names configured.

I think there's at least one potential issue in the Email.php file:

https://github.com/revive-adserver/revive-adserver/blob/master/lib/OA/Email.php#L53

What happens if $aConf['email']['useManagerDetails'] is false? $aFromDetails does not get defined but is used further down.

TIA

Jamie

 

Edited by jamieburchell
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...