I have a server set up to handle my e-mail. There are four parts:
- Postfix to send mail to the ISP.
- Getmail to fetch mail from the ISP to my local server.
- Dovecot to provide IMAP access to my e-mail.
- Roundcube as my e-mail client.
For that last item, my Roundcube config files indicate that Roundcube sends outgoing e-mail to my local server first, for routing to my ISP.
I created a handy little text file to remind myself how I configured Postfix. Here's a cleaned-up version:
Code:
When prompted during package install, set up as "Internet with smarthost".
Most of the stuff entered after this will be overwritten, so don't worry
too much.
Create some hash files for use by Postfix:
sudo vim /etc/postfix/generic
<myname> <myname>@<mydomain>
<myname>@<hostname>.local <myname>@<mydomain>
@<hostname>.local <myname>_local@<mydomain>
# Where <hostname> becomes your local hostname.
sudo postmap hash:/etc/postfix/generic
sudo touch /etc/postfix/sasl_passwd
sudo chmod 0600 /etc/postfix/sasl_passwd
sudo vim /etc/postfix/sasl_passwd
[<your_isp_smtp_name>]:submission <username>:<password>
sudo postmap hash:/etc/postfix/sasl_passwd
sudo chmod 0600 /etc/postfix/sasl_passwd*
sudo vim /etc/mailname
<hostname>.local
Make a backup copy of postfix config file:
sudo cp -v /etc/postfix/main.cf /etc/postfix/main.cf.orig
sudo vim /etc/postfix/main.cf
myhostname = <hostname>.local
myorigin = /etc/mailname
mydestination = <hostname>.local, <hostname>.<your_isp_domain>, localhost.<your_isp_domain>, localhost
relayhost = [<your_isp_smtp_name>]:submission
mailbox_command =
home_mailbox = Maildir/
inet_protocols = ipv4
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
sudo service postfix restart
Here are my self-instructions for Dovecot:
Code:
sudo cp /etc/dovecot/conf.d/10-mail.conf /etc/dovecot/conf.d/10-mail.conf.orig
sudo vim /etc/dovecot/conf.d/10-mail.conf
home_mailbox = Maildir/
sudo service dovecot restart
I use a cron job (run every 15 min) under my local host login to run getmail. And here's a sanitized version of my getmailrc file:
Code:
[retriever]
type = SimpleIMAPRetriever
server = <your_isp_imap_name>
username = <username>
password = <password>
[destination]
type = Maildir
path = ~/Maildir/
[options]
# verbose = 1
read_all = false
delete = false
delete_after = 14
Bookmarks