Ubuntu Webserver and Mail Server Mk IV
From zen2
Contents
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
- Install from Synaptic (there's apparently a problem with installing postfix with aptitude
- ssh
- dovecot-postfix
- fetchmailconf
- 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
- fetchmailconf
- Configure
- Expert Mode
- Add new server (use same as profile) eg amorangid9. Press enter
- Enter True name of amorangid9 eg deltanine.net
- Enter new user eg amorangi@deltanine.net, press enter
- Enter password, and change local name eg amorangid9
- 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
