proxychains-ng icon indicating copy to clipboard operation
proxychains-ng copied to clipboard

socksfying mail servers Sendmail/Postfix

Open user021 opened this issue 11 years ago • 6 comments

Hello, did anybody successfully socksfy either sendmail or postfix ?

user021 avatar Jun 26 '13 10:06 user021

how would you proxify an incoming connection ? in general, only outgoing connections can be proxified.

rofl0r avatar Jun 26 '13 10:06 rofl0r

Well, im only interested on SMTP-outgoin but kinda new to this domain and not sure how to do it, as far as i understood there are two methods: -open a socksfyed terminal but the command proxychains gnome-terminal doesn't work on my Ubuntu -for Postfix, make a script like here http://benizi.com/postfix-proxychains but i don't need SSH tunnel and idk how modify it

user021 avatar Jun 26 '13 12:06 user021

as for running a proxyfied terminal, you open gnome-terminal as usual and then invoke proxychains4 bash inside the terminal or just export LD_PRELOAD=/path/to/libproxychains.so you probably need to set a localnet for 127.x.x.x in proxychains.conf so that the smtp server does not try to connect to local ports using the proxy

as for the script, i don't see the problem - you just skip the ssh command and instead put your socks proxy into the config file.

rofl0r avatar Jun 26 '13 12:06 rofl0r

Well, i did, try with SOCKS4 proxyies and also SOCKS5 because i wasn't sure if works with SOCKS4 (if the DNS-MX records r resolved through the proxy) but on server logs i see that it still uses my IP. Not sure how can debug proxychains, to see if works or what is happening more exactly.

user021 avatar Jun 27 '13 15:06 user021

gdb --args proxychains4 mail-server should do the job. then you can break on proxychains main() or the some function of libproxychains.so. you should start your server in a way that makes it run in foreground and log to the console. then you should also be able to see the connections done via proxychains and other proxychains output like [DLL init].

rofl0r avatar Jun 27 '13 15:06 rofl0r

for those whome trying to send emails through proxychains

i found this too

https://github.com/Dionach/PhEmail

work without postfix

screenshot from 2018-04-16 06-18-43

it has two problem

sometimes it send to gmail and sometimes not

the second problem is it always sent to spam and that because all tor exit nodes ar black listed

and other problem that it always showing this when test at mailtester

"We didn't find a server (A Record) behind your hostname !127.0.0.1!."

if someone could fork this tool to work with proxychains he will be a legend screenshot from 2018-04-16 06-18-43

nader119376 avatar Apr 16 '18 05:04 nader119376