dovecot part1

dove cot part2

Today I will install a dovecot server on linux, it is a pop3 /imap server on linux, just like exchange on windows. Following are the procedures
1..Install dovecot package, open pop3 110 and imaps 993 ports
yum install dovecot -y
2.find the original certificate and build a new one:
find /etc/ -name dovecot.pem
rm /etc/pki/dovecot/certs/dovecot.pem
rm /etc/pki/dovecot/private/dovecot.pem
create a certificate :
make -C /etc/pki/tls/certs dovecot.pem
 
3.edit /etc/dovecot.conf and start service
change :
protocols = pop3 imaps pop3s imap
ssl_cert_file = /etc/pki/tls/certs/dovecot.pem
ssl_key_file = /etc/pki/tls/certs/dovecot.pem
service dovecot start
chkconfig dovecot on
 
4.make iptables rules allow pop3,pop3s,imap,imaps visit:
service iptables start
chkconfig iptables on
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport pop3 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport imap -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport pop3s -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport imaps -j ACCEPT
service iptables save (!!!I forgot this, no this one, the iptable rules will be cleaned after reboot!!!)
 
5.send 2 email to user to test:
useradd rocky
useradd mary
passwd rocky
passwd mary
echo ‘test 1’ | mail -s test1 rocky@localhost
echo ‘test 2’ | mail -s test2 rocky@localhost
6. Now use rocky to login dovecot and test impas port
mutt -f imaps://rocky@localhost
now test pop3 port
telnet localhost 110
user  rocky
(username rocky)
pass 123(the password)
stat(how many emails)
retr 1 (get email 1)
quit ( quit the service)
 
finished
 
Advertisements