OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
How can i exclude a user or a host from smtpd_sender_restrictions?

From: AlxFrag (alxfraggmail.com)
Date: Wed Feb 13 2008 - 06:17:28 CST


Hi,

i've set up postfix so as only authenticated users can send email, and
their "from address" has to match their real address.

In main.cf i have:

****************************************************************************************
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

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

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

smtpd_sender_restrictions=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
***********************************************************************************************

in my_domains file i have:
**********************
mydomain1 verify_login
mydomain2 verify_login
***********************

I have a script that runs in locahost and has to generate messages using
the postmastermydomain1 as the "from address".

Using the current configuration postfix says:

 NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 553 5.7.1
<postmastermydomain1>: Sender address rejected: not logged in;
from=<postmastermydomain1> to=<testmydomain1> proto=ESMTP helo=<localhost>

Can i somehow exclude postmastermydomain1 or the IP address of my
server from the smtpd_sender_restrictions?

Many thanks in advance,

Alex