Actions

Ubuntu Webserver and Mail Server Mk IV

From zen2

Revision as of 23:11, 17 May 2011 by Chris (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install open vmware tools from synaptic

Install Email Aggregator

As I understand it, Fetchmail ONLY gets emails from your external accounts - it doesn't send them on itself, it then uses Postfix to pass them to Dovecot.

Install Dovecot, Postfix, Fetchmail

  1. Install from Synaptic (there's apparently a problem with installing postfix with aptitude
    1. ssh
    2. dovecot-postfix
    3. fetchmailconf
  2. Choose Postfix as Local Only

Configure Dovecot

sudo gedit /etc/dovecot/dovecot-postfix.conf

Preferred place to store mail- Mail directory under home, for example: home=/var/vmail/domain/user/ mail=/var/vmail/domain/user/mail/ so modify

#mail_location = maildir:~/Maildir
mail_location = maildir:/var/mail/%u/Maildir

Generate SSL certificate

sudo openssl req -new -x509 -nodes -out /etc/ssl/certs/dovecot.pem -keyout /etc/ssl/private/dovecot.pem -days 5000

Add Users

Add users to system users ie System|Administration|Users and Groups. Create a user for each email address.

Add Email addresses to Fetchmail

  1. fetchmailconf
  2. Configure
  3. Expert Mode
  4. Add new server (use same as profile) eg amorangid9. Press enter
  5. Enter True name of amorangid9 eg deltanine.net
  6. Enter new user eg amorangi@deltanine.net, press enter
  7. Enter password, and change local name eg amorangid9
  8. Click OK on all the windows to save

Port Forwarding

Make sure you forward port 993 to the server

Add Fetchmail to Startup

To run fetchmail as a daemon add

fetchmail -d 300

where 300 is number of seconds between checks.

LAMP and web software

Install packages

  • apache2
  • php5
  • php5-gd
  • php5-mysql
  • php-pear
  • phpmyadmin
  • mysql-server
  • mysql-admin
  • cacti
  • mediawiki

PHP

Edit php.ini to increase memory_limit, max_execution_time, post_max_size, upload_max_filesize

Mediawiki

sudo gedit /etc/mediawiki/apache.conf

Enable MediaWiki by editing the following file and remove the '#' from the third line so that it reads 'Alias /mediawiki /var/lib/mediawiki