Print file (cat) without comments and empty lines

$ cat /etc/postfix/main.cf | egrep -v "(^#.*|^$)"
egrep -v      means leave the following out
^#.*          means patterns that begin with a #
|             means or
^$            means patterns that are empty

or

cat /etc/postfix/main.cf | egrep -v "^\s*(#|$)"