Previously I asked Who (which process) is calling curl?
and I got very good answers (this answer in particular)
which basically replaces the curl binary with a shell script that logs each call to curl and then calles renamed curl and passes the parameters along.
Now I am again in a similar situation, I know someone is using smtp, but I don't know which process it is? I know that I use it in a cron job but I (by the alerts I receive from my firewall) some other times smtp tries to connect to the internet (google smtp servers if I am not mistaken).
How can I find out who/which process is using smtp?