#1  
Old 5th May 2012, 17:19
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
Default PHP Mail

I have setup a multiserver in Debian Squeeze.

A client of mine is using a php script to send an email of a form to himself when some one fills it out on his site.

The e-mail never arrives in his mailbox.

I am assuming this is because either my web server has no mail capabilities or it doesn't know where my mailserver is.

How do I go about rectifying this, I had a look in /etc/php5/apache2/php.ini and saw that under the mail section it said that my smtp server was localhost which I change to my mail server, is there anything else that I need to do to get it to work.

Please advise as this client needs it working urgently.
Reply With Quote
Sponsored Links
  #2  
Old 5th May 2012, 20:59
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
Default

You will need a mta. For my dedicated webserver I'm using postfix configured in satellite mode. All emails generated with the mail() are routed to the main mailserver.

You can install postfix and then with

dpkg-reconfigure postfix

choose the satellite mode.

Don't forget to add your "satellite" IP to your main mail server into "mynetworks"

Cheers
Reply With Quote
  #3  
Old 6th May 2012, 08:55
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
Default PHP Mail

Thanks so much for the reply!

I did what you said and it has worked, the only problem I am getting now is the following.

I can see the mail being tranferred to my mail server, my mail server then tries to send the mail onto my cliets mailbox hosted on another server and it gets connection timed out.

Not sure why because if I send him a mail from my gmail account it works.

See below error from log.


postfix/smtp[29084]: 6B2D2C81C5: to=<info@XXXXX.co.za>, relay=none, delay=21, delays=0.07/0.01/21/0, dsn=4.4.1, status=deferred (connect to mail.XXXXX.co.za[96.213.XXX.XX]:25: Connection timed out)

I've crossed out some info for security reasons, hope this doesn't affect anything for for.
Reply With Quote
  #4  
Old 6th May 2012, 08:57
beenfishing beenfishing is offline
Member
 
Join Date: Jan 2010
Posts: 33
Thanks: 0
Thanked 2 Times in 2 Posts
Default PHP Mail

Don't worry, I have found the problem.

Quite funny actually, I saw my typo when posting the previous post which helped my fix my problem.

Thanks again for your assistance.

Really appreciate it.

What a great forum!
Reply With Quote
  #5  
Old 6th May 2012, 14:28
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
 
Default

Glad to help you!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
issues in /var/log/apache2/error.log denpark Installation/Configuration 1 22nd November 2011 09:12
ISPConfig 3.0.3.3 Autoresponder, adding subdomain problem BlackHat Installation/Configuration 4 18th October 2011 14:24
ISPConfig3 Debian Squeeze Crontab - Log petrichbg Installation/Configuration 5 22nd March 2011 12:25
libWand.so.10 error Taxick Installation/Configuration 8 3rd May 2009 01:27
Can not recieve mail with de virtual mail adress Mounir Installation/Configuration 9 24th July 2006 23:16


All times are GMT +2. The time now is 08:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.