Skip to content

Ubuntu Mail server : Postfix+Courier+SquirrelMail

13 November 20092 comments Debian, Engineerball, Linux, Network, TK's LAB, Ubuntu

This is instruction from me, if you want to setup mail server and use IMAP Server on Ubuntu or Debian and access the e-mail from SquirrelMail web-base. It’s work for me.

My system

  • Ubuntu Server 9.04
  1. Install Postfix mail transfer agent
  2. aptitude install postfix

  3. Install Courier imap
  4. aptitude install courier-imap courier-imap-ssl

  5. Install Apache and PHP5 for website
  6. aptitude install apache2 libapache2-mod-php5

  7. Install SquirrelMail for webmail access
  8. aptitude install squirrelmail

  9. Configuration of SquirrelMail
  10. squirrelmail-config

  11. Configuration your server and software for IMAP
  12. 1 (config your Organization name)
    2->A->8 ->courier (config your server setting)

  13. Attach SquirrelMail to Apache2
  14. cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail

  15. Enable Squirrelmail
  16. a2ensite squirrelmail

  17. Restart Apache2
  18. invoke-rc.d apache2 restart

  19. Connect to SquirrelMail
  20. http://yourserver/squirrelmail

    If you want to access the SquirrelMail via SSL (https://yourserver) the instruction below explain how to make it.

  21. Create directory for stored certificate file
  22. mkdir /etc/apache2/ssl

  23. Create certificate file name apache2.pem
  24. make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache2.pem

  25. Enable mod SSL
  26. a2enmod ssl

  27. Create file for virtualsite in apache2
  28. nano /etc/apache2/site-available/squirrelmail-ssl

    [html]
    <IfModule mod_ssl.c>
    <VirtualHost *:443>
    DocumentRoot /usr/share/squirrelmail
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache2.pem
    <Directory /usr/share/squirrelmail>
    Options Indexes FollowSymLinks
    <IfModule mod_php4.c>
    php_flag register_globals off
    </IfModule>
    <IfModule mod_php5.c>
    php_flag register_globals off
    </IfModule>
    <IfModule mod_dir.c>
    DirectoryIndex index.php
    </IfModule>
    <Files configtest.php>
    order deny,allow
    deny from all
    allow from 127.0.0.1
    </Files>
    </Directory>
    </VirtualHost>
    </Ifmodule>
    [/html]

  29. Enable site SquirrelMail with SSL
  30. a2ensite squirrelmail-ssl

  31. Restart Apache2
  32. invoke-rc.d apache2 restart

About the Author

This graet post was written by Teerapat (Ball), with a passion of Web design and Linux command line. Having a deep interest in them has driven me to learn and share this post to you.

Spread The Love, Share Our Article

  • Delicious
  • Digg
  • Newsvine
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

Related Posts

Comments

  1. sdayu November 18, 2009

    ว่างๆๆ เปลี่ยนจาก courier เป็น devecot ดูบ้านะ :D

    [Reply]

  2. J@B November 20, 2009

    โย่ววว แม๋นนน นุกนิก

    [Reply]

Trackbacks

There are no trackbacks on this entry.

Add a Comment

Required

Required

Optional