There are various mail servers popular now a days. Once i heard that You are not a system admin if you have not configured Sendmail once, you are crazy if you configured it twice. Sendmail is one of the oldest mail servers. There are other different mail servers which are popular now a days but Nix* lovers still use sendmail as they beleive
"Old is Gold". Please Contact me cyberbob.thedarklord@gmail.com so that i can improve this howto.

Note:
Editing sendmail.cf is not appreciated,as this file is a little bit
buggy and might confuse you, so it would be better idea that you edit sendmail.mc and that export the all changes made in sendmail.mc
to sendmail.cf file by using 'm4' utility. Also as we have seen that lines
in a nix* config file can be commented by placing '#' at the start of a line but the behaviour of sendmail.mc file is a little bit different you have to put 'dnl' at the start of the line to comment it.

Now we will do a minimal configuration of sendmail server.

Search out for the word DEAMON_OPTIONS and change the file like this,you
can put the address of your personal smtp server in place of 192.168.0.1

DAEMON_OPTIONS(`Port=smtp,Addr=192.168.0.1,27.0.0.1, Name=MTA')dnl

Now search out for the word CLIENT_OPTIONS, you
can put the address of your personal server in place of 192.168.0.1

CLIENT_OPTIONS(`Family=inet,Address=192.168.0.0')dnl

Now search out for the word LOCAL_DOMAIN,and uncomment it

LOCAL_DOMAIN(`localhost.localdomain')dnl

Now search out for the word MASQUERADE_AS,and give the your
domain name. Like it my case, I am using cyberdyne.net as domain name.

MASQUERADE_AS(`cyberdyne.net')dnl
uncomment the below given lines so that localhost/localhost.localdomain
can should be MASQUERADED.
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl

By Default relaying is only allowed to localhost you have to enable will be denied you have to enable relying editing the file /etc/mail/access.db but the problem with this file is that it is binary format
so you would not be able to edit this file but you can edit the text version of this file but edit the below file

/etc/mail/access
Give the all domain names onwhich relaying is accepted, Like this:

# local-host-names - include all aliases for your machine here.
pc1.cyberdyne.net
cyberdyne.net
localhost
localhost.localdomain
Now you have to made changes exported to access.db file, this can be done by generating the binary from the text version of access.db file. Use this command to perform this task.

makemap hash /etc/mail/access.db < /etc/mail/access

Now open the below file and add all the possible names of your mail server. Like this:

Configuring IMAP AND POP3:
Configuring IMAP & POP3 under kernel 2.2:
In kernel 2.2 you have to change /etc/inetd.conf file. Just open the /etc/inetd.conf file and search out for imap & pop3 and uncomment the lines which have the keywords pop3 and imap like this:

Now you have to restart the inetd to make changes work for you, you can do this by issuing this command to restart inetdd

killall -HUP inetd
Configuring IMAP & POP3 under kernel 2.4:
In kernel 2.4 these services run under xinetd. xinetd manages these services you can configure these services under the directory /etc/xinetd.d This directory have different files for imap and pop3 you have to edit these files one by one. By default xinetd disables these services, you have to simply enable these services to do this just change disable =yes
to disable = no like this:
/etc/xinetd.d/ipop3

Now make your changes work for you, you have to restart xinetdd by issuing this command

[root@pc1 ~]service xinetd restart

Configuring POP3 under kernel 2.6:
In kernel 2.6 pop3 servic runs under dovecot under /etc/dovecot.conf, you just have to made a little change just uncomment these lines like this:
vi
protocol pop3 {
}
listen = [::]

Now restart the dovecot service to make changes work for you like this:

root@pc1 ~]service dovecot restart

Client side configurations:
To configure a Microshit(ooh i was assumed to say microsoft) client open any email program, usually people use outlook. So just open outlook
and go to

Tools >>> accounts>>>add>>mail>>>

give display name any name you want others to call you.Click next and select pop3 from above drop down menu now give address of incoming mail server, you can give the IP of the mail server like 192.168.0.1 in my case. But if the DNS is configured properly than you can use FQDN(fully qualified domain name). Like in my case
cyberdyne.net

Click next and give the Username and password for your account click finish.
Here one thing should be remember that outgoing mail server(smtp) uses 25 port while incoming mail server(pop3) uses 110 port.

Testing basic connectivity:
You can use the telnet command to test the basic connectivity like this: