I've searched the forum, found a couple of tutorials on how to build a mail server but none of them work for me. I might be doing something wrong so I want to find out what.

Ubuntu Server 8.04 with two NICs:
WAN interface IP (connected to my VDSL modem, this IP is visible to the outside world with the domain name fejker.net)
LAN interface IP (connected to my WiFi access point providing internet access through the WAN interface for clients)

On the same box I have DHCP configured, Apache with PHP+MySQL, Samba is OK, FTP is OK, SSH works, so that part of the setup is OK.

I have some questions about the hosts and hostname files.

My /etc/hosts file:
Code: localhost localhost mail.fejker.net fejker-server
My /etchostname file:
Domain is setup like this:
fejker.net (G) A
fejker.net (G) MX 10:mail.fejker.net
ftp.fejker.net (G) A
irc.fejker.net (G) A
mail.fejker.net (G) A
www.fejker.net (G) A

I don't understand completely how I should set this things up so please clarify a couple of things for me. I just switched from Windows Server 2003 to Linux and setting up a mail server under Windows was easy as pie.