How can i prevent emails to Internet?

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
emarioh
New user
New user
Posts: 7
Joined: 2008-03-24 18:07

How can i prevent emails to Internet?

Post by emarioh » 2008-03-24 18:18

Hello all,
Please i am new to email servers and hMail. I recently setup hMail for our intranet. But the problem is that mails sent from our domain e.g emarioh.local to an inernet address like email@gmail.com delivers. I want to prevent mails from delivering outside the intranet. my smtp and pop are for my local server: 10.0.1.1. Pls can anyone help me out?
Thanks.

.Emmanuel

Carl
Normal user
Normal user
Posts: 111
Joined: 2008-03-18 17:33
Location: Utah, USA
Contact:

Re: How can i prevent emails to Internet?

Post by Carl » 2008-03-24 18:22

I think you can change that in the IP settings. Only allow connections from 10.0.1.0 to 10.0.1.154. Ooops, nope that won't work...
Carl

98% of computer users know just enough to be dangerous, but not enough to be useful. I'm afraid I don't fall in the top 2%.

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Re: How can i prevent emails to Internet?

Post by redrummy » 2008-03-24 18:42

Add global rule: To; Not contains: @localdomain -> Reply (form); Delete

emarioh
New user
New user
Posts: 7
Joined: 2008-03-24 18:07

Re: How can i prevent emails to Internet?

Post by emarioh » 2008-03-27 15:17

redrummy wrote:Add global rule: To; Not contains: @localdomain -> Reply (form); Delete
Hello Redrummy, i tried the rule stuff but my local mails were not deliverying until i deleted the rule. Maybe i did not do it right, but i did follow the procedure u laid out. Would you kindly elaborate on this? Thanks.

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Re: How can i prevent emails to Internet?

Post by redrummy » 2008-03-27 17:13

Actually, on re-reading the rule I realize that it will only reliably work for a single address in the "To" field. Maybe I wasn't awake when I replied. ;) To do this right you'd need to script it. I'm sure it can be done, but I can't tell you quickly how to do it. Maybe someone else wants to take a stab at it. Sorry for the false solution. :oops:

User avatar
SorenR
Senior user
Senior user
Posts: 3571
Joined: 2006-08-21 15:38
Location: Denmark

Re: How can i prevent emails to Internet?

Post by SorenR » 2008-03-27 21:27

Whatif... you point the setting for smtp relayer to a non-existing IP address. I presume e-mail will come back to sender as undeliverable. This will apply for the whole server though.

Just a brain fart, correct me if I'm wrong.. :|
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: How can i prevent emails to Internet?

Post by ^DooM^ » 2008-03-27 21:50

That's a good idea Soren. Local email should be unaffected by this.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Re: How can i prevent emails to Internet?

Post by redrummy » 2008-03-27 21:51

Good idea. Gotta love simple solutions... Just set low retry count and timeout values and anything trying to leave the server gets bounced within a few minutes.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: How can i prevent emails to Internet?

Post by Kaan1983 » 2008-03-27 22:34

There is an option under Advanced->IP Ranges->
Why not go there and set "Allow deliveries"!

User avatar
SorenR
Senior user
Senior user
Posts: 3571
Joined: 2006-08-21 15:38
Location: Denmark

Re: How can i prevent emails to Internet?

Post by SorenR » 2008-03-27 23:14

Even simpler.. Why didn't I think of that :roll:
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: How can i prevent emails to Internet?

Post by Kaan1983 » 2008-03-27 23:23

Because you know coding and stuff and I don't :) believe or not that's the reason.

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Re: How can i prevent emails to Internet?

Post by redrummy » 2008-03-28 03:10

And I've been very sick *cough*... That's my excuse, and I'm sticking with it. ;)

Mind you, aliases are treated as external, so all addresses would have to be real accounts if external delivery is not enabled.

emarioh
New user
New user
Posts: 7
Joined: 2008-03-24 18:07

Re: How can i prevent emails to Internet?

Post by emarioh » 2008-03-29 15:51

Thanks alot SorenR, Kaan1983 and redrummy. I did stumble on the 'Allow deliveries', and thats what i'm using now. I am also not using aliases yet; but i will try out the 'smtp relayer' later on. i want to try setting up the webadmin and also see how users can access their mails via http or web. Wont mind some help on this too.

Post Reply