Web Hosting Forums

Results 1 to 2 of 2

This is a discussion on PHP mail() does not work on VPS network in the Hosting Talk & Chit-chat forum
Hi folks, I am new on Jag and here is my problem. I have a Jaguar VPS with Debian Sarge and Apache 2.0.54. I installed ...

  1. #1
    JPC Member
    Join Date
    Jan 2007
    Posts
    1

    PHP mail() does not work on VPS network

    Hi folks,

    I am new on Jag and here is my problem.
    I have a Jaguar VPS with Debian Sarge and Apache 2.0.54. I installed via apt-get install PHP4 and Postfix.

    But PHP mail() does not work, I do not know why...
    I set up php.ini with this variations:
    sendmail_path = /usr/sbin/sendmail
    or
    sendmail_path = "/usr/sbin/sendmail -t -i"

    PHP script looks like:
    mail("[email protected]", "test", "this is just a test mail");


    mail log file shows:
    ----------------------------------------------------------------------
    vps ~# Jan 13 08:32:00 vps postfix/pickup[5298]: D3210250CC00C: uid=33 from=<www-data>
    Jan 13 08:32:00 vps postfix/cleanup[19231]: D3210250CC00C: message-id=<[email protected] omain.com>
    Jan 13 08:32:00 vps postfix/cleanup[19231]: D3210250CC00C: to=<unknown>, relay=none, delay=0, status=bounced (No recipients specified)
    Jan 13 08:32:00 vps postfix/cleanup[19264]: D8B80250CC01D: message-id=<[email protected] omain.com>
    Jan 13 08:32:00 vps postfix/qmgr[31188]: D8B80250CC01D: from=<>, size=2207, nrcpt=1 (queue active)
    Jan 13 08:32:00 vps postfix/local[19265]: D8B80250CC01D: to=<[email protected]>, relay=local, delay=0, status=sent (delivered to command: procmail -a "$EXTENSION")
    Jan 13 08:32:00 vps postfix/qmgr[31188]: D8B80250CC01D: removed
    --------------------------------------------------------------------------

    So it seems postfix does not understand the recipient. But the from is also not found. Do not understand why...


    Well, this is the postfix config in etc/postfix/main.conf
    (I changed my domain name to: mydomain.com within this thread.)
    ------------------------------------------------
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    myhostname = vps.mydomain.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = vps.mydomain.com, localhost.mydomain.com, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 51200000
    recipient_delimiter =
    inet_interfaces = all
    ------------------------------------------

    Please take a look at
    myhostname = vps.mydomain.com
    and
    mydestination = vps.mydomain.com, localhost.mydomain.com, localhost

    Jag told me my VPS computer name is vps.mydomain.com and my VPS main domain is mydomain.com
    Could it be that here is the problem happened by the automatical apt-get install of postfix?

    I have to less experiance with VPS network (kind of network with 3 IPs) too figure out if this settings are the problem.

    I am happy for every advice or idea that may help.

    Sincerely
    Fred

  2. #2
    Not A Senior Member homoludens's Avatar
    Join Date
    Sep 2005
    Location
    H-Town
    Posts
    569
    [quote]sendmail_path = /usr/sbin/sendmail/[quote]

    I take it that's the path to your sendmail wrapper and that you don't actually have sendmail installed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •