Chris Green wrote:
> I am trying to debug it by connecting directly to port 25 on localhost
> using telnet and composing mail that way.
I highly recommend "swaks" the Swiss Army Knife SMTP, the all-purpose
SMTP transaction tester utility program for generating test emails
using SMTP transactions. For example:
swaks --to [email protected] --server test-server.example.net
Here is an example run here to show how it operates. To demonstrate
how easy it makes manual "telnet port 25 debugging".
rwp@havoc:~$ swaks --to [email protected] --from [email protected] --server
localhost
=== Trying localhost:25...
=== Connected to localhost.
<- 220 havoc.proulx.com ESMTP Postfix (Debian/GNU)
-> EHLO havoc.proulx.com
<- 250-havoc.proulx.com
<- 250-PIPELINING
<- 250-SIZE 104857600
<- 250-ETRN
<- 250-STARTTLS
<- 250-ENHANCEDSTATUSCODES
<- 250-8BITMIME
<- 250-SMTPUTF8
<- 250 CHUNKING
-> MAIL FROM:<[email protected]>
<- 250 2.1.0 Ok
-> RCPT TO:<[email protected]>
<- 250 2.1.5 Ok
-> DATA
<- 354 End data with <CR><LF>.<CR><LF>
-> Date: Sun, 16 May 2021 13:48:10 -0600
-> To: [email protected]
-> From: [email protected]
-> Subject: test Sun, 16 May 2021 13:48:10 -0600
-> Message-Id: <[email protected]>
-> X-Mailer: swaks v20181104.0 jetmore.org/john/code/swaks/
->
-> This is a test mailing
->
->
-> .
<- 250 2.0.0 Ok: queued as EB48316A
-> QUIT
<- 221 2.0.0 Bye
=== Connection closed with remote host.
It reported the queue id in the transaction log. Let's look for it.
(I am going to redact just one little string pattern to avoid more
noise to my logs from abusers scraping and trying. But I don't think
it detracts from the otherwise real example use of it.)
rwp@havoc:~$ grep EB48316A /var/log/mail.log
May 16 13:48:10 havoc postfix/smtpd[13034]: EB48316A:
client=localhost[127.0.0.1]
May 16 13:48:10 havoc postfix/cleanup[13037]: EB48316A:
message-id=<[email protected]>
May 16 13:48:11 havoc postfix/qmgr[28771]: EB48316A:
from=<[email protected]>, size=478, nrcpt=1 (queue active)
May 16 13:48:11 havoc postfix/local[26122]: EB48316A:
to=<[[redacted]].proulx.com>, orig_to=<[email protected]>, relay=local,
delay=0.26, delays=0.16/0/0/0.1, dsn=2.0.0, status=sent (delivered to command:
IFS=' ';exec /usr/bin/procmail || exit 75 #rwp)
May 16 13:48:11 havoc postfix/qmgr[28771]: EB48316A: removed
In the above, and in your logs, the "status=sent" follows the tracing
trail of where the message went. It did not disappear. It was
delivered. And in your log your messages were the same. Those
messages were relayed as described by Bill in his response. I just
wanted to say that swaks is much easier and less error prone for
injecting test message probes than typing the protocol transaction in
manually from the keyboard.
Bob