1830226 Members
1591 Online
109999 Solutions
New Discussion

sendmail configuration

 
sujeet joshi
Frequent Advisor

sendmail configuration

Hi ,

I am using broadband connection for that i have installed linux m/c with two nic card and having public i/p and private i/p,i have already configured squid proxy, now i am able to access internet but i am not able to access my mail from outlook my mail server is outside,

from my linux machine i am able to ping to my mail server.my public ip is in 60.254.x.x range and private ip is 172.16.x.x range,

in this scenario how i will configure my sendmail in linux please help me




jayesh
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

Shalom,

You need to allow traffic on port 25 for sendmail to send mail out on your server. The squid proxy may not permit this.

Your outlook access to an outide mail server requires port 110 be enabled at least outbound. This has nothing to do with sendmail.

For sendmail to receive mail, you must forward port 25 on the outside lan to the internal ip address and have the sendmail daemon running

chkconfig --list | grep sendmail
chkconfig sendmail on
service sendmail start

For sendmail to send mail to the outside which does not require the daemon, you must have either valid DNS name resolution to an outside name source, or DS smart relay to your ISP mail server. Port 25 must not be blocked outbound for this to work.

SEP/
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: sendmail configuration

If the mail messages stays in your ISP server, you will access with POP protocol. If you want to download it locally, you should use fetchmail.

Probably, your easiest option is to connect directly from the client to your ISP mailserver. Squid won't allow you to do that. You must enable ip forwarding, configure iptables with masquerading, then configure your clients to use your linux as default gateway.

See:

http://yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Cristian Marchionni
New Member

Re: sendmail configuration

First of all you must open the ports on your firewall:
TCP 25 for sending mail
TCP 110 for receiving mail
Then you have to configure the NAT translation to map your PRIVATE IP to a PUBLIC IP
There are a lot of tools whcih can help you to configure this things, i personally use shorewall (http://www.shorewall.net) which is simple and well documented