LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-04-2007, 11:46 PM   #1
waddy
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Rep: Reputation: 0
Question Postfix Help - Allow only one domain


Hi,

We do not need to recieve mail from anyone else, only our own domain..

I have spent sometime trying to only "allow" emails from only our domain , and block every other domain out. no luck...


Can i edit :/etc/postfix/access

# reject mail from bad_domain.com
bad_isp.com REJECT

and use a wildcard like

*.net
*.com
*.org

etc?

Please help, what is the easiest way to achieve this
 
Old 06-05-2007, 02:09 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
you'd list list your domain under the mydomains variable and have nothign listed under relay_domains. you've no reason to go anywhere outside of the main.cf config file.
 
Old 06-05-2007, 02:20 AM   #3
waddy
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks.. for the help ... is it possible for me to allow only one other domain also?

So we can Send and Recieve from:

abc.com = Me - My postfix server
lmn.com = My Brother

Basically we dont want mail from anyone else..... except each other
 
Old 06-05-2007, 03:03 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
can you clarify your situation a bit more... might have got wires crossed. are you saying that you only want "from" addresses in a single domain to be accepted into a mail server of that domain? not just that you only want to receive mail TO that domain? are you not hosting this domain yourself? if so why would mail FROM that box enter it?
 
Old 06-05-2007, 04:01 AM   #5
waddy
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Exclamation

Sorry, I actually confused myself...

I only want to recieve external email from only "one" outside domain, e.g myfriendserver.com, and bounce/block all other external emails sent to me from all other domain(s).

Basically I only want to recieve external email from "myfriendserver.com", and also internal mail, and block/bounce everything else.

Thanks for the help, been on this all day and cant achieve the result.
 
Old 06-05-2007, 07:32 AM   #6
waddy
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Question

Ok... I think i have worked it out, if someone can confirm..

Current
#relay_domains = $mydestination

Change to

relay_domains = myfriendserver.com

Current:
#mydomain = domain.tld

change to

mydomain = myserver.com

How to block all the other domains ??
 
Old 06-05-2007, 09:13 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
ok, now i get the question (i think) and i backtrack a little, it looks like this to me...

check_sender_access type:table
Search the specified access(5) database for the MAIL FROM address, domain, parent domains, or localpart@, and execute the corresponding action.
 
Old 06-05-2007, 05:05 PM   #8
waddy
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Question

Thanks again... I could not find check_sender_access in the .cf anywhere... Been googling and have found a tiny bit of info on how to use check sender but it was not very helpful..

I am guessing:

check_sender_access hash:/usr/local/etc/postfix/check_sender, permit

then in my check_sender txt file

myfriendsdomain.com OK
*.com REJECT

Is this the correct way?
 
  


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
using postfix for 2 domain names MrSako Linux - Software 5 11-01-2006 03:16 PM
Postfix domain name problem sbabcock23 Linux - Server 3 08-16-2006 02:46 PM
Postfix and local domain. LuneeTunes Linux - Networking 1 03-18-2006 12:55 PM
POstfix domain mapping, how? kuplo Suse/Novell 1 12-14-2005 09:56 PM
Postfix virtual domain eyt Linux - Newbie 0 02-23-2004 05:07 PM


All times are GMT -5. The time now is 08:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration