LinuxQuestions.org
Register a domain and help support LQ
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 06-01-2011, 08:05 PM   #1
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
Question POSTFIX - receiving outside email restriction


Hi,

recently i was raised my question about external and internal emailing using one domain name.


Now i have another question about restriction.

I can able to set email account and permit only local and external

for example

prinzz1@domain.com <----- local only
prinzz2@domain.com <------ local and external

prinzz1@domain.com can able to send email messages only local
while prinzz2@domain.com can able to send email messages not only local also external.

now my question this kind of setup external and internal one thing i've noticed is that using prinzz1@domain.com(local only) was able to receive email from outside

is it possible to block all outside email if the prinzz1@domain.com is local only?


thanks
 
Old 06-02-2011, 11:12 PM   #2
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Anyone knows about this



thanks
 
Old 06-03-2011, 05:39 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Use smtpd_recipient_restrictions. See this link. I picked it because it points out an important caveat as well as linking to more information on this restriction class.

Here is a more generalized document on per user/client access control, which may be pertinent to your interests.
 
Old 06-05-2011, 09:28 PM   #4
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Noway2 View Post
Use smtpd_recipient_restrictions. See this link. I picked it because it points out an important caveat as well as linking to more information on this restriction class.

Here is a more generalized document on per user/client access control, which may be pertinent to your interests.
Hi,

Thanks for your reply

My objective is to block all incoming message if my email account is permitted only local
what i experienced is that even i set email account as local_only this local email is can able to recieve outside for example yahoo, hotmail etc..

my setup is like this:

1. prinzz@domain.com <---- permitted local only or internal used
2. prinz2@domain.com <---- permitted local and external used


what i want to set is if i used prinzz@domain.com it can only recieve and send internal only if the prinzz@domain.com attempt to send outside it will block by my recipient_access but the problem is prinzz@domain.com is able to recieve outside like yahoo, hotmail etc. i want to block it

I believed smtp its not my answer i think it is POP or DOVECOT.
POP is role to recieve email from outside and SMTP is to sending message

please correct if im wrong


thanks
 
Old 06-05-2011, 09:43 PM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
The SMTP server will receive the message and deliver it via local delivery for recipients on that system. The POP and IMAP server will allow a user to connect and retrieve the messages from the local delivery location, once it has been stored on the server. You want (need) to block it at the SMTP level. You should be able to use a combination of recipient, sender, and client access restrictions to achieve your goals. Postfix has a boat load of configuration options, so many that it is almost overload, but I am sure that some combination of the options will solve your needs.
 
Old 06-05-2011, 11:55 PM   #6
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Noway2 View Post
The SMTP server will receive the message and deliver it via local delivery for recipients on that system. The POP and IMAP server will allow a user to connect and retrieve the messages from the local delivery location, once it has been stored on the server. You want (need) to block it at the SMTP level. You should be able to use a combination of recipient, sender, and client access restrictions to achieve your goals. Postfix has a boat load of configuration options, so many that it is almost overload, but I am sure that some combination of the options will solve your needs.
Thanks for your reply

can you please review my main.cf

smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/restricted_senders permit_sasl_authenticated permit_mynetworks check_relay_domains reject_unauth_destination
smtpd_restriction_classes = local_only
local_only = check_recipient_access hash:/etc/postfix/local_domains, reject

mynetworks = 127.0.0.0/8
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

# email forwarder
virtual_alias_domains = tailinsubic-chatserver.com
virtual_alias_maps = hash:/etc/postfix/virtual

and give us some advice so that i can achieve my goal

i have restricted_senders, recipient_access and local_domains

[Restricted_senders]

prinzz@tailinsubic-chatserver.com local_only
#prinzz2@tailinsubic-chatserver.com
user03@tailinsubic-chatserver.com local_only

[recipient_access]

prinzz@tailinsubic-chatserver.com restricted
user03@tailinsubic-chatserver.com restricted

[local_domains]
tailinsubic-chatserver.com OK





thanks

Last edited by cheesewizz; 06-06-2011 at 12:31 AM.
 
Old 06-08-2011, 01:11 AM   #7
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
anyone can help me


thanks
 
Old 06-13-2011, 03:43 AM   #8
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
How to block email outside using postfix

Hi All,

I established postfix as our mailserver
there are some users are permitted as local_only some are not

the problem i encountered was about the user that permitted to local_only
but those some user are able to recieve emails outside for example yahoo, hotmail and etc.

but they cannot send email in other domain for example yahoo, hotmail and etc. only on the domain was i set in main.cf

how can i block or reject emails in other domain when my email account is permitted to local_only


thanks

Last edited by cheesewizz; 06-13-2011 at 04:25 AM.
 
Old 06-13-2011, 04:28 AM   #9
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cheesewizz View Post
Hi All,

I established postfix as our mailserver
there are some users are permitted as local_only some are not

the problem i encountered was about the user that permitted to local_only
but those some user are able to recieve emails outside for example yahoo, hotmail and etc.

but they cannot send email in other domain for example yahoo, hotmail and etc. only on the domain was i set in main.cf

how can i block or reject emails in other domain when my email account is permitted to local_only


thanks
Please anyone can help me

kindly review my main.cf and please suggest what should I do

mydomain = tailinsubic-chatserver.com
myorigin = $mydomain
mydestination = $myhostname, $mydomain, localhost.localdomain, localhost

smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes

smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access check_sender_access hash:/etc/postfix/restricted_senders permit_sasl_authenticated permit_mynetworks reject_unauth_destination
smtpd_restriction_classes = local_only
local_only = check_recipient_access hash:/etc/postfix/local_domains, reject

mynetworks = 127.0.0.0/8,192.168.0.0/24
mailbox_size_limit = 0
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
relay_domains = $mydestination
relayhost =


smtpd_helo_required = yes
#smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname
#smtpd_recipient_restrictions = permit_mynetworks,


# email forwarder
#virtual_alias_domains = tailinsubic-chatserver.com
#virtual_alias_maps = hash:/etc/postfix/virtual


thanks
 
Old 06-15-2011, 12:35 AM   #10
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
How to block or reject by postfix smtp incoming email

Hi

I used postfix mailserver and installed in centos 5.4 64bit

status for my postfix mailserver are:

I can able to restrict outgoing emails if the email account is local
then if the email account has permitted to external they have full permission send and received outside.

what Im not yet done is how to block all incoming emails from outside if my email account is permitted only local


now what i've noticed is that even my email account is pemitted in local they can able to receive emails from other domain like yahoo, hotmail and etc...


how can i block all incoming for local email only.


thanks
 
Old 06-16-2011, 12:41 PM   #11
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
cheesewizz, this thread is a virtual duplicate of this thread, and this thread.

This thread has been reported.
 
Old 06-17-2011, 08:32 AM   #12
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by Noway2 View Post
cheesewizz, this thread is a virtual duplicate of this thread, and this thread.

This thread has been reported.
Thanks for the notice. Threads are merged into this one, now!
 
  


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
postfix not receiving email from the outside world zeos386sx Linux - Server 8 05-10-2010 03:29 PM
postfix not receiving email from outside tonyl Linux - Server 2 07-27-2009 07:57 AM
Postfix,Enforce_TLS, and Receiving Email fortezza Linux - Software 0 08-07-2005 12:07 AM
Problems receiving email via postfix ryedunn Linux - General 5 01-01-2005 08:55 PM
Problem receiving email from email server sharon Linux - Newbie 3 07-11-2003 04:57 AM


All times are GMT -5. The time now is 06:47 PM.

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