flashmob / go-guerrilla

Mini SMTP server written in golang
MIT License
2.76k stars 361 forks source link

add support for proxy protocol #238

Open romantomjak opened 2 years ago

romantomjak commented 2 years ago

This is a small quality of life improvement to transparently support clients that use the proxy protocol. This is useful if go-guerilla is serving clients behind a proxy such as HA Proxy, AWS ELB, Traefik, etc.

Trying 111.222.333.444...
Connected to mail.somehost.com.
Escape character is '^]'.
220 mail.somehost.com SMTP Guerrilla(unknown) #1 (1) 2022-04-30T18:23:04Z
554 5.5.1 Unrecognized command

The "unrecognized command" response is due to the proxy server sending the proxy protocol header