On Tue, Mar 26, 2013 at 09:35:40AM +0000, Fabio Sangiovanni wrote: > > > 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
Sorry, I don't do pastebins. :-( If you want help include the relevant information in your message. > 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. Addresses used in access checks are case folded in Postfix upstream of the access table. The original address goes into the queue file, but access checks use case folded addresses. src/smtpd/smtpd_resolve.c: static void *resolve_pagein(const char *addr, void *unused_context) { static VSTRING *query; RESOLVE_REPLY *reply; /* * Initialize on the fly. */ if (query == 0) query = vstring_alloc(10); /* * Initialize. */ reply = (RESOLVE_REPLY *) mymalloc(sizeof(*reply)); resolve_clnt_init(reply); /* * Resolve the address. */ rewrite_clnt_internal(MAIL_ATTR_RWR_LOCAL, addr, query); resolve_clnt_query(STR(query), reply); lowercase(STR(reply->recipient)); /* XXX */ /* * Save the result. */ return ((void *) reply); } -- Viktor.