Changing file extension names

Hi I have a list of files :

root@L28mustang:/var/log/exim4/2017/Jul2017_Blast_BC07# ls -lrt | grep mainlog
-rw-r----- 1 Debian-exim adm  3636932 Jul  8 06:25 mainlog.3.gz
-rw-r----- 1 Debian-exim adm   919512 Jul  9 06:27 mainlog.2.gz
-rw-r----- 1 Debian-exim adm  7655054 Jul 10 06:25 mainlog.1
-rw-r----- 1 Debian-exim adm  2799218 Jul 10 15:40 mainlog

I need to change the extension names for all the files above to .filtered.
I know how to do it for the .gz files like this :

for i in mainlog*
	do
	   exigrep L28stream1 "$i" | egrep -v "jiun.shyong.hor@ericsson.com|chander.c.shekher@ericsson.com|nagios|L28eagle" > "${i/%.gz/.filtered}"
done

How do I change both the mainlog files with the .gz extension and without the .gz extension in one command?

Strip a .gz and add .filtered

... > "${i%.gz}.filtered"