How to set up mail server in Linux machine

Hi,

I have a desktop on which linux is installed. It is connected to office LAN. I am able to send mails(using the 'mail' command) to anybody who is connected to the linux machine. But I am not able to send mails to internet IDs. Please inform, what do I have to do to enable mailing to internet ids like name@gmail.com.

You might just not have a working DNS (can you get to the internet from that box?).

It's more likely that any requests on port 25 that aren't destined for your mail server are being dropped at the border firewall.

Set the SMTP and Masquerading options in:

/etc/postfix/main.cf
/etc/sysconfig/postfix

Should work, that is, if you're using postfix.

I am not able to access net from that Linux machine. Please inform how to enable net access. We have a DNS. So it will not be a problem.