Edit: didn't notice PATTERN shouldn't be part of the output.
cat /etc/passwd | awk '{if(a-->0){print;next}} /qmaild/{a=5}'
or
cat /etc/passwd | awk ' found && NR-6 < a{print} /qmaild/{a=NR;found=1}'
The shortest I can come up with is:
cat /etc/passwd | awk 'a-->0;/qmaild/{a=5}'
Read as a tends to 0. /qmaild/ sets a to 5 :-)