Loading ...
Sorry, an error occurred while loading the content.

Re: sending mail with php via postfix to another mail server running on the same machine

Expand Messages
  • Victor Duchovni
    ... Try: # Use any valid name that is not equal to the domain # in the server greeting. If localhost.shenzhenparty.com # is listed in DNS (and resolves to
    Message 1 of 2 , Jun 1, 2006
    • 0 Attachment
      On Thu, Jun 01, 2006 at 02:33:40PM +0800, Brent Deverman wrote:

      > Hello, I am administering a Mac OS X 10.4.6 server running another
      > mail server called EIIMS:
      >
      > http://www.eudora.co.nz/
      >
      > If you are not familiar it is originally a Mac program ported to Mac
      > OS X so it does not have support for the normal unix mail server
      > mechanisms. This means that the built-in php mail function cannot
      > send email to using EIMS. Therefore I need to use postfix to send
      > mail from php.
      >
      > I had postfix configured properly as a "Null Client" so that postfix
      > delivers mail to another server and doesn't try to deliver mail to
      > itself or listen for new mail coming in. I got the instructions for
      > the null client from here:
      >
      > http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client
      >
      > I was able to successfully send email to the same server it by
      > tricking postfix and not using a fully
      > qualified domain (shenzhenparty) name for the hostname. Now that I
      > want to use Open Directory on my server, I have to use a FQDN for my
      > servers hostname (shenzhenparty.com). Now postfix is able to detect a
      > mail loop again.
      >
      > I need to send email through the standard php mail command from my
      > php scripts because many scripts written by others use this command.
      > (Rewriting all the php apps written by third parties to uses another
      > mail library is not an option.)
      >
      > This was working fine but I have changed my server to use open
      > directory and in the process, I had to change the hostname of my
      > server from shenzhenparty to shenzhenparty.com. My original server
      > name was not a fully qualified domain name and so postfix didn't know
      > it was sending mail to the same server.
      >
      > You can take a look at the log below:
      >
      > ----------
      > May 29 14:30:21 shenzhenparty postfix/smtp[23302]: warning: host
      > mail.shenzhenparty.com[210.17.235.228] greeted me with my own
      > hostname shenzhenparty.com
      > May 29 14:30:21 shenzhenparty postfix/smtp[23302]: warning: host
      > mail.shenzhenparty.com[210.17.235.228] replied to HELO/EHLO with my
      > own hostname shenzhenparty.com
      > May 29 14:30:21 shenzhenparty postfix/smtp[23302]: 506E15F725C:
      > to=<szclassifieds@...>, relay=mail.shenzhenparty.com
      > [210.17.235.228], delay=0, status=bounced (mail for
      > mail.shenzhenparty.com loops back to myself)

      Try:

      # Use any valid name that is not equal to the domain
      # in the server greeting. If localhost.shenzhenparty.com
      # is listed in DNS (and resolves to 127.0.0.1), use that.
      #
      myhostname = mail.shenzhenparty.com
      #
      # Still, Use the domain to qualify unqualified email addresses.
      #
      myorigin = shenzhenparty.com

      > shenzhenparty:~ deverman$ postconf -n
      > inet_interfaces = localhost

      Use "127.0.0.1", or with Postfix 2.2 and later: "loopback-only" (without the
      double quotes).

      > mydomain = shenzhenparty.com
      > mynetworks_style = host
      > myorigin = $mydomain
      > relayhost = mail.shenzhenparty.com
      > sample_directory = /usr/share/doc/postfix/examples

      > As postfix has given me a lot of trouble on this issue I don't see
      > switching from EIMS to postfix as a viable option just to get php
      > emails working on a Mac OS X Server.

      This is not constructive here. We can take our toys and go play in our
      own sandbox too.

      --
      Viktor.

      P.S. Morgan Stanley is looking for a New York City based, Senior Unix
      system/email administrator to architect and sustain the Unix email
      environment. If you are interested, please drop me a note.

      Disclaimer: off-list followups get on-list replies or get ignored.
      Please do not ignore the "Reply-To" header.

      To unsubscribe from the postfix-users list, visit
      http://www.postfix.org/lists.html or click the link below:
      <mailto:majordomo@...?body=unsubscribe%20postfix-users>

      If my response solves your problem, the best way to thank me is to not
      send an "it worked, thanks" follow-up. If you must respond, please put
      "It worked, thanks" in the "Subject" so I can delete these quickly.
    Your message has been successfully submitted and would be delivered to recipients shortly.