ok I tried it but not work well.
My postfix version is 2.3.8-2
this is my configuration:
--------------------------------------------------------------------
queue_directory = /var/spool/postfix
mail_owner = postfix
myhostname = test.pippo.it
myorigin = $myhostname
inet_interfaces = $myhostname,localhost
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8, 192.168.1.0/24, 192.168.2.0/24
relayhost = 192.168.1.2
double_bounce_sender=postmaster
default_destination_concurrency_limit = 50
debug_peer_level = 2
mydestination = $myhostname, localhost.localdomain, localhost.localdomain,
localhost
alias_maps = hash:/etc/aliases,ldap:aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
local_transport = local
local_recipient_maps = unix:passwd.byname
unknown_local_recipient_reject_code = 550
forward_path = $home/.forward
virtual_transport = virtual
virtual_mailbox_domains = ldap:domains
virtual_alias_maps = ldap:aliases
virtual_uid_maps = static:1002
virtual_gid_maps = static:1003
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = ldap:mailbox
virtual_minimum_uid = 500
aliases_server_host = 127.0.0.1
aliases_search_base = dc=pippo,dc=it
aliases_scope = sub
aliases_query_filter =
(|(&(mailAlternateAddress=%s)(objectClass=postUser))(&(mail=%s)(objectClass=postGroup)))
#aliases_result_attribute = mail
aliases_result_attribute = rfc822member
aliases_bind = no
mailbox_server_host = 127.0.0.1
mailbox_search_base = dc=pippo,dc=it
mailbox_scope = sub
mailbox_query_filter =
(|(&(mail=%s)(objectClass=postUser))(&(mailAlternateAddress=%s)(objectClass=postUser)))
mailbox_result_attribute = homeDirectory
mailbox_bind = no
domains_server_host = 127.0.0.1
domains_search_base = dc=pippo,dc=it
domains_scope = sub
domains_query_filter = (&(objectClass=dominiomail)(associateddomain=%s))
domains_result_attribute = associateddomain
domains_bind = no
smtpd_recipient_restriction =
check_sender_access hash:/etc/postfix/restricted_senders
smtpd_restriction_classes = local_only
local_only =
check_recipient_access hash:/etc/postfix/local_domains,
reject
-----------------------------------------------------------------------------
file /etc/postfix/restricted_senders:
[EMAIL PROTECTED] local_only
-----------------------------------------------------------------------------
file /etc/postfix/local_domains
pippo.it OK
-------------------------------------------------------------------------------
I tried to send an email by telnet command first on localhost, and then from an
network on my permit_network, but the user pippo is allowed to send mail to
avery domain....
I wrong somethings???
THANKS
________________________________________
Da: [EMAIL PROTECTED] [EMAIL PROTECTED] per conto di Nikita Kipriyanov [EMAIL
PROTECTED]
Inviato: venerdì 31 ottobre 2008 10.39
A: [email protected]
Oggetto: Re: some user must send email only mydomain
Gabriele Di Giambelardini пишет:
> Hi to all
> I have a problem with my configuration, I don't found any solution on
> internet.
> My problem is:
> I'd need some of my users can't send email to other domain, but only to my
> domain...
> Some body know the way??
> thanks
>
Have you tried
http://www.postfix.org/RESTRICTION_CLASS_README.html#external ?