Results 1 to 5 of 5

Thread: Return-Path header and PHP mail()

  1. #1
    yogel is offline Member
    Join Date
    Apr 2006
    Location
    Sydney, NSW
    Posts
    13
    Rep Power
    9

    Default Return-Path header and PHP mail()

    I've got a bit of a problem on one of our web servers that also runs Zimbra as its MTA. By default, sendmail (or something buried deep within the server) adds a Return-Path header of the current user to any email sent out using the PHP mail command - for example, if Apache is running under the user apache, the return path becomes apache@yourdomain.com

    Of course, this behaviour affects reply processing etc. We use to be able to override this by setting the Return-Path header explicitly in the php code:

    For example:

    mail("to@123.com", "Subject", "Message Text", "From: from@123.com\r\nReply-To: from@123.com");

    however this no longer works, and the Reply-To header is still set to apache@yourdomain.com

    Has anyone else had this problem and fixed it? The problem seems peculiar to this one server running Zimbra.

  2. #2
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    Yeah.
    That is the default apache mailer's address.
    I would say to google changing it.

  3. #3
    shlashdot is offline New Member
    Join Date
    Dec 2006
    Posts
    3
    Rep Power
    8

    Default

    I have a linux noob question

    the wiki on installation says you have to turn off sendmail:

    "You must disable Sendmail in order to run the Zimbra Collaboration Suite. Disable the Sendmail service with these commands, chkconfig sendmail off, service sendmail stop."

    I'd like to have my other php apps able to send email with Zimbra running on the same server. (I haven't tried Zimbra yet, or Linux, but I have a box and want to). How would that work? Is the wiki just talking about installation? Do you restart Sendmail or can other apps use postfix?

    thanks in advance for the help
    Last edited by shlashdot; 02-21-2007 at 09:59 PM. Reason: unclear

  4. #4
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,486
    Rep Power
    56

    Default

    It depends how you're using send mail at the moment. Sendmail can be run from the command line or it can be run as a daemon, the wiki is talking about sendmail running permanently as a daemon. Sendmail (and every other MTA) uses port 25 to communicate, if you have sendmail running it binds to port 25 - bad, as Zimbra (postfix) uses that port so it woon't run. So, you need to disable sendmail and stop it from starting at boot time (and any other services mentioned in the docs, wiki etc.).

    If you use sendmail from the cammand line then you can continue using it that way.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    shlashdot is offline New Member
    Join Date
    Dec 2006
    Posts
    3
    Rep Power
    8

    Default

    Quote Originally Posted by phoenix View Post
    It depends how you're using send mail at the moment. Sendmail can be run from the command line or it can be run as a daemon, the wiki is talking about sendmail running permanently as a daemon. Sendmail (and every other MTA) uses port 25 to communicate, if you have sendmail running it binds to port 25 - bad, as Zimbra (postfix) uses that port so it woon't run. So, you need to disable sendmail and stop it from starting at boot time (and any other services mentioned in the docs, wiki etc.).

    If you use sendmail from the cammand line then you can continue using it that way.
    Thanks. I'm just trying to make sure php mail() will still work on a server running Zimbra. Can I just use postfix for that, like this -

    http://www.petermac.com/?p=10

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP create context header
    By bookatechie in forum Developers
    Replies: 1
    Last Post: 05-01-2007, 08:30 PM

Posting Permissions

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