After numerous hours of playing with in turned out to be multiple little items that was causing it not to work. This is what I did to create a local email server, that only sends and receives internally for testing purposes. I used CENTOS 5.5 is this example but also used Ubuntu 10.10. Here Go:
I used this how to
http://wiki.centos.org/HowTos/postfix
the same would have worked with the above
First things is first. Hostname of the box:
PHP Code:
vi /etc/sysconfig/network
HOSTNAME=TESTmail.local.com
and I edited my /etc/hosts to include the appropriate names
PHP Code:
127.0.0.1 TESTmail.local.com TESTmail localhost.localdomain localhost
I edited /etc/postfix/main.cf to include:
PHP Code:
myhostname = TESTmail.local.com
mydomain = local.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 10.0.0.0/24, 127.0.0.0/8 10.7.0.0/24
relay_domains =
home_mailbox = Maildir/
I added theses entries to /etc/dovecot.conf
PHP Code:
protocols = imap imaps pop3 pop3s
mail_location = maildir:~/Maildir
pop3_uidl_format = %08Xu%08Xv
# Required on x86_64 kernels
login_process_size = 64
Super Important -- Permission to the their respective mail directories.
PHP Code:
mkdir /home/john/Maildir
chown john:john /home/john/Maildir
chmod -R 700 /home/john/Maildir
There wasnt a need for aliases but the how-to above puts in into basic english.I then just simply started my
services:
PHP Code:
chkconfig --level 345 dovecot on
/etc/init.d/dovecot start
/etc/init.d/postfix start
At this point I needed to verify that all was working so I ran some basic test:
PHP Code:
test@testbox:~$ telnet 10.0.0.116 25
Trying 10.0.0.116...
Connected to 10.0.0.116.
Escape character is '^]'.
220 TESTMail.local.com ESMTP Postfix
mail
501 5.5.4 Syntax: MAIL FROM:<address>
mail from:tom@TESTMail.local.com
250 2.1.0 Ok
rcpt to:chris@TESTMail.local.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
this is another test
.
250 2.0.0 Ok: queued as 4E7C2430036
quit
221 2.0.0 Bye
Connection closed by foreign host.
PHP Code:
telnet 10.0.0.112 110
trying 10.0.0.112 ..
Connected to 10.0.0.112 (10.0.0.112)
Escape character is '^]'.
+OK Dovecot ready.
user test
+OK
quit
This was the critical part. Configuration of the Client: I used Evolution:
PHP Code:
fullname: test
email address: test@TESTmail.local.com
server type: POP
server <mail.server.ip>
username: test
security:no encryption
authentication: password
server type: SMTP
server: <mail.server.ip>
security:no encrytion
I just send an email to test:
PHP Code:
testuser@TESTmail.local.com
and all should go well. Using Ubuntu is slightly different but basically the same.
edit /etc/dovecot/dovecot.conf and remove the remark and change it to no or you will receive a error.
PHP Code:
-ERR Plaintext authentication disallowed on non-secure (SSL/TLS) connections.
PHP Code:
disable_plaintext_auth = no