OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
smtp_sender_restrictions, how to exclude a user based on his username AND his ip

From: AlxFrag (alxfraggmail.com)
Date: Mon Mar 03 2008 - 02:57:06 CST


Hi,

i've set up postfix so as users can send emails only when using their
real "from address".

In main.cf i have:

smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

smtpd_sender_login_maps=ldap:/etc/postfix/local_recipients.cf,

smtpd_sender_restrictions=permit_mynetworks,check_sender_access
hash:/etc/postfix/block_senders,hash:/etc/postfix/my_domains,reject_authenticated_sender_login_mismatch

smtpd_restriction_classes=verify_login

verify_login=reject_sender_login_mismatch

When i want to exclude a user from these restrictions i edit the
"my_domain" file like following:

myuserdomain1 DUNNO

Now, i want to exclude a user not only based on his username but based
on his IP address too. This can be useful for a script that sends
emails, hosted in a web server outside my domain.

Is this possible?

Thanks in advance,

Alex