On Fri, 19 Mar 2021 at 00:27, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:
> On Thu, Mar 18, 2021 at 11:30:56PM +0530, Durga Prasad Malyala wrote: > > > > If you want usable help, you'll need to be willing to post the actual > > > domain name, not an obfuscated version. > > > > the domain is ucc-bsnl.co.in > > Thanks, yes the domain "ucc-bsnl.co.in" has neither MX records, nor any > A or AAAA records. It does not receive email, and so many receiving > MTAs, including yours, would not by default accept email from sender > addresses in this domain: > > > The Log is: > > Mar 18 23:09:25 mx5 postfix/smtpd[6039]: NOQUEUE: reject: RCPT from > > mail-eopbgr1390048.outbound.protection.outlook.com[40.107.139.48]: 450 > > 4.1.8 <dltsupp...@ucc-bsnl.co.in>: Sender address rejected: Domain not > > found; from=<dltsupp...@ucc-bsnl.co.in> to=<d...@datasoftcomnet.com> > > proto=ESMTP helo=<IND01-BO1-obe.outbound.protection.outlook.com> > > > > > > after googling I created a file called no_a_record.pcre with the > > > following > > > > contents. > > While I could ask you to repost the PCRE table, which likely has a > mistake, the right fix is not use a PCRE table at all. > > > > post the output of "postconf -nf", being careful to > > > not fold any lines, or otherwise add or remove whitespace. > > > Do not send HTML email, compose it as plain text. > > You did not post the requested "postconf -nf" output showing your > complete configuration, which may have other relevant rules. Please > post it in reply to this message. > > > > Is this OK? > > > > smtpd_sender_restrictions = > > check_sender_access hash:/etc/postfix/access, > > check_sender_access pcre:/etc/postfix/no_a_record.pcre, > > [...] > > reject_unknown_sender_domain > > 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 > > to the existing /etc/postfix/access, and "postmap" the table. > > -- > Viktor. > 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... smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access, check_sender_access pcre:/etc/postfix/no_a_record.pcre, check_sender_access hash:/etc/postfix/joeweindb, check_sender_access hash:/etc/postfix/ransomwaredombl, reject_unknown_sender_domain Thanks DP <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>