Setting up mail for server

Discussion in 'Site & Server Administration' started by kinggomez, Sep 8, 2011.

  1. #1
    I have just setup a server with Ubuntu in our office. Have installed Apache, MySQL and PHP5. I need to be able to send email from scripts using PHP's inbuilt mail function. What do I need to install on the server for this to work?

    I have been looking but have not been able to find a simple answer. Any help would be much appreciated.
     
    kinggomez, Sep 8, 2011 IP
  2. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #2
    You need to install a mail server. I would suggest "Dovecot". and then update your PHP.INI file accordingly.
     
    MayurGondaliya, Sep 8, 2011 IP
  3. AnthonyG

    AnthonyG Well-Known Member

    Messages:
    114
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    135
    #3
    If your only sending outbound email, then you do not need Dovecot.

    A simple install of sendmail or postfix will do, postfix would be suggestible.

    aptitude install postfix mailx
     
    AnthonyG, Sep 8, 2011 IP
  4. kinggomez

    kinggomez Active Member

    Messages:
    268
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Once I install postfix do I still need to update the php.ini file?
     
    kinggomez, Sep 8, 2011 IP
  5. erebussymk

    erebussymk Greenhorn

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    I would suggest installing Ired mail. Which is very easy and includes all most all features.
     
    erebussymk, Sep 12, 2011 IP
  6. AnthonyG

    AnthonyG Well-Known Member

    Messages:
    114
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    135
    #6
    Sorry, didnt see a update to your post, you need to config main.cf if your doing only outbound mail with postfix, php.ini is for php web pages and will have no effect on what postfix does when sending outbound mail.

    If your going to catch inbound emails, then there is quite a bit more configuration that needs to be done if you want a email client to view email on the server.
     
    AnthonyG, Sep 12, 2011 IP