OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: check sender address for auth user only ?

From: Dalis-Adrian (dalis_adrianyahoo.com)
Date: Tue Jun 06 2006 - 06:56:55 CDT


--- Magnus Bäck <magnusdsek.lth.se> wrote:

> On Tuesday, June 06, 2006 at 12:21 CEST,
> Dalis-Adrian <dalis_adrianyahoo.com> wrote:
>
> > --- Magnus Bäck <magnusdsek.lth.se> wrote:
> >
> > > http://www.postfix.org/postconf.5.html#smtpd_sender_login_maps
> > > http://www.postfix.org/postconf.5.html#reject_authenticated_sender_login_mismatch
> > > http://www.postfix.org/postconf.5.html#reject_sender_login_mismatch
> > > http://www.postfix.org/postconf.5.html#reject_unauthenticated_sender_login_mismatch
> >
> > I read docs before, my case is special, i need to allow "domain.com"
> > for all auth user only
>
> Yes, everyone thinks they're special. You could indeed use
> reject_sender_login_mismatch for this, but this is simpler:
>
> main.cf:
> smtpd_sender_restrictions =
> permit_sasl_authenticated,
> check_sender_access hash:/path/to/file

Please read again my e-mail

main.cf
smtpd_sender_login_maps= mysql:/etc/postfix/sql_conf/smtpd_sender_login_maps.cf

smtpd_recipient_restrictions = permit_sasl_authenticated,
                                check_sender_access hash:/etc/postfix/test,
                                reject_authenticated_sender_login_mismatch,
                                reject_unauth_destination

/etc/postfix/test
example.com OK

in this flow
First i need to allow some domains
Second auth user can send with example.com but UNauth user can ! send with example.com
i need something like this

smtpd_recipient_restrictions = check_sender_access_only_auth hash:/etc/postfix/test,
                                reject_authenticated_sender_login_mismatch,
                                permit_sasl_authenticated,
                                reject_unauth_destination
/etc/postfix/test
example.com OK

ps: i`m not special only my case

>
> /path/to/file:
> example.com REJECT
>
> --
> Magnus Bäck
> magnusdsek.lth.se
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com