debug SMTP commands sent/received to/from the submission service
Dear Colleagues,
I'm trying to debug SMTP commands clients send to the submission service.
I've tried
protocol submission { rawlog_dir = /var/tmp/dovecot }
but /var/tmp/dovecot remains empty. What am I missing? I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
Can you please point me to the right direction to log all SMTP commands? All is happening on Debian/buster, Dovecot 2.3.4.1.
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
On 09/04/2021 10:13 Victor Sudakov vas@sibptus.ru wrote:
Dear Colleagues,
I'm trying to debug SMTP commands clients send to the submission service.
I've tried
protocol submission { rawlog_dir = /var/tmp/dovecot }
but /var/tmp/dovecot remains empty. What am I missing? I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
Can you please point me to the right direction to log all SMTP commands? All is happening on Debian/buster, Dovecot 2.3.4.1.
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
On 09/04/2021 10:13 Victor Sudakov vas@sibptus.ru wrote:
Dear Colleagues,
I'm trying to debug SMTP commands clients send to the submission service.
I've tried
protocol submission { rawlog_dir = /var/tmp/dovecot }
but /var/tmp/dovecot remains empty. What am I missing? I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
Can you please point me to the right direction to log all SMTP commands? All is happening on Debian/buster, Dovecot 2.3.4.1.
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
Sorry for sending empty mail first...
I would recommend using
rawlog_dir = /var/tmp/dovecot/%u
and then ensuring that the directory, which expands to the username, *exists* and is *writable* to your mail user. Dovecot will not attempt to create this directory.
Aki
Aki Tuomi wrote:
I'm trying to debug SMTP commands clients send to the submission service.
I've tried
protocol submission { rawlog_dir = /var/tmp/dovecot }
but /var/tmp/dovecot remains empty. What am I missing? I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
Can you please point me to the right direction to log all SMTP commands? All is happening on Debian/buster, Dovecot 2.3.4.1.
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
Sorry for sending empty mail first...
I would recommend using
rawlog_dir = /var/tmp/dovecot/%u
and then ensuring that the directory, which expands to the username, *exists* and is *writable* to your mail user. Dovecot will not attempt to create this directory.
Well, I did not use the "%u" macro as I would be happy to have all raw logs in one directory, but the directory /var/tmp/dovecot/ does exist and is chmod 777, and I did "systemctl reload dovecot" after changing the config, still there is nothing there.
Any more ideas?
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
On 09/04/2021 15.13, Victor Sudakov wrote:
I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
You might get some useful information connecting with openssl s_client
Here's a page googled at random. https://halon.io/blog/how-to-test-smtp-servers-using-the-command-line/
And man page. https://linux.die.net/man/1/s_client
P
Plutocrat wrote:
On 09/04/2021 15.13, Victor Sudakov wrote:
I'd use Wireshark but the communication between SMTP clients and Dovecot is encrypted after STARTTLS, so Wireshark is pretty useless here.
You might get some useful information connecting with openssl s_client
Here's a page googled at random. https://halon.io/blog/how-to-test-smtp-servers-using-the-command-line/
Maybe I had phrased my question incorrectly, but I am interested in snooping the exchange between Dovecot and an SMTP client (PHP Mailer in my case), not in manual sending of SMTP commands.
-- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet
participants (3)
-
Aki Tuomi
-
Plutocrat
-
Victor Sudakov