On Fri, Mar 19, 2021 at 12:44:52AM +0530, Durga Prasad Malyala wrote:
> > It should work, given a correct PCRE table, however, as mentioned above,
> > a better solution is not use PCRE at all:
> >
> > # Postfix 3.0 and later have an "inline" table type:
> > #
> > smtpd_sender_restrictions =
> > check_sender_access hash:/etc/postfix/access,
> > check_sender_access inline:{ucc-bsnl.co.in=OK}
> > [...]
> > reject_unknown_sender_domain
> >
> > Or you can just add:
> >
> > ucc-bsnl.co.in OK
>
> Thank you Victor.
>
> I got it resolved by removing the first line of the old no_a_record.pcre
> file. So effectively my new no_a_record.pcre file has only 1 line.
>
> /^.*ucc-bsnl.co.in$/ OK
>
> also Using in main.cf...
Yes, but this is is needlessly complicated and also exempts:
bogusucc-bsnl.co.in
ucc-bsnlxco.in
...
Just add the domain to the access table, but if you prefer to keep it
separate, use the "inline:" syntax. Most users don't know how to
write accurate regular expressions (you're not alone), and there's
no need for them in this case.
--
Viktor.