2 msgSQL query as alias

Mailfrom restriction and SASL clients
\ tonio (30 May 2007)
. \ mouss (30 May 2007)
. . \ tonio (30 May 2007)

4 msgHow to inform outside users that domain soon wi...
31 msgASSP and NOOP
9 msgDouble restrictions for SMTP Authen question ?
5 msgResend 'virus' mails
3 msgmessage_size_limit exceptions
53 msgabout greylist.pl and alternatives
7 msgfailing to send a large mail
1 msgRe: Another weird cert question
2 msgRestrict sending to one address from one IP?
6 msgForcing PIX workarounds?
4 msgheader checks are not working
9 msgrecipient_delimiter
3 msgDocumenting alias expansion in mails
5 msgDomain Change Notification
4 msgHow to do a defer_if_permit with a SMTP code 451?
4 msgvirtual: mbox fine, maildir generates 'fatal: g...
5 msgMultiple relays and rate control with anvil
19 msg550
Subject:Mailfrom restriction and SASL clients
Group:Postfix-users
From:tonio
Date:30 May 2007


 
Hello,
i'm trying to set a restriction on senders in my network:
they have to use exclusively our domains in their mailfrom.

for this purpose i've set this restriction, found on Ralf
Hildebrandt's website:

main.cf :

mynetworks = 127.0.0.0/8

smtpd_restriction_classes =
has_our_domain_as_sender

has_our_domain_as_sender =
check_sender_access hash:/etc/postfix/our_domain_as_sender reject

smtpd_recipient_restrictions =
check_client_access hash:/etc/postfix/internal_networks
check_sender_access hash:/etc/postfix/not_our_domain_as_sender
permit_sasl_authenticated
permit_mynetworks
reject_unauth_destination
....
... other spam checks ...
permit



/etc/postfix/internal_networks :

192.168.1 has_our_domain_as_sender


/etc/postfix/our_domain_as_sender :
domaine.com OK
<> OK


/etc/postfix/not_our_domain_as_sender :

domaine.com 554 You are not from here



It's working for internal clients, but i've a problem with external
users authentified by SASL: they CANT send a message with our domain
in the mailfrom.

so i've tried to set something like this:

smtpd_recipient_restrictions =
check_client_access hash:/etc/postfix/internal_networks,
permit_sasl_authenticated,
check_sender_access hash:/etc/postfix/not_our_domain_as_sender,
permit_mynetworks
reject_unauth_destination
....
... other spam checks ...
permit


Now SASL users can send a message with our domain in the mailfrom, but
they can also send one with any domain into ! (so the restriction is
bypassed)

I understand why but i cant found a way to solve this problem.

How can i check the mailfrom from internal AND sasl clients ?

thanks for your help, and sorry for my poor english !

Tonio







© 2004-2008 readlist.com