LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Server not emailing because of squid, help please. (https://www.linuxquestions.org/questions/linux-networking-3/server-not-emailing-because-of-squid-help-please-719368/)

Nel0 04-15-2009 02:37 PM

Red Hat Server not emailing because of squid, help please.
 
Hi, I have squid Installed on a Red Hat box as a server, and have a centOS box with a web server that uses the red hat one as a proxy. The centos box can browse the internet without problems, but I have a web application that needs to send emails out of the domain and they are not being sent. Yes, I know squid only works as a HTTP and doesn't understand all the SMTP jargle.

The problem is that the server is not sending emails to addresses outside the network (e.g. @gmail.com), but I tested sending emails inside the windows domain with PHP and it worked.

Centos is configured to have the red hat box as the default gateway.
I read somewhere that I could make the server forward the activity through port 25 using iptables, or that I could also configure sendmail to do the job.
Anyone knows how to get the job done? This has been killing me for the last two days.

Nel0 04-16-2009 09:41 AM

Im using these Ip tables in the /etc/sysconfig/iptables in the redhat box, but they dont seem to be working:
10.12.0.10 is the Ip of a Microsoft exchange server that knows the route out of the network.

-A POSTROUTING -p tcp -m tcp --dport 995 -j SNAT --to 10.12.0.10 MASQUERADE
-A POSTROUTING -p tcp -m tcp --dport 443 -j SNAT --to 10.12.0.10 MASQUERADE
-A POSTROUTING -p tcp -m tcp --dport 25 -j SNAT --to 10.12.0.10 MASQUERADE

jonnytabpni 04-16-2009 01:58 PM

Is your Red Hat box configured as a gateway/router? When you say "browse the internet", do you mean by changing firefox's proxy settings?

What is the default gateway of the Red Hat box? You should probably use that for direct connections to the internet (You can still use the squid proxy though)


All times are GMT -5. The time now is 09:19 AM.