Well I needed to forward port 587 in my server so that Thunderbird installed in my local desktop could send mails through gmail account.
Here is how I did it.
iptables -I FORWARD -p tcp –dport 587 -j ACCEPT
What the above command does exactly is writes a (-I) inserts a new rule in the FORWARD chain which (-j) ACCEPTs all packets following (-p) tcp protocol and (–dport) destination port 587