PDA

View Full Version : some question about e-mail server


kalns
February 25th, 2009, 15:46
Hi! i want to setup e-mail server at home, so i`ll try to be as clear as posible, if any more info required they just say :)

server specs:
server os: FreeBSD 7.0
lighttpd as web server
mysql 5.0
php5
as far as i know, my isp have not blocked port 25 ( atleast friend who works in my isp's company says so)

what i`m asking is :

what pop3 server should i use
what smtp server should i use
what web interface you sugest to use (i wont use outlook etc softs)
what administration tool to use?

i`m writing this post because i`m desperate.. for 3 days now i cant find any good tutorial with good explanations, either there is some mistakes in config, or installation process - big mess..

what i have tried out is
courier-imap + postfix + squirrelmail
for unknown reason, i cannot login
squirrelmail says "ERROR: Connection dropped by IMAP server."
i think db in tutorial were messt up

i`m only learning freebsd so please dont give me hard to understand examples....

Thank You for reading this topic, i hope for Your help.

kalns.

mfaridi
February 25th, 2009, 15:56
I wish this link can help you
http://www.purplehat.org/?page_id=4

hydra
February 25th, 2009, 18:57
With port 25 closed, how do you want to setup SMTP ? Plus customer IP addresses are most likely to be blocked by RBL lists, which are commonly used by mail admins.

Anyways, for SMTP use Postfix, for IMAP(s)/POP(s) use Dovecot, Postfixadmin as the web-interface, Squirrelmail for the webmail.

After 3 days you are desperate. It took me 2 months to read RFCs / documentation and to understand what e-mail is (roughly) about. Kinda funny :)

kalns
February 25th, 2009, 19:23
port 25 isnot blocked, atleast that told me one friend who is employer in isp company

sry for my bad language skills, and thanks for info :)

hydra
February 25th, 2009, 23:42
Sorry I misread that, my excuses. Anyways, with that apps, you'll do fine. Sorry again.

Maybe post your configuration if you cannot move further.

kalns
February 26th, 2009, 00:13
no need to appologise to me, i`m newbie in this and much more problems you'll read from me :(

as first is that i cannot connect to "telnet localhost 465"
it says
# telnet localhost 465
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused
telnet: Unable to connect to remote host

i dont understand where is the problem, i cann connect to port 25

with port 110 similar only this time

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

in /var/log/maillog are only this line

Feb 26 00:00:00 sctg newsyslog[69092]: logfile turned over
sctg is my username

are these major errors, or i can live with them? i`m a bit confused :(

gilinko
February 26th, 2009, 08:56
port 465 is for ssl enabled smtp traffic, and unless you have activated it and have ssl certificates linked to your MTA(postfix) it should be closed.

I would suggest that you install nmap (it's in the ports tree) and use it to scan your server for open ports instead of blindly connecting with telnet.

Your log entry seems like a periodic shift(daily) so have a look in your /var/log dir and read the older logs. Also check the auth, messages, debug and syslogs while your there. Not all "mail" related information goes to the maillog.

Kiiski
February 26th, 2009, 18:06
No need for nmap to see listening servers on localhost.
You can use example netstat or sockstat to view them.
One way:

netstat -an -f inet
or
netstat -a -f inet

if you prefer to see service names instead of port numbers

kalns
February 26th, 2009, 18:08
hmm interesting, this is what i get from server

Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 52 192.168.0.107.ssh 84.237.185.160.61329 ESTABLISHED
tcp4 0 0 192.168.0.107.smtp shark4.inbox.lv.52578 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp shark4.inbox.lv.52576 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp shark2.inbox.lv.43066 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp shark2.inbox.lv.43065 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp shark2.inbox.lv.44724 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp shark3.inbox.lv.41345 CLOSE_WAIT
tcp4 0 0 192.168.0.107.smtp 118-169-201-55.d.54869 CLOSE_WAIT

kalns
February 26th, 2009, 18:10
sry for double-posting - cant find "edit" button


Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.0.107.22 84.237.185.160.61329 ESTABLISHED
tcp4 0 0 192.168.0.107.25 89.111.3.84.52578 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 89.111.3.84.52576 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 89.111.3.82.43066 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 89.111.3.82.43065 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 89.111.3.82.44724 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 89.111.3.83.41345 CLOSE_WAIT
tcp4 0 0 192.168.0.107.25 118.169.201.55.54869 CLOSE_WAIT

Mel_Flynn
February 27th, 2009, 07:15
You're right about the lack of tutorials/how-to's that are correct and to the point.
There's one that's quite accurate (http://postfix.wiki.xs4all.nl/index.php?title=Virtual_Users_and_Domains_with_Cou rier-IMAP_and_MySQL), but lacks the webmail part, however, if you use mail/roundcube (http://www.freshports.org/mail/roundcube) it's not very hard to get working. I'd advise to stay away from Courier, for several reasons, among which experience with email systems like this. Dovecot and postfix play very nicely together, their configuration files use similar syntax and I highly doubt you will need features that Courier provides, that dovecot doesn't.

Alternatively there's a linux-oriented tutorial (http://johnny.chadda.se/2007/04/15/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/), that's a bit outdated (read the comments about the missing SQL file from recent postfixadmin releases), but also covers Postgrey and some initial spam prevention (the DSpam part unfortunately never got published).

NOTE:
The FreeBSD port for roundcube doesn't install the web installer, but tells you to edit files manually. The attached patch fixes that and you can just point your browser to the installer to configure roundcube.

kalns
February 27th, 2009, 13:48
i`m sorry for my lame but what should i do with this file ? :)

kalns
March 2nd, 2009, 23:22
i didnt want to create new topic with same problem, so i`ll just write my problem here..

when reloading postfix (i belive its not working properly)
i had an error msg where postfix couldnot find "postlog" & "postsuper" files, so i created them where it was needed, and now it says that i have no premision on them

# postfix reload
/usr/local/etc/postfix/postfix-script: /usr/sbin/postlog: Permission denied
/usr/local/etc/postfix/postfix-script: /usr/sbin/postsuper: Permission denied


so i wrote "whereis postlog" & "whereis postsuper"

# whereis postlog
postlog: /usr/local/sbin/postlog /usr/local/man/man1/postlog.1.gz
# whereis postsuper
postsuper: /usr/local/sbin/postsuper /usr/local/man/man1/postsuper.1.gz


does this mean that i have to install postfix log files or smtg ? i`m bit confused :(