IF you have this in your logs
unable to connect to ssl://pop.gmail.com:995 (Permission denied)
or this
unable to connect to ssl://smtp.gmail.com:25 (Permission denied)
PORTS CAN BE DIFF
but this issues comes down to your server/host blocking ip or whole domains
over the time i have fought this isssue with mail, I have solved it 4 diff times only to have the issue reapear. so if you see that entry in your logs contact your provider or turn off automatic ip blocking for google
hope this helps
Swens