Postavljanje mail servera – Dovecot+Imap – deo 2

Deo 2 postavljanja mail servera srednje veličine na Fedoa 16 OS-u.

Sledeći deo je instalacija i konfiguracija Dovecot-a (više nema imap servisa).
On inače otvara port 110.
Konfiguracioni fajl je /etc /dovecot/dovecot.conf, a neophodni paketi su :
# rpm -qa|grep dovecot
dovecot-mysql-2.0.19-1.fc16.i686
dovecot-devel-2.0.19-1.fc16.i686
dovecot-pigeonhole-2.0.19-1.fc16.i686
dovecot-2.0.19-1.fc16.i686
dovecot-pgsql-2.0.19-1.fc16.i686

Konfiguracioni fajl /etc/dovecot/dovecot.conf, Fedora 16 :
!include conf.d/*.conf
protocols = imap pop3 lmtp ako ne želimo ssl komunikaciju
dict {
}
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
pop3_uidl_format = %08Xu%08Xv
listen = *
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh bez ova dva workaround-a
imap_client_workarounds = outlook-idle
Microsoft Outlook ne ume da skine mail sa servera
login_trusted_networks = 10.0.0.0/8
log_path = /var/log/dovecot.log odvajanje logova iz messages
ssl = no ako ne želimo da Dovecot otvori pop3s i imaps portove
#####################
protocol imap {
listen = 127.0.0.1:143 imap i treba da sluša samo u lokalu
# ssl_listen = 127.0.0.1:993
}
protocol pop3 {
listen = 10.11.12.14:110 POP3 je otvoren na sopstvenoj IP servera
# ssl_listen = 127.0.0.1:993
}

Ako koristimo CentOS 6U5, ovaj fajl izgleda drugačije :
PS ovaj fajl se može generisati konadom : # doveconf -n > dovecot-new.conf ako vam se javi mnogo grešaka pri startovanju Dovecot servisa, sa gornjom konfiguracijom npr 😉
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.el6.x86_64 x86_64 CentOS release 6.5 (Final)
listen = *
log_path = /var/log/dovecot.log
login_trusted_networks = 10.0.0.0/8
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
mail_access_groups=mail
Paziti ako se ovaj red ne doda javiće se greške, jer Dovecot neće imati prava da kreira foldere u /home folderu korisnika. Mail je user pod kojim se vrti Sendmail (proveriti!)
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
mbox_write_locks = fcntl
passdb {
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
service imap-login {
inet_listener imap {
address = 127.0.0.1
port = 143
}
}
service pop3-login {
inet_listener pop3 {
address = 10.10.10.38 ovo je IP adresa samog servera
port = 110
}
}
ssl = no
ssl_cert = Testiranje 1
Stratovati servis.
Provera rada :
# netstat -tulpn|grep dovecot
tcp 0 0 10.11.12.14:110 0.0.0.0:* LISTEN 2699/dovecot
tcp 0 0 127.0.0.1:143 0.0.0.0:* LISTEN 2699/dovecot

I naravno postaviti da se servis startuje svaki put pri resetu servera :
# chkconfig –level 123456 dovecot on
Napomena : ispred reči “level” su dva znaka minus!

Testiranje 2
# telnet 10.10.10.38 110
Trying 10.10.10.38…
Connected to 10.10.10.38 (10.10.10.38).
Escape character is ‘^]’.
+OK Dovecot ready.
user moj.nalog
+OK
pass moja.lozinka
+OK Logged in.

Ako se ovde javljaju greške, videti moj post.

This entry was posted in Linux and tagged . Bookmark the permalink.

Comments are closed.