Question regarding example for smtpd_command_filter

2011-10-05 Thread Patrick Ben Koetter
I have a question regarding the Bounce-never mail sink regexp: postconf(5) gives this example: /^(RCPT\s+TO:.*?)\bNOTIFY=\S+\b(.*)/ $1 NOTIFY=NEVER $2 Isn't there a '' missing before the '?'. As I understand it the '?' makes the preceeding character optional e.g. example.com and

Re: Question regarding example for smtpd_command_filter

2011-10-05 Thread Wietse Venema
Patrick Ben Koetter: I have a question regarding the Bounce-never mail sink regexp: postconf(5) gives this example: /^(RCPT\s+TO:.*?)\bNOTIFY=\S+\b(.*)/ $1 NOTIFY=NEVER $2 Isn't there a '' missing before the '?'. As I understand it the '?' makes the preceeding character

Re: Question regarding example for smtpd_command_filter

2011-10-05 Thread Ralf Hildebrandt
* Wietse Venema wie...@porcupine.org: Patrick Ben Koetter: I have a question regarding the Bounce-never mail sink regexp: postconf(5) gives this example: /^(RCPT\s+TO:.*?)\bNOTIFY=\S+\b(.*)/ $1 NOTIFY=NEVER $2 Isn't there a '' missing before the '?'. As I understand it

Re: Question regarding example for smtpd_command_filter

2011-10-05 Thread Wietse Venema
Ralf Hildebrandt: * Wietse Venema wie...@porcupine.org: Patrick Ben Koetter: I have a question regarding the Bounce-never mail sink regexp: postconf(5) gives this example: /^(RCPT\s+TO:.*?)\bNOTIFY=\S+\b(.*)/ $1 NOTIFY=NEVER $2 Isn't there a '' missing before

Re: Question regarding example for smtpd_command_filter

2011-10-05 Thread Ralf Hildebrandt
* Wietse Venema wie...@porcupine.org: The ? does not do what you guys are thinking. The .*? turns on lazy matching. Without this, .* would also match \bNOTIFY=\S+\b(.*) and that is not what we want. http://en.wikipedia.org/wiki/Regular_expression#Lazy_quantification Obviously, it's time