PCRE_TABLE(5) File Formats Manual PCRE_TABLE(5) (NAME) pcre_table - PCRE Postfix (SYNOPSIS) postmap -q "string" pcre:/etc/postfix/filename postmap -q - pcre:/etc/postfix/filename (DESCRIPTION) Postfix (address rewriting) (mail routing) . lmdb: cdb: hash: dbm: . (Perl Compatible Regular Expression PCRE) . . . Postfix <> . <> . <> header_checks(5) <> body_checks(5) ( Postfix . ) . pcre2 ( Postfix . ) pcre ( Postfix) . (COMPATIBILITY) Postfix . <> . . (TABLE FORMAT) PCRE : /pattern/flags result pattern result . !/pattern/flags result pattern result . if /pattern/flags endif /pattern/ if endif . if..endif . : if..endif (whitespace) . Postfix . . if !/pattern/flags endif /pattern/ if endif . if..endif . : if..endif (whitespace) . Postfix . . <<#>> . . . perl . (delimiter) - ( <> ). . . (flags) : i (: ) . . m (: ) MULTILINE pcre. (metacharacters) ^ $ (newline) . s (: ) DOTALL pcre. . . . Postfix . x (: ) extended pcre. ( ) . (escape ). : #comment . A (: ) ANCHORED pcre. <<>> (<< >>) . . E (: ) DOLLAR_ENDONLY pcre. $ . ( ). MULTILINE . U (: ) UNGREEDY pcre. <<>> (greediness) <> . (?U) . X (: ) EXTRA pcre. . PCRE2 . (SEARCH ORDER) . . IP . user@domain user domain user+foo user foo . (TEXT SUBSTITUTION) ( <<()>> ) $1 $2 $ $$ . ${n} $(n) . pcre2 . : ( ! ) . (INLINE SPECIFICATION) ( Postfix . ). : main.cf: parameter = .. pcre:{ { rule-1 }, { rule-2 } .. } .. master.cf: .. -o { parameter = .. pcre:{ { rule-1 }, { rule-2 } .. } .. } .. Postfix $parametername <<{>> <<}>> rule : in-memory file: rule-1 rule-2 .. Postfix /etc/postfix . (INLINE SPECIFICATION CAVEATS) o $parametername \Q$parametername\E <<.>> $parametername . . o $ $$ Postfix $name . <> : o <> main.cf :pcre <> . "undefined parameter" :pcre Postfix . o <<-o { parametername = value }>> master.cf :pcre <> . "undefined parameter" :pcre Postfix . SMTPD (EXAMPLE SMTPD ACCESS MAP) # exploder majordomo /^(?!owner-)(.*)-outgoing@(.*)/ 550 Use ${1}@${2} instead # friend@whatever whatever /^(friend@(?!my\.domain$).*)$/ 550 Stick this in your pipe $1 # . . # /^noddy@my\.domain$/ 550 This user is a funny one. You really don't want to send mail to them as it only makes their head spin. (EXAMPLE HEADER FILTER MAP) /^Subject: make money fast/ REJECT /^To: friend@public\.com/ REJECT (EXAMPLE BODY FILTER MAP) # base 64 . # PCRE . ~^[[:alnum:]+/]{60,}$~ OK # . (SEE ALSO) postmap(1), Postfix postconf(5), regexp_table(5), POSIX (README FILES) <> <> . DATABASE_README, Postfix (AUTHORS) PCRE : Andrew McNamara andrewm@connect.com.au connect.com.au Pty. Ltd. Level 3, 213 Miller St North Sydney, NSW, Australia : Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA PCRE_TABLE(5)