What ports, besides 80, need to be available to send (only send) email using phpmailer to gmail over SSL?
        Posted  
        
            by 
                Wobblefoot
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Wobblefoot
        
        
        
        Published on 2011-03-16T03:05:36Z
        Indexed on 
            2011/03/16
            8:11 UTC
        
        
        Read the original article
        Hit count: 228
        
Using phpmailer I keep getting a 110 timeout and "Unable to connect to host" when sending email from my web server.
The authentication details are right and they work on another server I have (login, pwd, ports etc and gmail acct set up for SSL connections on 465), but it's failing on my new server.
FIREWALL: I allow related/established, port 80 and a port for SSH on INPUT, then this on OUTPUT:
7906  474K DROP       tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp  
0     0 ACCEPT     tcp  --  any    any     localhost.localdomain  yw-in-f109.1e100.net tcp dpt:submission  
0     0 ACCEPT     tcp  --  any    any     localhost.localdomain  gx-in-f109.1e100.net tcp dpt:ssmtp  
0     0 DROP       tcp  --  any    any     anywhere             anywhere            tcp dpt:submission  
9   540 DROP       tcp  --  any    any     anywhere             anywhere            tcp dpt:ssmtp 
This output chain works on my other server and disabling it doesn't get mail delivered either.
WEB SERVER: Varnish (80) > Nginx (8088) > Drupal 7 > PHP5-FPM > APC > MySQL All works beautifully, except for outgoing email.
What else could it be?
I understand phpmailer does NOT require a local MTA or procmail (this is sort of the point - I don't want the security or admin overhead of a full blown MTA on my web server). Am I wrong? Do I need an MTA as well?
What local ports and programs are used to authenticate over SSL and route mail using phpmailer?
Any ideas at all greatly appreciated - wasted a day on this nonsense already!
© Server Fault or respective owner