OSEC

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

From: Brian Evans (grknightscent-team.com)
Date: Fri Apr 11 2008 - 15:10:27 CDT


Brian Evans wrote:
> punit jain wrote:
>> Hi All,
>>
>> I need to allow only few users to sens mail from my domain. say my
>> domain testindia.com <http://testindia.com> has 30 users out of which
>> i just want 2 users to send mails and rest to recieve mails but
>> should not be allowed to send mails.
>>
>> domain : testindia.com <http://testindia.com>
>> users: user1testindia.com <mailto:user1testindia.com> allowed
>> user2testindia.com <mailto:user2testindia.com> allowed
>> user3testindia.com <mailto:user3testindia.com> not
>> allowed to send mails but recieves mails
>>
>> I think this can be met with smtp_sender_restrictions ? am i correct
>> ? if yes how , i tried but couldnt.
>>
> Try smtpd_sender_restrictions (notice the smtpd)
> http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions
>
> The one you mentioned is not in the docs and may not exist... Always
> check `postconf -n` to see if postfix will pick up your changes.
>
Side note: this is very easy to fool. Clients can send practically
anything as MAIL FROM.

For real security, have the wanted users authenticate with SASL and do
    smtpd_sender_restrictions = reject_sender_login_mismatch,
check_sender_access hash:/etc/postfix/access_table
    smtpd_sender_login_maps = hash:/etc/postfix/sasl_login_map

(hash names representative only and can be any table type)

Brian