Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    May 2004
    Posts
    14

    Default How can i send mail from php script where localhost resolves to accounts domain

    Hi All, i have a server running WHM/cPanel most up to date. Mail server is Exim.

    I have about 10 accounts on the server that use php scripts to send mail. Password recover, order updates etc.

    Many of the emails sent from the scripts are undeliverable because the from address and the reverse looked up domain are different. Is there some way to force localhost to resolve to the cPanel account's domain in the case of the mail scripts? I have PTR records for domains but localhost resolves to the main IP of the machine which is a different domain/host name with no PTR record.

    Hopefully i am making this clear. PHP attempts to send mail from person@domain1.com using localhost. Localhost actual resolves to a different ip than domain1.com so the reverse lookup/PTR shows domain2.com.

  2. #2
    Member
    Join Date
    May 2004
    Posts
    14

    Default Re: How can i send mail from php script where localhost resolves to accounts domain

    More info. PLEASE help if you have any info.

    I have copied these instruction to a t Changing the Sending IP for Outbound Email in Exim

    with absolutely no effect. My PTR for the domain i have set in mailips and mail_helo is correct. And yet sending mail ALWAYS come from my server's main domain nobody@main.serverdomain.com.

    It makes no sense. As though exim is completely ignoring any config i change. This is extremely frustrating.

    How can a shared IP be useful at all for sending mail from web scripts? Without the account's domain being used most major email providers (hotmail, gmail, yahoo, etc etc) will reject the mail.

    Someone help please. I've also tried setting the interface to the IP i want (whose valid PTR returns the domain i want to use) and STILL the mail is delivered as the main server domain.

Similar Threads & Tags
Similar threads

  1. how to browse IIS accounts before domain resolves to ip?
    By tmoney01 in forum Enkompass Discussions
    Replies: 8
    Last Post: 04-05-2011, 08:51 AM
  2. PHP Form Mail script does not send mail
    By fr0gman in forum New User Questions
    Replies: 11
    Last Post: 12-08-2007, 10:48 PM
  3. Horde send mail issue Failed to connect to localhost:25
    By zealich in forum E-mail Discussions
    Replies: 1
    Last Post: 09-06-2007, 09:01 PM
  4. Create e-mail accounts with php script
    By agustinsp in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-28-2007, 09:43 AM
  5. Set PHP to send mail as webmaster@domain?
    By webignition in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-06-2005, 08:39 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube