Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a vagrant box running ubuntu 11.10 and a PHP script that uses swiftmailer to send email. My mail provider is SES, although I've replicated the issue with Mailgun and sendgrid as well.

My issue is that when I attempt to send mail on the vagrantbox I get "Connection to tcp://email-smtp.us-east-1.amazonaws.com:465 Timed Out". However when I run the exact same script from the host machine, it works fine.

Here's ifconfig on my vagrant box:

eth0      Link encap:Ethernet  HWaddr 08:00:27:6e:cd:85  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe6e:cd85/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:272963 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138823 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:375217285 (375.2 MB)  TX bytes:8245622 (8.2 MB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:50:d1:0c  
          inet addr:192.168.33.10  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe50:d10c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:468 (468.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:181 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:18416 (18.4 KB)  TX bytes:18416 (18.4 KB)

eth1 is a host only network interface with a static ip.

UPDATE: This appears to be a problem with swiftmailer. I had different copies of it between my host and guest boxes. I updated my host box, and now I'm getting the same issue where the connection times out.

share|improve this question
add comment

1 Answer

check whether port is accessible from virtual host and if not, make it accessible using port forwarding or open port in firewall.

share|improve this answer
    
I don't think that's the issue, as I can execute the following on the vagrant box: openssl s_client -crlf -quiet -connect email-smtp.us-east-1.amazonaws.com:465 and can EHLO and receive code 250 successfully. –  Josh Nankin Feb 26 '13 at 15:00
    
This appears to be a problem with swiftmailer. I had different copies of it between my host and guest boxes. I updated my host box, and now I'm getting the same issue where the connection times out. –  Josh Nankin Feb 26 '13 at 15:14
    
This seems to be unrelated to my box setup. See stackoverflow.com/questions/15093702/… –  Josh Nankin Feb 26 '13 at 16:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.