Install and use Dovecot as mailserver
From OpenFSG
Contents |
Required packages
- dovecot
Installing required packages
Using ipkg makes installing the required packages very easy
ipkg install dovecot
Editing dovecot configuration
Dovecot configuration is stored in /opt/etc/dovecot/dovecot.conf
vi /opt/etc/dovecot/dovecot.conf
clean the file and paste the following
## Dovecot 1.2 configuration file
base_dir = /opt/var/dovecot/run/dovecot
protocols = imap
ssl = no
disable_plaintext_auth = no
login_user = nobody
login_processes_count = 3
mail_access_groups = admin
mail_location = mbox:/home/.users/%u/mail:INBOX=/home/.users/%u/mail/mbox
auth default {
mechanisms = plain
passdb shadow {
}
userdb passwd {
}
user = root
}
log_path = /opt/var/log/dovecot/dovecot.log
listen = *
Disable default mailserver
You shouldn't disable mailserver on fsg admin page because postfix is still required! Edit the following file: /etc/inetd.conf and make it like this:
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> #pop3 stream tcp nowait root /usr/bin/ipop3d in.pop3d pop3 #imap stream tcp nowait root /usr/bin/imapd in.imapd imap #imaps stream tcp nowait root /usr/bin/imapd in.imapd imaps #pop3s stream tcp nowait root /usr/bin/ipop3d in.pop3d pop3s
Syncing the time
Because dovecot is not happy when the time is set back you should sync your system time before starting dovecot! To manage this edit dovecot startup file stored in /opt/etc/init.d/S90dovecot
vi /opt/etc/init.d/S90dovecot
and paste the following command to the second line where ntp1.t-online.de is your time server
/bin/ntpdate ntp1.t-online.de
