Help setting up Sendmail on an Intranet server

  • tqbrady
  • Born
  • Born
  • tqbrady
  • Posts: 4
  • Loc: Austin, Tx

Post 3+ Months Ago

I'm using Mandrake 9.

I personally compiled Apache 2, MySQL 4, and PHP 4.

This is an Intranet server. We do not have a complicated network. Currently, everyone is accessing the Intranet site by entering the IP address of the server into their browsers. We're VERY low-tech.

We're behind a firewall, on the 192.168.1.x scheme. We use NAT, obviously. Now, I have the IP address and DNS server addresses set in the server, rather than using DHCP, because I want it to stay static at its current address.

I want to have forms on the Intranet site in PHP that send E-mail. As I understand it, I use Sendmail to do this. I think I have everything set up correctly for sendmail to work, but it's not working.

When I try to start the Sendmail server it hangs. Eventually it will say something about resolving recipient addresses, but I can't get that message right now because it takes about ten minutes, and I can't really have the server down that long at this time of day.

Here's my question(s): I think it's hanging because it's trying to resolve addresses, right? I have told it that its hostname is "localhost." We do not have a domain server, and it is behind a firewall, so that was the best I could come up with. I also tried its IP address, and I tried our SMTP server name in place of "localhost" in desparation. In case you're wondering, no I didn't enter those with the quotation marks.

Second question: how does Sendmail know what my SMTP server is? There's a line in PHP.ini that asks for your SMTP server, but it is commented out and says it's only for Windows installations.

Third question: am I an idiot? Can Sendmail even WORK behind a firewall?

Fourth, bonus question: How about a step-by-step walkthrough on making this server a DNS server, too, so that my clients can type in "Intranet" instead of "192.168.1.60?" That IS how you do it, right?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

So if I understand correctly you are wanting to run sendmail on one system (a server) so that anybody on your intranet can access that server to get their mail from the Internet. I am not exactly sure how you are setup but is it something like:

Internet -> Firewall -> Server -> All your intranet machines

If it is someting like above you should be able to.

Also have you checked your log files to see if any further information has come up?
  • tqbrady
  • Born
  • Born
  • tqbrady
  • Posts: 4
  • Loc: Austin, Tx

Post 3+ Months Ago

Thanks for answering, but that's not quite what I meant. I'm still learning these terms, so it's hard for me to communicate well, not to mention there are so many hundreds of different things you can do with this stuff.

I have an intranet server - the only real server in the house. We have DSL, and we have a Linksys Router/Gateway taking care of DHCP/NAT. The Intranet server simply has Apache(and all its helpers) on it.

I want things like phpBB to be able to send mail. Currently I get an error when I try to use phpBB to send an E-mail (or if I make my own php file to try to do so). As I understand it, I have to configure Sendmail to get that to work. I've got Sendmail installed, and I've got it partially configured, at least. I need to know exactly how you configure it. For one thing, I've never seen anywhere that you can tell Sendmail what SMTP server to use. Is this because Sendmail IS an SMTP server?

Basically, I need a walkthrough on configuring Sendmail.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah sendmail is the smtp server. I also have a Linksys Router/Gateway at my place, and behind that I have my computer and server setup for which sendmail was just working with its default settings. As long as you setup your server right and it can access the network, sendmail should work for you. Now if you need it to be able to communicate through your firewall to the outside world (the Internet) you need to make sure you goto your Router settings at http://192.168.1.1 (probably that ip) and goto Advanced->Forwarding and then set it up so that port 25 goes to your server. So for instance lets say you have your server at the ip address:

192.168.1.102

You would then pick the first available line there and for the application name put "sendmail", then for ext. port put 25 to 25, check TCP and UDP protocol (I think sendmail only needs TCP), and then for hte IP address put 192.168.1.102 (assuming that is your server), and check the enable box. At the bottom click apply and that might allow you to then send e-mail. Let me know if any of this helped you solve your problem :)
  • tqbrady
  • Born
  • Born
  • tqbrady
  • Posts: 4
  • Loc: Austin, Tx

Post 3+ Months Ago

Ahhaaaaaaa.

Thanks.

Yeah, we don't want any open ports to the Internet, just yet, until we get someone to focus on this full-time(for security's sake). I only do this when I have "spare time."

Sendmail isn't working because it's behind a firewall. Hmm.

Is there any option for using Sendmail behind a firewall without opening a port? It seems like it HAS to be possible.
  • Unauthorized
  • Born
  • Born
  • Unauthorized
  • Posts: 2

Post 3+ Months Ago

Sendmail.... Linksys.. Nodomain... These three are currently my problem. First of all let me clear up some of your confusion. In order for any server to work other computers have to be able to make unsolicited connections to it. What your firewall is doing is blocking all unsolcited communications. If you understand this as is Ignore next paragraph.

The reason you can browse a web page is because you solicit information from a server. If there was a firewall on that server then your request for information would never be herd. The reason the server can then send the requested infromation is because the firewall "linksys router" has recorded that you asked for information so when it comes back the firewall says ok ip xxx.xxx.xxx.xxx requested this info lets send it there.

Sendmail and any other email program works allong the same concept. It is completely impossible to keep sendmail receiving mail if you do not open up the fire wall, but In order to send information (mail) to someone else a firewall port need not be opened. The reason is because in this case your Server is the client and the send to location is the server with the opening on port 25.

Please note that should you decide to open port 25 there is no significant threat. all information send to that port goes to only 1 Ip "the servers" on only one port "25" with only one application sendmail "Email Server Program". As long as sendmail is secure there is no threat. Nothing else will respond to anyone sending anything else.

Now that I have answered your question on this thread hopefully someone can answer mine. I have a similar setup Linux Server (ip 192.168.1.2), behind a Linksys Nat Firewall, Open port 22 TCP +UDP to Server. No domain. Planning to email via User@IP. All outbound mail Sends ok. Unfortunately all inbound mail rejected because it is not to server lan IP but rather Wan IP. had this setup working once before. Water damage took out Hard Drive, as well a rest of my office :evil: . Any Ideas.

Realize that this forum is not the most oppertunistic place for this posting but upon seeing other post thought that I would give it a shot.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Unauthorized wrote:
Now that I have answered your question on this thread hopefully someone can answer mine. I have a similar setup Linux Server (ip 192.168.1.2), behind a Linksys Nat Firewall, Open port 22 TCP +UDP to Server. No domain. Planning to email via User@IP. All outbound mail Sends ok. Unfortunately all inbound mail rejected because it is not to server lan IP but rather Wan IP. had this setup working once before. Water damage took out Hard Drive, as well a rest of my office :evil: . Any Ideas.


So if someone e-mails you right now to user@WANIP does it work? or, are you saying when you send out an email it shows the reply as user@LANIP and you want that changed so that when they hit reply it actually replies to user@WANIP which would resolve your problem?
  • tqbrady
  • Born
  • Born
  • tqbrady
  • Posts: 4
  • Loc: Austin, Tx

Post 3+ Months Ago

You need to set up port forwarding on your Linksys router.

First, you have to turn on DHCP on the router (sounds like you already have, maybe). Then, in the configuration interface, click on "Advanced," and then "Port forwarding." Point all appropriate ports to your local IP address.

By the way, my setup is on an Intranet server, and I have no firewall setup, yet.

I think it's just a faulty configuration. What I didn't realize before was that I was using a RedHat BETA. I asked someone to download and burn the latest version, and they gave me a BETA. None of the Apache server stuff that installed off the CD was working right, so I downloaded and installed everything on my own. Getting it all to work together in RedHat can be hard, and I didn't know what I was doing. I'm just going to completely re-install sometime pretty soon, and probably using a live distro (Gentoo, Debian).
  • Unauthorized
  • Born
  • Born
  • Unauthorized
  • Posts: 2

Post 3+ Months Ago

Port 25 SMTP is Forworded to 192.168.1.2 (Static Lan IP Of Server)
Port 110 Blocked POP3 Shouldnt need this Server Side Send and Receive mail shouldnt need this. Right? I dont need third Party External Access for accessing mail Outside of private Network.

I have attemped to email myself. Useing a mock yahoo.com email acount as the other end.

If I email myself from my sendmail server. the respond address is what ever i tell sendmail to use, but it works. Yahoo.com receives the information. Unfortunately it puts it into the Bulk Mail Box. Not Sure Why Yet.

If i try to send an email to the server VIA the wan IP and Port forwarding on the Linksys router it Does not accept the communication. Then Yahoo mail says Cannot make SMTP connection with 12.*.*.* (MY IP). If server Isolated from Internet. I can connect my labtop with sendmail and send mail back and forth between the two via Lan IP.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.