Approach 1 :

The below filter when added, will stop both – sending out error email and logging to the db.

<errorFilter>
    <test>
        <!--<equal binding="HttpStatusCode" value="404" type="Int32" />-->
        <regex binding="BaseException.Message" pattern="404 request received" />
    </test>
</errorFilter>

Approach 2 :

The below filter will only stop sending out mail, but will continue to log to the db.

<errorFilter>
    <test>
        <or>
            <and>
                <regex binding="BaseException.Message" pattern="404 request received" />
                <regex binding="FilterSourceType.Name" pattern="mail" />
            </and>
            <and>
                <regex binding="BaseException.Message" pattern="Any xyz pattern can go in here..." />
                <regex binding="FilterSourceType.Name" pattern="mail" />
            </and>
        </or>
    </test>
</errorFilter>