External mailserver and php mail()

Discussion in 'General' started by clintcan, Jul 27, 2007.

  1. clintcan

    clintcan New Member

    Hi there!

    I don't know where to place this, so I placed this in this section: I set up ispconfig and everything works beautifully, except for one thing: sending emails from php.

    You see, I'm using an external email server (gmail for webmasters) for the email accounts. I set up in options "external mailserver" and MX set up to the gmail mailservers.

    Using the mail() function from php, I find I can send emails to other emails, EXCEPT to emails from the site I set up in ispconfig.

    Like (for example if my site in ispconfig is domain.com):

    sending emails to otherdomains.com through mail() - successful
    sending emails to domain.com email accounts (hosted by google) through mail() php function- unsuccessful, no email received.

    I have to ask why is this not working, and is there any way to fix it? Sending emails to your own domain (although the mailserver is hosted somewhere else like gmail). I checked the gmail account - but it works ok - it sends and receives email fine.

    Thanks again!
     
  2. clintcan

    clintcan New Member

    Hi,

    Just found out that even if I changed in the ispconfig options of the mail server to external, the local-host-names in the /etc/postfix folder do not get changed. I manually deleted those domains, and whalla, it works!

    Just posting here to help guys out if they experience such issues.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You missed to set the co-domains of the websites to external mailserver too. Deleting something in the file wont help as ISPConfig will add the deleted lines again.
     
  4. pyropoptrt

    pyropoptrt New Member

    Thanks Till, I was having the same problem! Will version 3 only have one place to change this setting or two like the current version?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The current ISPConfig version has only one place too. You mix up www.domain.com and domain.com, these are two absolutely independant domains and though you must set them independantly to external mailserver.
     

Share This Page