My smtpd.conf configuration listens on multiple interfaces, ports, and a
socket:

    listen on socket filter dkimsign

    listen on lo filter dkimsign

    listen on ens192 port smtp \
        ...

    listen on ens192 port submissions \
        ...

Unfortunately log entries do not provide any indication of what an inbound SMTP
session connected _to_, only where it came _from_:

    2024-10-10T06:06:18.420359+00:00 d smtpd[2788672]: a69da1d474653ee1
        smtp connected
        address=2.35.149.223      <----- remote
        host=net-2-35-149-223.cust.vodafonedsl.it

In this particular instance I was surprised by an authentication failure. Not
the usual "AUTH LOGIN ... Command not supported" but by a "AUTH PLAIN ...
Authentication failed". After a short panic that my config was insecure I
worked out it must have come in on the submissions port. It would have been
obvious if the port and/or interface was included in the log output.

So my simple request is for two additional keys to be added to the "smtp 
connected"
output:
interface="/run/smtpd.sock|lo|ens192|eth0|..."
    port="<blank>|25|465|587|...."

I suspect that interface names may not be (easily) known at smtp connection
time, so perhaps it would more likely have to be the local address:

    interface="socket|127.0.0.1|212.215.X.Y|2001:db8::aef1|..."
    port="<blank>|25|465|587|...."

One might also consider combining the two, although I find the contortions for
IPv6 a bit ugly.

    to="212.215.X.Y:25"

    to="[fe80::250:56ff:fe3c:]:587"

Thanks for considering.
--
Mark Lawrence

Reply via email to