OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: sender access

From: Alberto Sierra (albertocrhost.net)
Date: Sat Apr 07 2007 - 10:22:08 CDT


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_command =
mailbox_size_limit = 0
mydestination = localhost.localdomain, localhost
myhostname = mail.crhost.net
mynetworks = 127.0.0.0/8, 192.168.0.0/16, 196.40.62.62,
196.40.10.250,
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = ESMTP mail.crhost.net
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks, reject_unauth_destination,
reject_invalid_hostn
ame, reject_non_fqdn_hostname, reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_u
nknown_recipient_domain, reject_rbl_client list.dsbl.org,
reject_rbl_client sbl.spamhaus.org, reject_rbl_client cbl.abusea
t.org, reject_rbl_client dul.dnsbl.sorbs.net
smtpd_restriction_classes = notforged
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,
     check_sender_access hash:/etc/postfix/access reject_unkno
wn_sender_domain, reject_unauth_pipelining, reject_non_fqdn_sender
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = hash:/etc/postfix/valias
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/mailboxes
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000

> On Saturday, April 07, 2007 at 08:50 CEST,
> Alberto Sierra <albertocrhost.net> wrote:
>
>> Hi guys, i've been trying to set up MAIL FROM access controls, so that
>> only my networks can send emails from local domains.
>>
>> here are my settings:
>>
>> #main.cf
>> smtpd_sender_restrictions = permit_sasl_authenticated,
>> permit_mynetworks,
>> check_sender_access hash:/etc/postfix/access
>> reject_unknown_sender_domain,
>> reject_unauth_pipelining,
>> reject_non_fqdn_sender
>>
>> #/etc/postfix/access
>> crhost.net REJECT
>> domain2.com REJECT
>>
>>
>> what i want is to accept any from address from SASL authenticated and
>> my networks, and if not in mynetworks then check the FROM ADDRESS, if
>> local, then REJECT.
>>
>> for some reason this setup is not working. any ideas? (i log in to
>> the SMTP from an address not in mynetwork and send mail from a local
>> address.)
>
> It looks okay. Post logs and "postconf -n" output.
>
> --
> Magnus Bäck
> magnusdsek.lth.se
>