OSEC

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

From: Evan Platt (evanespphotography.com)
Date: Fri Jun 08 2007 - 08:48:19 CDT


At 02:05 AM 6/8/2007, mouss wrote:
>if you posted your postconf -n, it would have been easier to answer
>you. here is a simple example that may or may not suit you:
>
>smtpd_recipient_restrictions =
> ...
> permit_mynetworks
> permit_sasl_authenticated
> reject_unauth_destination
> check_sender_access hash:/etc/postfix/sender_bl
> ...
>
>== sender_bl:
>
>espphotography.com REJECT sorry, domain reserved for our trusted users
>...
>
>
>if your setup is more complex, you may need restriction classes
>(search the restriction classes doco for local_only. or google for
>postfix+local_only).
>
>Be warned that this breaks forwarding (one of your users have an
>external account with a .forward to send his mail to his internal
>address. then you send an email to his external address...). It also
>prevents mail from mobile users if they must send mail using their
>ISP or hotel or ... (they can't authenticate to your server )

Sorry.. Forgot my postconf -n. Thanks. :)

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
body_checks = regexp:/etc/postfix/body_checks
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
hash_queue_names = deferred, defer active bounce flush incoming
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 0
mydomain = espphotography.com
myhostname = espphotography.com
mynetworks = 216.200.134.242/32,192.168.1.0/24,64.127.99.70/32,
198.144.208.113/32 69.147.64.0/24,ironport.yipnet.com
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
parent_domain_matches_subdomains =
debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps,smtpd_client_restrictions
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
relayhost = smtp.dslextreme.com
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
wouldnt.you.like.to.know.what.software.this.is.running
smtpd_client_restrictions = check_client_access
hash:/etc/postfix/rbl_access, permit_mynetworks,
reject_rbl_client bl.spamcop.net, reject_rbl_client
korea.services.net, reject_rbl_client
bl.csma.biz, reject_rbl_client zen.spamhaus.org, permit
smtpd_sender_restrictions = check_sender_access
hash:/etc/postfix/access,hash:/etc/postfix/sender_access
smtpd_tls_cert_file = /System/Library/OpenSSL/certs/smtpd.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550