apache JAMES Remote Admin 2.3.2 exploit (CVE-2015-5205)
nmap
Nmap revealed JAMES Remote Admin 2.3.2.
searchsploit
Using searchsploit I found https://www.exploit-db.com/exploits/50347 exploit and before executing I updated port values.
I then executed and once a user logged in I got a reverse shell.
How apache JAMES Remote Admin 2.3.2 exploit works
The classic remote code execution (RCE) exploit for Apache James 2.3.2 (CVE-2015-5205) abuses a directory traversal vulnerability to write an email containing your payload directly into a global system directory, usually /etc/bash_completion.d/.
Then when a user logs in or simply opens an interactive bash shell, scripts under /etc/bash_completion.d/ get executed.