On 4/27/2015 11:21 AM, Alex Regan wrote: > Hi, > > I have a fedora20 system with postfix-2.10.5 and trying to figure > out sender_restrictions and client_restrictions and how access > tables work. > > I've read the first five google results, including the access(5) man > page, and don't understand the pattern matching. > > How can I match all users in a domain? Exact matches work, but how > do I do "*@domain1.com" ? > > I tried just listing the domain itself and that doesn't work. If I > have "[email protected] REJECT" in my sender_access file, my test > works. However, if I have just "domain1.com", it does not: > > $ echo '[email protected] REJECT' > sender_checks > $ postmap sender_checks > $ sender="[email protected]" > $ postmap -q "$sender" hash:/etc/postfix/sender_checks > REJECT > $ echo 'domain1.com REJECT' > sender_checks > $ postmap sender_checks
The above is correct, use the bare domain name. > $ postmap -q "$sender" hash:/etc/postfix/sender_checks The postmap test command does not implement the pattern search order as defined in access(5). It's your testing that's broken, not the map. -- Noel Jones > $ > > Should I consider using pcre or regex for this instead? > > Ideas greatly appreciated. > Thanks, > Alex >
