Viktor Dukhovni <postfix-users <at> dukhovni.org> writes: > > On Mon, Mar 25, 2013 at 05:44:45PM +0100, Fabio Sangiovanni wrote: > > > $ postmap -q 'test <at> domain.tld' \ > > regexp:/etc/postfix/check_recipient_access.regexp > > REJECT wrong format > > > > while: > > $ postmap -q 'tEsT <at> domain.tld' \ > > regexp:/etc/postfix/check_recipient_access.regexp > > <no output> > > -f Do not fold the lookup key to lower case while creating or > querying a table. > > With Postfix version 2.3 and later, this option has no effect > for regular expression tables. There, case folding is controlled > by appending a flag to a pattern. > > So your case-insensitive lookups are working.
Did you mean case-sensitive? > > > This behaviour is correct, but I can't get it using the restriction > > in postfix. > > The Postfix table layer is at the mercy of any upstream rewriting. > Are you sure your input address is not mapped to lower case upstream? > Yes, I'm quite sure. At the following pasterbin: http://pastebin.com/ttQkZPvW you can find: a) 'postconf -m' output b) 'postconf -n' output c) cat /etc/postfix/check_recipient_access.regexp d) cat /etc/postfix/master.cf e) 'postmap -q' queries to /etc/postfix/check_recipient_access.regexp f) client telnet session to trigger the behaviour g) 'smtpd -v' maillog output In particular, g) gives evidence of case folding to lowercase while querying the regexp table, even with 'i' flag appended to the pattern. Postfix version: 2.6.6 Thanks, Fabio