<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’d like stunnel to pass the incoming IP along, not stunnel's IP.<div class=""><br class=""></div><div class="">My traffic flow is:</div><div class=""><br class=""></div><div class="">Stunnel (accept on port 465) -> ASSP (an smtp proxy) -> Postfix (accept on port 10026)</div><div class=""><br class=""></div><div class="">I tried:</div><div class=""><br class=""></div><div class=""><div class="">[ssmtp]</div><div class="">client = no</div><div class="">accept = 465</div><div class="">connect = 25</div><div class="">protocol = proxy</div></div><div class=""><br class=""></div><div class="">But ASSP had:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Apr-15-19 18:50:22 [Worker_1] Connected: session:7FE104AA1870 127.0.0.1:58954 > 127.0.0.1:25 > 127.0.0.1:10026</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Apr-15-19 18:50:23 [Worker_1] 127.0.0.1 warning: got reply '502 5.5.2 Error: command not recognized' from 127.0.0.1</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Apr-15-19 18:50:23 id-18223-03317 [Worker_1] 127.0.0.1 info: sending EHLO instead of HELO to 127.0.0.1</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Apr-15-19 18:50:23 id-18223-03317 [Worker_1] 127.0.0.1 disconnected: session:7FE104AA1870 127.0.0.1 - processing time 1 seconds</span></font></div></div><div class=""><br class=""></div><div class="">And Postfix had:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">2019-04-15 18:50:22.995042+1000 localhost smtpd[33360]: connect from localhost[127.0.0.1]</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">2019-04-15 18:50:23.108756+1000 localhost smtpd[33360]: improper command pipelining after EHLO from localhost[127.0.0.1]: RSET\r\n</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">2019-04-15 18:50:23.273664+1000 localhost smtpd[33360]: disconnect from localhost[127.0.0.1] ehlo=2 rset=1 quit=1 unknown=0/1 commands=4/5</span></font></div></div><div class=""><br class=""></div><div class="">So I take it protocol=proxy is not the way to do it. Sounds like this only works with haproxy which I do not have installed.</div><div class=""><br class=""></div><div class="">Is there a way to do this?</div><div class=""><br class=""></div><div class="">The problem I am trying to solve is ASSP has lines like:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">warning: SMTP authentication failed on 127.0.0.1</span></font></div><div class=""><br class=""></div><div class="">- obviously I don’t want fail2ban to ban 127.0.0.1.</div><div class=""><br class=""></div><div class="">Stunnel log has:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">2019.04.15 18:52:26 LOG5[23]: Service [ssmtp] accepted connection from ::ffff:185.222.209.66:53642</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">2019.04.15 18:52:27 LOG3[23]: s_connect: connect ::1:25: Connection refused (61)</span></font></div></div><div class=""><br class=""></div><div class="">Any suggestions?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">James.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>