Hi
I have email working, at least for some addresses. This led me to believe something in the message
is stopping my emails from getting to certain other addresses. I have an Ubuntu box, 4.7-beta4 and Sendmail
installed.
I checked my mail.log and emails are from www-data@localhost.localdomain. I think this might be the problem? I changed
the site email address on the settings page but it doesn't affect this.
I checked my php.ini file and it has
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
Which I can ignore I think?
So how do I get it to actually send from another address? Not sure if thats why my emails don't get through but its soemthing I'd
like ot fix anyway.
Any advice?
Thanks,
Mark
Comments
maybe
http://drupal.org/node/43794
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Done, but makes no difference
Hi
I did set the email address under administer->settings to something else when I first configured my site. But the logs show something different. I did double check and its definitely not set to www-data@localhost.localdomain.
Could this be a Drupal bug?
Mark
safe mode?
If PHP is running in safe mode you can't override the name of the user. I think there are some MTA settings that can result in the same behavior, but I don't know much about Sendmail.
Hi
I checked my php.ini and safe mode is off. There isn't anything obvious in my sendmail.conf file.
I am pretty sure its not sendmail though, I initially installed sendmail to send other messages with a specific from field and it worked correctly.
I think there might be a drupal bug - does anyone else have a similar problem?
Mark
If you are really sure some mails really go through ...
Setting your hostname to localhost.localdomain instead of a correctly resolved DNS name is definitely a problem. Most servers nowadays do a reverse DNS lookup to your mail server to make sure its a legitimate system. edit /etc/hosts, and /etc/sysconfig/network to point to your correct DNS name.
--
Munzir Taha
Telecommunications and Electronics Engineer
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
Maintainer of the OpenBugs project page at
http://www.arabic-fedora.org/munzir/OpenBug
Some definitely do ...
I have made my site available and a number of members have joined successfully and some can't.
I checked the email I got in my gmail account and its from localhost.localdomain. Gmail and Yahoo let them in for sure.
So thats the problem then, but I have changed the email address on my settings page but to be clear is the email address under "General settings"?
I tried changing it to something else and creating a user with an email address that I know doesn't accept emails. The log entry (mail.log) is:
To me this doesn't shed much light but maybe someone else knows whats wrong. Its clearly using though.
Stuck.
Mark
Oh wait, then that's a
Oh wait, then that's a sendmail config issue. If your sendmail server is identifying itself as localhost.localdomain then you need to tell it who you are.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
don't know how
Is it easy to do?
I tried looking in sendmail.conf nothing - but there is a file:
/etc/mail/local-host-names
I modified this to only have my machines name, ran make in /etc/mail to regenerate any files and then restarted sendmail but I get the same stuff showing up in the log file.
Do you know how its done?
Thanks for all the help.
Mark
I already explained to you.
I already showed you what files to edit but you didn't care ;)
/etc/hosts should be something like
127.0.0.1 localhost.localdomain localhost
1.2.3.4 yourdomain.com
/etc/sysconfig/network should contain
HOSTNAME=yourdomain.com
Now, don't tell me you don't have a DNS name and you just want to use your ip to send mails! ;)
--
Munzir Taha
Telecommunications and Electronics Engineer
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
Maintainer of the OpenBugs project page at
http://www.arabic-fedora.org/munzir/OpenBug
Sorry
I didn't see the instructions in your ealier message.
I apologise.
Mark
Final solution
It was a sendmail problem and sendmail was getting the hostname from the first line of the hosts file. I modified hosts in 2 ways:
became
where 111.111.111.111 is my IP.
Its all working now.
Thanks for all the help!
Mark
Saga isn't quite over ..
Hi
I get most email through now but they are still not being sent by the email address I specify in Drupal. Let me be specific - the from address is the address I set in drupal but with sendmail they are still coming from my apache username (www-data) at the correct host now.
I am getting (in a few rare cases):
This is because www-data isn't a proper user who can receive mail as I understand it. How do I actually fix this? The Drupal user setting doesn't do anything here (but does show up in the from address in the email).
Any advice?
Thanks,
Mark
Re: Saga isn't quite over
Did you ever work out how to change www-data@proper.domain.name to legaluser@proper.domain.name? I am having the same problem.
Work around
I came across this thread whilst Googling for a solution to almost exactly the same problem I've got with Drupal 5.1 and Postfix. I think I have a workaround that might help others.
Firstly, give up on trying to stop Postfix adding "www-data" to the email address. I think this is caused by Apache being run under the www-data account. Instead, go with the flow and let PHP send emails from "www-data@yourdomain.com". You can display a meaningful reply address using Drupal site config.
Do this by setting:
When the email is sent PHP/Postfix/something sets the "from" address to "www-data@yourdomain.com" but displays it in the recpient's email as "donotreply@yourdomain.com".
Needless to say if anyone has a better explanation for this or a more elegant solution I'd be keen to hear it.
Don't give up
It depends on your configuration. But for the default setup on *nix, there is a fix:
http://drupal.org/node/234421
But I'm unable to make it cross platform. If you could test and verify, that would be great.
Cheers,
Amr
Don't give up
I finally found a solution to the whole www-data@user@domain.com problem:
http://drupal.org/project/returnpath
I could kiss this guy... (no homo)
drupal7 fixes this
I was tipped off by the fact that there is no D7 version of returnpath, so I installed a test D7 site, and it didn't have this problem. The email "from" address was whatever user and domain I specified, even unrelated to the website.
But I don't want to be forced to use D7 just for this reason so I'll go back and try the D6 workarounds. I wish they'd rolled it in D6. From my php testing it seems that all that's needed is passing a -f address in the additional_parameters argument of the mail() function.
_--_
Return Path just works: install it and it takes care of the problem.
The problem is fixed in Drupal 7, so you don't need to use Return Path.