SMTP with Google Apps not connecting

Hey all,

I'm running an application that requires SMTP to send emails via port 465 with SSL authentication.

I checked in /etc/services and saw SSMTP available on that port…

Not sure why I still can't connect.

Any help would be greatly appreciated! Thank you!

4 Replies

@mattryan29:

I checked in /etc/services and saw SSMTP available on that port…
/etc/services is a static list of official names for ports–not any indication of what's going on. You probably want:

netstat -l

You have Google Apps in the thread title, so I'm not sure why you're hitting your Linode. Can you elaborate on your setup?

My setup consists of Ubuntu 10.4, apache2, php, and mysql.

The application thats not working properly attempts to send mail via smtp. But the connection is never made.

netstat -l produces the following

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:imaps                 *:*                     LISTEN     
tcp        0      0 *:pop3s                 *:*                     LISTEN     
tcp        0      0 *:2020                  *:*                     LISTEN     
tcp        0      0 *:xmpp-client           *:*                     LISTEN     
tcp        0      0 localhost:mysql         *:*                     LISTEN     
tcp        0      0 *:submission            *:*                     LISTEN     
tcp        0      0 *:pop3                  *:*                     LISTEN     
tcp        0      0 *:imap2                 *:*                     LISTEN     
tcp        0      0 *:www                   *:*                     LISTEN     
tcp        0      0 *:cisco-sccp            *:*                     LISTEN     
tcp        0      0 *:ssmtp                 *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 *:504                   *:*                     LISTEN     
tcp        0      0 *:smtp                  *:*                     LISTEN     
tcp        0      0 *:https                 *:*                     LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
udp        0      0 *:bootpc                *:*                                
udp        0      0 full.domain.co:ntp *:*                                
udp        0      0 localhost:ntp           *:*                                
udp        0      0 *:ntp                   *:*                                
udp6       0      0 ip6-localhost:ntp       [::]:*                             
udp6       0      0 fe80::fcfd:adff:fef:ntp [::]:*                             
udp6       0      0 [::]:ntp                [::]:*                             
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     717      @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     50256    /var/run/fail2ban/fail2ban.sock
unix  2      [ ACC ]     STREAM     LISTENING     62117    /var/run/courier/authdaemon/socket.tmp
unix  2      [ ACC ]     STREAM     LISTENING     90565    /var/run/citadel/citadel.socket
unix  2      [ ACC ]     STREAM     LISTENING     90577    /var/run/citadel/lmtp.socket
unix  2      [ ACC ]     STREAM     LISTENING     61496    /var/spool/postfix/var/run/saslauthd/mux
unix  2      [ ACC ]     STREAM     LISTENING     90579    /var/run/citadel/lmtp-unfiltered.socket
unix  2      [ ACC ]     STREAM     LISTENING     79858    /var/run/mysqld/mysqld.sock

Your netstat shows smtp and ssmtp so something's listening. What's your email server and does your /var/log/mail.log show anything useful.

Ok really crazy… it wouldn't work with opt code caching enabled. All good now.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct