View Full Version : Sendmail/Qmail not sending emails!
LancerForums
Sat 9th Feb '02, 3:35pm
I'm running QMail on Apache and cannot send emails to my members through VBulletin. There are no errors given, but I tried sending myself an email and I've never received it... I tried two accounts and no luck :(
Here's my phpinfo:
http://www.lancerforums.com/phpinfo.php
Thanks,
Mark
eva2000
Sat 9th Feb '02, 3:39pm
that's becauase your php.ini sendmail_path is empty
LancerForums
Sat 9th Feb '02, 3:44pm
hehe, I just did that to see what would happen :) It used to be /usr/sbin/sendmail, but I noticed that there are few places where sendmail is:
/usr/sbin/sendmail
/usr/lib/sendmail
/etc/sysconfig/sendmail
/etc/rc.d/init.d/sendmail
and a few more... which do I use :confused:
Thanks,
Mark
eva2000
Sat 9th Feb '02, 3:57pm
try using
/usr/sbin/sendmail -t -i
as the path
restart apache after
LancerForums
Sat 9th Feb '02, 4:02pm
Sweet, it works! Thanks Eva
eva2000
Sat 9th Feb '02, 4:13pm
Originally posted by LancerForums
Sweet, it works! Thanks Eva no probs :)
kypdurron
Sun 21st Apr '02, 11:50pm
I'm still having a problem that all e-mail generates from me, not
the webadministrator as set on my Control Panel.
I KNOW this is because I'm using qmail. Anyone have any ideas?
kippesp
Mon 22nd Apr '02, 3:47am
kypdurron, what do you mean "generates from me"? I may be having the same situation. All of our emails generated by the mail() function will have the "Return-Path:" header with one of the user accounts (me).
But the reply-to: line is fine for us.
We're very pleased with qmail so far.
LancerForums, sounds like you didn't link to qmail's sendmail wrapper:
ln -s /var/qmail/bin/sendmail /usr/sbin
ln -s /var/qmail/bin/sendmail /usr/lib
With the wrappers, php.ini doesn't need to be modified. (Unless the wrapper has a bug like someone on php.net mentioned and I've yet to confirm.)
kypdurron
Mon 22nd Apr '02, 9:00am
That's the problem I'm having. All notices to users seem to come from my userid, not the forum admin. I'm thinking of two possible
solutions, but first asked an admin that may have solved this issue. I'll keep you posted. Hard Coding something on php.ini is not a solution, especially if you have virtual domains setup.
kippesp
Tue 23rd Apr '02, 7:48am
Sorry for getting this thread off its original topic.
kypdurron, this may not work on your system. I don't know why it works for me, while some people on php.net say that it doesn't work for them.
I've had success with 1) keeping the qmail sendmail wrapper, 2) keeping php.ini set to use sendmail a.k.a. qmail's wrapper, 3) adding the "-f$webmasteremail" as the 5th parameter to the mail() function.
For example,
mail("me@yahoo.com", "subject text", "message", "From: anyone@host.com", "-f$webmasteremail");
For vB, I think something like the above is good. But I'll use something different is user-to-user emails. I don't want bad mail comming back to my host.
gospina
Tue 23rd Apr '02, 12:18pm
try that, it didn't work..
thanks anyway.
I tried also using apache to set an environment setting (MAILUSER) and that also didn't work.
gospina
Tue 23rd Apr '02, 3:00pm
Ok...the problem is with qmail-inject, not the sendmail wrapper.
What you need to do is:
putenv ("QMAILUSER=ForumsAdmin");
putenv ("QMAILNAME=Forum Administrator");
putenv ("QMAILHOST=forum.com"); <- optional
mail ("gospina@test.com","test","another mesage");
The problem comes from all the places that "webmasteremail" is used you need to do a replace.
Also, on member.php, the following call exists:
mail($destuserinfo[email],$subject,$sendmessage,"From: \"$bbuserinfo[username]
\" <$bbuserinfo[email]>");
what does this line do? it allows to send email to someone directly and put their email address in the "from" field.
The problem is, if you want this to happen, you need to parse the $bbuserinfo[email] and separate the user and the host...
or...change the line so that it originates from the Administrator..
kippesp
Tue 23rd Apr '02, 3:13pm
Thanks. I'll give that a try. This looks like a candidate for global.php!
EDIT: It works like a champ. I'll probably add the environment variables in the global.php files to set the default. For those areas I want to change it (private emails), I'll change the default by using the 5th parameter in the mail command. Thanks very much.
gospina
Tue 23rd Apr '02, 4:03pm
Thank you. I didn't even think of adding it there (dumbass).
It also works for me!
TonyPBN
Tue 23rd Apr '02, 4:21pm
hot diggity!! its working for me too ;)
ahah, my webmaster is gonna be pissed now that HES the one getting all the bounced mails :)
DarkReaper
Tue 28th May '02, 4:51pm
I don't follow...what do you have to do?
gospina
Wed 29th May '02, 1:44pm
put the following in your global.php file:
putenv ("QMAILUSER=ForumsAdmin");
putenv ("QMAILNAME=Forum Administrator");
putenv ("QMAILHOST=forum.com"); <- optional
DarkReaper
Wed 29th May '02, 2:27pm
The one in /admin?
Also, do I need to edit those lines, or put them in as-is?
Thanks :)
gospina
Wed 29th May '02, 6:42pm
no..not the one in admin.
You should edit the values to match your Administrator and site
DarkReaper
Thu 30th May '02, 2:12pm
So something like this?
putenv ("QMAILUSER=rodzilla");
putenv ("QMAILNAME=Serious Community Forum Administrator");
putenv ("QMAILHOST=seriouscommunity.com");
gospina
Fri 31st May '02, 8:15am
that's it :)
DarkReaper
Fri 31st May '02, 10:02am
It didn't work...
DarkReaper
Sun 2nd Jun '02, 10:30am
Could someone help me with this? I tried the above and it didn't work. My host is still recieving a ton of bounced emails from my forums.
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.