PHP Mail

Discussion in 'Installation/Configuration' started by beenfishing, May 5, 2012.

  1. beenfishing

    beenfishing New Member

    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.
  2. pititis

    pititis Member

    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"

  3. beenfishing

    beenfishing New Member

    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=<[email protected]>, relay=none, delay=21, delays=0.07/0.01/21/0, dsn=4.4.1, status=deferred (connect to[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.
  4. beenfishing

    beenfishing New Member

    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!
  5. pititis

    pititis Member

    Glad to help you!

Share This Page