Finding all catchall forwarders

Wallaby

Well-Known Member
Aug 15, 2001
131
1
318
I'm trying to find all domains for which a "catchall" email forwarder has been set, so we can encourage the relevant users not to use one!

Catchalls in /etc/valiases seem to have the form:

domain.com:*: [email protected]

so I've tried using grep to output the lines from the files which contain "colon asetrisk colon space" (ie ':*: ') using:

grep -i ':*: ' *

but this also gives me a load of lines that do *not* contain the magic search string!

Where is my grep syntax wrong please?