LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ubuntu, XAMPP Server, PHP and sendmail issues (http://www.linuxquestions.org/questions/linux-server-73/ubuntu-xampp-server-php-and-sendmail-issues-854886/)

tkokkinos 01-07-2011 03:51 PM

Ubuntu, XAMPP Server, PHP and sendmail issues
 
Please forgive my ignorance. I checked the forums and was overwhelmed by sendmail info.

My basic issue is this. I use Ubuntu 10.4 (works GREAT!), setup an XAMPP server, and I want to test a web email form on the XAMPP server.

I just finished an intensive HTML/Javascript class and have set up a web page with a form to email the form data. Being pumped to try this stuff out, I found a PHP script for forms which works and adapted it for the fields on my form. The form loads fine, reads the fields OK, I click the Send Mail button after filling in the data and get the successful send page with message sent (blah, blah, blah).

I use Evolution email program with my Windstream email account but this message never gets there.

They say "Fools go where angels fear to tread" and I am just crazy enough to play with this. I just cannot get the information to my SMTP email. I figure that I cannot hurt anything unless I get crazy editing config files (which I am not going to do). However, I researched this and found that my php.ini file may need editing for sendmail_path and sendmail_from. I did this as follows:

sendmail_path = /usr/sbin/sendmail -t
sendmail_from = (my email address) it said me@myserver.com and I may have this set wrong.

I reloaded XAMPP and nothing again. The help on the web is so conflicting and often just plain wrong - very aggravating.

Can any of you experienced guys tell this duffer what he needs to do to get this sending to my email? The ultimate goal is to have a page like this running on a LINUX hosting server for a small construction company. Right now, I am just trying to prove out the technology.

Thanks for your patience and help.
Ted Kokenos

thedonkdonk 01-07-2011 05:08 PM

My first recommendation would be to stop using sendmail. Check out https://help.ubuntu.com/community/Po...asicSetupHowto for info about setting up postfix.

Second, comment those lines in your php.ini. You want to use the mail() in php. http://php.net/manual/en/function.mail.php

FYI, after any changes in your php.ini file are made, you need to restart apache.

Let me know if you have any questions.

tkokkinos 01-10-2011 12:13 PM

Postfix, PHP mail(), etc.
 
Thanks for your help and advice.

I installed Postfix and was surprised the amount of files processed in the terminal. I'm at a loss to understand why the XAMPP install did not do this correctly. I followed your instructions and also commented out the sendmail lines. I used MX to do a DNS lookup for my email and the mx01 is the #1 preference for windstream.net domain (see next paragraph).

I reloaded postfix and resent my form data. It looks like the mail is finally going to my mail server but checking the mail.info log under /var/log I see the following:
Jan 10 13:02:13 ted-desktop postfix/error[4667]: D6FAC182AEB: to=<tkokkinos@windstream.net>, relay=none, delay=366, delays=366/0.01/0/0.09, dsn=4.7.1, status=deferred (host mx01.windstream.net[162.39.147.49] refused to talk to me: 554 5.7.1 - ERROR: Mail Refused - <173.188.48.94> - See http://www.spamhaus.org/query/bl?ip=173.188.48.94) ------> at least now it is finding my email address correctly.

**************************************
Checking out this spamhaus.org link I see:
Ref: PBL424785
173.188.32.0/19 is listed on the Policy Block List (PBL)
Outbound Email Policy of Windstream Communications for this IP range:

It is the policy of Windstream Communications that unauthenticated email sent from this IP address should be sent out only via the designated outbound mail server allocated to Windstream Communications customers. To find the hostname of the correct mail server to use, customers should consult the original signup documentation or contact Windstream Communications Technical Support.

**************************************
Looking at this, is seems obvious that now my problem is some type of blocking by Windstream. I guess that I can test this using a Gmail account or some other such nonsense.

Do I need to do some type of authenication or is Windstream just being a pain and my best bet is to use another email server like Gmail?

Regards,
Ted Kokenos

tkokkinos 01-10-2011 12:27 PM

2nd reply - Postfix and mail (PHP)
 
I decided to try another email address/server and lo-and-behold, I got the message sent.

Evidently Windstream does not like this kind of stuff and possibly you can elaborate, per my first response.

At least now, I can play with the form.

Thanks again and I look forward to your advice on the Windstream issue.

Best regards,\
Ted Kokenos


All times are GMT -5. The time now is 10:59 PM.