I am trying to get SMTP (and IMAP, POP, IMAPS, etc..) to run over my haproxy server but i can't seem to actually get traffic to be allowed through.
Anytime i telnet to my ip on port 25 i get: (same for 587)
Connection failed: No connection could be made because the target machine actively refused it
when i do:
netstat -a | egrep 'Proto|LISTEN'
This is the result:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 localhost:6010 *:* LISTEN
tcp 0 0 *:https *:* LISTEN
tcp 0 0 localhost:6011 *:* LISTEN
tcp 0 0 *:7999 *:* LISTEN
tcp 0 0 *:3336 *:* LISTEN
tcp 0 0 *:submission *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 localhost:6010 [::]:* LISTEN
tcp6 0 0 localhost:6011 [::]:* LISTEN
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 8712 /var/run/dbus/system_bus_socket
unix 2 [ ACC ] SEQPACKET LISTENING 7484 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 1395 @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 9960 /var/run/acpid.socket
Oh and i've tried multiple different examples like:
defaults
mode http
contimeout 4000
clitimeout 3600000
srvtimeout 3600000
balance roundrobin
listen MyMail-1 *:25
bind *:110,*:135
bind *:139,*:443
bind *:60000,*:60001
bind *:6001-6004
bind *:587,*:993-995
disabled
mode tcp
option persist
balance roundrobin
stick-table type ip size 10240k expire 30m
stick on src
server HC-CAS1 10.1.2.246 weight 1 check port 80 inter 5000 rise 2 fall 3
#server HC-CAS2 10.10.10.21 weight 1 check port 80 inter 5000 rise 2 fall 3
option redispatch
option abortonclose
maxconn 40000
And right now i have it as simple as possible:
listen email_proxy :25,:587
mode tcp
balance roundrobin
server srv1 10.1.2.246 check port 25 inter 30000 rise 1 fall 2
So my machine says it's listening, and the haproxy machine is reachable from the outside (port 80/443 traffic) is fine, i can also reach my statistics page on my public static ip.
If anyone can help me out that would be greatly appreciated.