1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Changing "anonymous@mydomain" default PHP Sender

Discussion in 'Plesk for Linux - 8.x and Older' started by jnarvaez, Sep 5, 2007.

  1. jnarvaez

    jnarvaez Basic Pleskian

    27
     
    Joined:
    Mar 2, 2005
    Messages:
    93
    Likes Received:
    1
    Hi,

    I have a box with several domains and every user that send a mail from php without specifying "from address" the mail is sended from "anonymous@mydomain", I would like to change this to something like "not@specified".

    I have been looking into php.ini and sendmail.mc and .cf and nothing was found.

    Any help would be appreciated.
     
  2. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Try this, if this doesnt work for you - google is your friend :)

    Found this here

    Here's how the section might look on a typical Windows server, or on a Linux server without sendmail:

    [mail function]
    ; Setup for Windows systems
    SMTP = smtp.my.isp.net
    sendmail_from = me@myserver.com

    And here's how it might look on a Linux server with sendmail:

    [mail function]
    ; Setup for Linux systems
    sendmail_path = /usr/sbin/sendmail -t
    sendmail_from = me@myserver.com

    With those settings in place, restart your Web server and you're ready to go!
     
  3. jnarvaez

    jnarvaez Basic Pleskian

    27
     
    Joined:
    Mar 2, 2005
    Messages:
    93
    Likes Received:
    1
    Hi, thanks for your answer.

    Google is my best right now :D
    but I can't find any solution

    My php.ini looks like this now:

    [mail function]
    ; Setup for Linux systems
    sendmail_path = /usr/sbin/sendmail -t
    sendmail_from = me@myserver.com

    and after restarting httpd i keep recieveng php mails from anonymous@...

    any idea?
     
  4. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Yeah it was a long shot, typically that php option is only available for windows php installs since most of that stuff on linux is done by sendmail.

    Sorry I cant be more help then that right now - I'll keep thinking about it, I've done it before a couple years ago for a client but I cant remember for the life of me what i did....
     
  5. faris

    faris Guest

    0
     
    If you want different addresses for each domain, basically you need to create a vhost.conf for each domain in /home/httpd/vhosts/domain.com/conf:

    <Directory /home/httpd/vhosts/domain.com/httpdocs>
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f whatever@whatever.com"
    </Directory>

    then use websrvmng -u -a (check the syntax -- this may not be correct)

    Or you can just try adding the -f whatever@whatever.com to the sendmail path in php.ini if you want the same address for all domains on the server.

    Note that your path may be /var/www/vhosts instead of /home/httpd/vhosts

    Faris.
     
  6. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Thanks Faris,

    If Im not mistaken they can also do this in an htaccess file right?
     
  7. faris

    faris Guest

    0
     
    I don't honestly know if it can be done via an .htaccess file - I've never tried it.

    Faris.
     
  8. Deviation

    Deviation Guest

    0
     
    According to php.net you can't.. :(
    I did find this: http://forum.swsoft.com/showthread.php?s=&threadid=45074

    But changing code on each site isn't a great option either.
     
Loading...