On Tue, 2010-01-19 at 09:56 +0700, Trần Trọng Tấn wrote:
> Dear all,
> Do you have any way to check domain of email and IP of sending host
> before relay it? I'm trying to setup a gateway which accept relay for
> some IP address, and make sure this IP can only send email from
> domain(s) it owned.
> TIA,
> giobuon


How many such domains ,do you have ? If there are only 5-6 such domains
create smtpd classes for each domain. But if there are hundreds of
domains you may want to use some other methods like enforcing smtpauth
and use smtpd_sender_login_maps

I have a similar situation here , when we relay mails for clients.I do a
workaround that works for my case

For clients not using smtpauth ( We still have a few archaic
accnts :-( ) I put all the IPs in one smtpd_restriction class and allow
the envelope from only from a allowed list of domains 




smtpd_restriction_classes = restrict_from
restrict_from=
        check_sender_access hash:/etc/postfix/permit_domains,
        reject




---
Ofcourse one client machine can send mail as any of the allowed
domains .. but thats OK in a practical situation. 







Thanks
Ram


Reply via email to