• =?UTF-8?Q?[Sendmail]_Apparition_de_l'authentification_sur_127.0.0.1?= =

    From =?UTF-8?Q?BERTRAND_Jo=c3=abl?=@21:1/5 to All on Mon Jul 22 11:30:02 2024
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --etso4bQnF5lgZo0I7Np5ElMnukg82u4Pp
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    Bonjour à tous,

    J'ai un petit souci avec une grosse configuration sendmail (merci de ne pas commencer par me dire qu'il faut passer à autre chose).

    Cette configuration fonctionne correctement depuis des années avec toutes les grouilles nécessaires (dmarc, dkim, clamav, spamassassin, greylist...) et traite plusieurs dizaines de mails par jours.

    Ce serveur demande une authentification sur le port submission depuis les IP externes, et ne demandait pas d'authentification sur les deux
    interfaces loopback (v4 et v6).

    Depuis une mise à jour récente (mais je n'arrive pas à trouver laquelle), une authentification est arrivée sur le loopback, ce qui
    empêche par exemple root de recevoir les messages d'alerte des
    différents daemons (dont smartctl, je me suis aperçu du truc après un plantage disque de week-end).

    Root rayleigh:[/etc/mail] > sendmail -v root@localhost
    test
    root@localhost... Connecting to [127.0.0.1] port 587 via relay...
    220 rayleigh.systella.fr ESMTP Sendmail 8.18.1/8.18.1/Debian-5; Mon, 22
    Jul 2024 11:12:21 +0200; (No UCE/UBE) logging access from: localhost(OK)-smmsp@localhost [127.0.0.1]
    EHLO rayleigh.systella.fr
    250-rayleigh.systella.fr Hello smmsp@localhost [127.0.0.1], pleased to
    meet you
    250-ENHANCEDSTATUSCODES
    250-PIPELINING
    250-EXPN
    250-VERB
    250-8BITMIME
    250-SIZE
    250-DSN
    250-STARTTLS
    250-DELIVERBY
    250 HELP
    VERB
    250 2.0.0 Verbose mode
    STARTTLS
    220 2.0.0 Ready to start TLS
    EHLO rayleigh.systella.fr
    250-rayleigh.systella.fr Hello smmsp@localhost [127.0.0.1], pleased to
    meet you
    250-ENHANCEDSTATUSCODES
    250-PIPELINING
    250-EXPN
    250-VERB
    250-8BITMIME
    250-SIZE
    250-DSN
    250-DELIVERBY
    250 HELP
    VERB
    250 2.0.0 Verbose mode
    MAIL From:<[email protected]> SIZE=5
    530 5.7.0 Authentication required
    bertrand... Using cached ESMTP connection to [127.0.0.1] via relay...
    RSET
    250 2.0.0 Reset state
    MAIL From:<> SIZE=1029
    530 5.7.0 Authentication required
    postmaster... Using cached ESMTP connection to [127.0.0.1] via relay...
    RSET
    250 2.0.0 Reset state
    MAIL From:<> SIZE=2053
    530 5.7.0 Authentication required
    Closing connection to [127.0.0.1]
    QUIT
    221 2.0.0 rayleigh.systella.fr closing connection
    Root rayleigh:[/etc/mail] >

    Je précise que rien n'a changé dans cette configuration (j'ai même ressorti une archive de l'an passé pour être sûr). Dans access, j'ai bien :

    Root rayleigh:[/etc/mail] > cat access
    GreetPause:192.168 0
    # Pas d'authentification pour 127.0.0.1
    SRV_Features:127.0.0.1 A

    mais qui semble être ignoré.

    Mon sendmail.mc ne semble rien contenir de particulier :

    divert(0)dnl
    define(`_USE_ETC_MAIL_')dnl define(`CERT_DIR',`/etc/letsencrypt/live/systella.fr')dnl define(`confTLS_FALLBACK_TO_CLEAR', `true')dnl include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
    VERSIONID(`$Id: sendmail.mc, v 8.12.3-6.6 2003-09-17 22:44:06 cowboy Exp $') OSTYPE(`debian')dnl
    DOMAIN(`debian-mta')dnl
    FEATURE(`masquerade_envelope')dnl
    MASQUERADE_AS(`systella.fr')dnl
    FEATURE(`use_cw_file')dnl
    FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomains')dnl FEATURE(`access_db',`hash -o -T<TMPF> /etc/mail/access')dnl FEATURE(`use_ct_file')dnl
    FEATURE(`smrsh')dnl
    FEATURE(`mailertable')dnl
    FEATURE(`greet_pause',1000)dnl
    FEATURE(`local_procmail')dnl

    LOCAL_CONFIG
    include(`/etc/mail/sasl/sasl.m4')dnl
    include(`/etc/mail/tls/starttls.m4')dnl include(`/etc/mail/milter-greylist.m4')dnl
    INPUT_MAIL_FILTER(`spamassassin',
    `S=local:/var/run/spamass/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav/clamav-milter.ctl,
    F=, T=S:4m;R:4m')dnl
    INPUT_MAIL_FILTER(`opendkim', `S=inet:8892@localhost')dnl INPUT_MAIL_FILTER(`pyspffilter', `S=local:/var/run/spf-milter-python/spfmiltersock')dnl INPUT_MAIL_FILTER(`opendmarc', `S=local:/run/opendmarc/opendmarc.sock')dnl define(`confINPUT_MAIL_FILTERS', `pyspffilter,opendkim,opendmarc,greylist,spamassassin,clamav')dnl define(`STATUS_FILE', `/var/lib/sendmail/sendmail.st')dnl
    define(`STATUS_FILE', `/var/lib/sendmail/sm-client.st')dnl

    FEATURE(`no_default_msa', `dnl')dnl
    DAEMON_OPTIONS(`Port=smtp, Name=MTA, Family=inet')dnl DAEMON_OPTIONS(`Port=smtp, Name=MTAv6, Family=inet6')dnl DAEMON_OPTIONS(`Port=submission, M=Ea, Name=MSA, Family=inet')dnl DAEMON_OPTIONS(`Port=submission, M=Ea, Name=MSA, Family=inet6')dnl

    MAILER_DEFINITIONS
    MAILER(local)dnl
    MAILER(smtp)dnl

    Si quelqu'un avait un début d'explication...

    Bien cordialement,

    JB





    --etso4bQnF5lgZo0I7Np5ElMnukg82u4Pp--

    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQQj8MW8iOsC2RXEznnFW/s/mMLXCAUCZp4koQAKCRDFW/s/mMLX CItOAP99HQqAg5lKnBWYQP6z+0Mt5appB69XSmVvEZvM81gt0wD+PdBAMLoduUO9 PJJbvwLiktHZxa7KAWQu15jJEaqqsgk=
    =g6pS
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?BERTRAND_Jo=c3=abl?=@21:1/5 to All on Mon Jul 22 14:10:02 2024
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --yOshnxBE4w1aUB3FeU5W951j65OfTXfZe
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    Je me réponds à moi-même.

    J'ai trouvé au fin fond du bouquin O'Reilly (Sendmail, 4th edition) une
    solution :

    GreetPause:192.168 0
    # Pas d'authentification pour 127.0.0.1
    Srv_Features:127.0.0.1 ALS

    Je demande donc à sendmail de ne pas proposer AUTH (A), de ne pas nécessiter une authentification (L) et de ne pas proposer STARTTLS AUTH.
    A était suffisant jusqu'à récemment, il faut maintenant ALS (AL n'est
    pas suffisant).

    Je ne pense pas que le responsable soit sendmail, mais le client qui essaie de s'authentifier dès qu'il voit STARTTLS ou AUTH.

    Désolé pour le bruit,

    JB


    --yOshnxBE4w1aUB3FeU5W951j65OfTXfZe--

    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQQj8MW8iOsC2RXEznnFW/s/mMLXCAUCZp5LYwAKCRDFW/s/mMLX CH7TAP93UFsjMXJcYqtit5p7dI2t7n0s5xUTy4B0/fQmduCHwgEA+cLeD4CfZ/ZZ /YQCw3aGxF/ryx6Mu6Br9nDgueag+gI=
    =OBDQ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)