Email Server
Information from Chess Griffin during his Linux Reality Podcast Number 61
How to make a simple email server. Some acronyms:
- MUA – Mail User Agent. This is Thunderbird or Evolution etc. It is local.
- MTA – Mail Transfer Agent. Sendmail, PostFix, Exim. This is to sent emails but must be secured.
- POP / IMAP Server – Dovecot, Courier-Imap etc. The POP / Imap server sits on top of the MTA
- Mail Retreiver – Fetchmail / Getmail. Gets the emails from the server.
- Mail Filter Program – Procmail / Maildrop. Allows filtering of emails into folders.
- Remote Web Mail – Squirrelmail – web based email.
- Spam Filtering – Spam Assassin.
- Anti-Virus – Clam AV.
We are going to do the easy way here. The Local IMAP server grabs the emails from the various email addresses. Evolution will grab the emails from the Local IMAP but send directly via GMAIL or whatever.
We can use MAILDIR or MBOX to save emails. MailDir is the newer type. Each email is a file in a directory. Each directory is the folder. MBox has one big file per folder.
MailDir is easier and more common. It has CUR, NEW and TMP directories. It only has one mailbox per user though, so if you want more set up different users. I just want one big email pot for all my separate accounts so I don’t need to do this.
Install getmail (apt-get install getmail4)
mkdir ~/.getmail touch ~/.getmail/getmailrc
Install dovecot (apt-get install dovecot-common dovecot-imapd)
cd /etc/dovecot gedit dovecot.conf
Search for mail_location= and change to:
mail_location= ~/maildir
Search for protocols IMAPS is SSL and IMAP is unencrypted.
That’s all the notes I made – will try to update more later :P
Create a ~/maildir directory and make subdirs of cur, new and tmp.
Create a cron job?:
*/5* * * * lckdo -q ~/.getmail/refilter.lock getmail -q -g ~/.getmail -r getmailrc-refilter
Postfix
Has a group postfix (need a user?)
- howto
- Fetch mails from multiple pops to IMAP
- Fetchmail -> IMAP
- Mailserver in Linux
- Perfect web host and email setup
- ISP style email setup
- How to set up a mail server
