LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2012, 08:30 AM   #1
moyorakkhi
Member
 
Registered: Jan 2011
Location: Dhaka
Posts: 80

Rep: Reputation: 1
Allowing sending and receiving only within own domain


Hello,

I would like to configure my email server (postfix+dovecot) only to send and receive emails withing own domain (example.com). Users should only be able to send email to example.com and can only receive email from example.com. What should I modify in main.cf file?

Thanks for you help in advance.

Regards,
Saif
 
Old 03-01-2012, 08:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I think the simplest perspective is to NOT have a mynetworks value. This value is used to whitelist senders source addresses, i.e. your own network can send email out to anywhere, whilst other addresses can't. So by NOT having this value, you will be left with a server which will ONLY pass traffic for the domains in mydomain and relaydomains.
 
Old 03-01-2012, 09:28 AM   #3
austin001
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Rep: Reputation: Disabled
moyorakkhi,

Check this recent thread that worked for me.

-Austin
 
Old 03-01-2012, 01:43 PM   #4
moyorakkhi
Member
 
Registered: Jan 2011
Location: Dhaka
Posts: 80

Original Poster
Rep: Reputation: 1
Hi Austin,

Thanks a lot for the link. It's working for individual users. I can control which user can only send email locally and which users to outside. But I want to restrict ALL users. They are hundreds of users. So it would be painful to add each one individually. I tried it like: (*@example.com local_only) and (@example.com local_only). But did worked. Does postfix has special syntax for this?

Thanks again mate!
 
Old 03-01-2012, 01:57 PM   #5
moyorakkhi
Member
 
Registered: Jan 2011
Location: Dhaka
Posts: 80

Original Poster
Rep: Reputation: 1
Ok. I got it working. Stupid me

It was simple (example.com local_only)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qmail not sending or receiving zibusiso Linux - Newbie 1 10-28-2009 05:20 AM
sending and receiving failed in postfix dhanya m d Linux - Newbie 1 07-02-2009 02:56 AM
sending request but not receiving gaurav pant Linux - Networking 2 11-05-2008 07:17 AM
Help...sending email but not receiving fiona333 Linux - Newbie 9 09-07-2007 09:28 AM
Wireless Broadcom not sending/receiving? Jerkstore Slackware 2 12-16-2005 09:51 PM


All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration