proxychains-ng
proxychains-ng copied to clipboard
socksfying mail servers Sendmail/Postfix
Hello, did anybody successfully socksfy either sendmail or postfix ?
how would you proxify an incoming connection ? in general, only outgoing connections can be proxified.
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
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.
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.
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].
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