You could do this.
1. Ping smtp.gmail.com and imap.gmail.com and get the IP address. Just pick one ip address for smtp... and imap...
2. Open your hosts file located in ( C:\Windows\System32\drivers\etc\hosts ) that is hidden by default so you might want to temporarily change your View options (Show hidden files and folders).
3. Add the following lines to your hosts file. Where x.x.x.x is the IP address you got from ping.
x.x.x.x smtp.gmail.com
x.x.x.x imap.gmail.com
This is done so that each time your mail client tries to resolve smtp and imap.gmail.com it will resolve only to those IPs.
4. The IPs can now be entered in PD-Proxy's exception list.
So is there a way to get all gmail servers ip list?
Yes, use nslookup
C:\Users\Hp>nslookup smtp.gmail.com
Server: google-public-dns-a.google.com
Address: 8.8.8.8
Non-authoritative answer:
Name: gmail-smtp-msa.l.google.com
Addresses: 2607:f8b0:4003:c01::6d
173.194.64.108
173.194.64.109
Aliases: smtp.gmail.com
why why pdproxy doesn't allow exception by URL instead of IP? Exceptions by programs would be nice too
That is not possible since PD-Proxy works on the IP level, it has no access to URLs or even programs. It just basically tunnels ip packets and depending on the destination(IP Address) of the packet it can decide if it will tunnel the packet or let it pass using your default internet gateway.
or common can't you just open the email ports? I can't believe users will abuse it that much
Yes, they will abuse it. If spammers know that our smtp ports are open they will abuse it and that could cause service interruption. SMTP ports are already blocked from our servers yet we still receive spam reports every month from our servers.
Aside from the human spammers there are also issues regarding computers that are infected with viruses that automatically sends spam. The owner of the computer wont even know that his computer is sending spam.