• startup messages puzzling

    From hput@21:1/5 to All on Sun Mar 26 19:43:48 2023
    sendmail version:

    Version 8.15.2
    Compiled with: DNSMAP IPV6_FULL LDAPMAP LDAP_REFERRALS LOG MAP_REGEX
    MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
    NETUNIX NEWDB PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
    TCPWRAPPERS USERDB USE_LDAP_INIT XDEBUG
    ------- ------- ---=--- ------- -------

    Just installed sendmail from ubuntu apt repo
    when I ask the status of the freshly started emacs I see.

    I'm sorry to through so much data out there but I hope someone is
    willing to go through some of it. As must be obviouse I'm in dire
    need of some coaching pointers URLS etc.
    ------- ------- ---=--- ------- -------

    systemctl status sendmail.service

    root # systemctl status sendmail.service
    ● sendmail.service - LSB: powerful, efficient, and scalable Mail Transport Agent
    Loaded: loaded (/etc/init.d/sendmail; generated)
    Active: active (exited) since Sun 2023-03-26 17:51:57 UTC; 1h 20min ago
    Docs: man:systemd-sysv-generator(8)
    CPU: 204ms

    Mar 26 17:52:19 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket
    Mar 26 17:52:25 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    Mar 26 17:52:25 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket
    Mar 26 17:52:30 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    Mar 26 17:52:30 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket
    Mar 26 17:52:35 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    Mar 26 17:52:35 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket
    Mar 26 17:52:40 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    Mar 26 17:52:40 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket
    Mar 26 17:52:40 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: server SMTP socket wedged: exiting

    all seems to be pointing to something pretty badly wrong with submit.cf

    I've included the current submit.mc and sendmail.mc.

    m4'ing was done after conclusion of editing

    ------- ------- ---=--- ------- -------

    I mainly used these pages to try to get started

    https://netcorecloud.com/tutorials/install-sendmail-server-centos-7/ https://mailoutgoing.com/support/mailrelay/sendmail.html https://www.oreilly.com/library/view/linux-network-administrators/1565924002/ch18s08.html

    I didn't find much in those about editing submit.mc but took a few
    tips seen in the submit.mc below startup messages.

    ------- ------- ---=--- ------- -------
    submit.mc
    ------- ------- ---=--- ------- -------

    divert(-1)dnl #----------------------------------------------------------------------------- # $Sendmail: submit.mc,v 8.15.2 2021-12-09 00:18:01 cowboy Exp $
    #
    # Copyright (c) 2000-2010 Richard Nelson. All Rights Reserved.
    #
    # cf/debian/submit.mc. Generated from submit.mc.in by configure.
    #
    # submit.mc prototype config file for building Sendmail 8.15.2
    #
    # Note: the .in file supports 8.15.0 - 9.0.0, but the generated
    # file is customized to the version noted above.
    #
    # This file is used to configure Sendmail for use with Debian systems.
    #
    # If you modify this file, you will have to regenerate /etc/mail/submit.cf
    # by running this file through the m4 preprocessor via one of the following:
    # * make (or make -C /etc/mail)
    # * sendmailconfig
    # * m4 /etc/mail/submit.mc > /etc/mail/submit.cf
    # The first two options are preferred as they will also update other files
    # that depend upon the contents of this file.
    #
    # The best documentation for this .mc file is:
    # /usr/share/doc/sendmail-doc/cf.README.gz
    # #----------------------------------------------------------------------------- divert(0)dnl
    #
    # Copyright (c) 2000-2002 Richard Nelson. All Rights Reserved.
    #
    # This file is used to configure Sendmail for use with Debian systems.
    #
    define(`_USE_ETC_MAIL_')dnl
    include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
    VERSIONID(`$Id: submit.mc, v 8.15.2-22ubuntu3 2021-12-09 00:18:01 cowboy Exp $')
    OSTYPE(`debian')dnl
    DOMAIN(`debian-msp')dnl
    dnl #
    dnl #---------------------------------------------------------------------
    dnl # Masquerading information, if needed, should go here
    dnl # You likely will not need this, as the MTA will do it
    dnl #---------------------------------------------------------------------
    dnl MASQUERADE_AS()dnl
    dnl FEATURE(`masquerade_envelope')dnl
    dnl #
    dnl #---------------------------------------------------------------------
    dnl # The real reason we're here: the FEATURE(msp)
    dnl # NOTE WELL: MSA (587) should have M=Ea, so we need to use stock 25
    dnl #--------------------------------------------------------------------- FEATURE(`msp', `[127.0.0.1]', `25')dnl
    dnl #
    dnl #---------------------------------------------------------------------
    dnl # Some minor cleanup from FEATURE(msp)
    dnl #---------------------------------------------------------------------
    dnl #
    dnl #---------------------------------------------------------------------

    ------- ------- ---=--- ------- -------
    sendmail.mc
    ------- ------- ---=--- ------- -------
    divert(-1)dnl #----------------------------------------------------------------------------- # $Sendmail: debproto.mc,v 8.15.2 2021-12-09 00:18:01 cowboy Exp $
    #
    # Copyright (c) 1998-2010 Richard Nelson. All Rights Reserved.
    #
    # cf/debian/sendmail.mc. Generated from sendmail.mc.in by configure.
    #
    # sendmail.mc prototype config file for building Sendmail 8.15.2
    #
    # Note: the .in file supports 8.15.0 - 9.0.0, but the generated
    # file is customized to the version noted above.
    #
    # This file is used to configure Sendmail for use with Debian systems.
    #
    # If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
    # by running this file through the m4 preprocessor via one of the following:
    # * make (or make -C /etc/mail)
    # * sendmailconfi
    # * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
    # The first two options are preferred as they will also update other files
    # that depend upon the contents of this file.
    #
    # The best documentation for this .mc file is:
    # /usr/share/doc/sendmail-doc/cf.README.gz
    # #----------------------------------------------------------------------------- divert(0)dnl
    #
    # Copyright (c) 1998-2005 Richard Nelson. All Rights Reserved.
    #
    # This file is used to configure Sendmail for use with Debian systems.
    #
    define(`_USE_ETC_MAIL_')dnl
    include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
    VERSIONID(`$Id: sendmail.mc, v 8.15.2-22ubuntu3 2021-12-09 00:18:01 cowboy Exp $')
    OSTYPE(`debian')dnl
    DOMAIN(`debian-mta')dnl
    dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
    dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
    dnl #
    dnl # General defines
    dnl #
    dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
    dnl # into this directory before writing files.
    dnl # If *all* your user accounts are under /home then use that
    dnl # instead - it will prevent any writes outside of /home !
    dnl # define(`confSAFE_FILE_ENV', `')dnl
    dnl #
    dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
    dnl # Remove `, Addr=' clauses to receive from any interface
    dnl # If you want to support IPv6, switch the commented/uncommentd lines
    dnl #
    dnl ## ADDED by HP dnl
    dnl ## HP from https://netcorecloud.com/tutorials/install-sendmail-server-centos-7/ dnl
    define(`SMART_HOST', `smtp.fastmail.com')dnl
    define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
    define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
    dnl hp end ADDED dnl
    TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
    dnl hp Ditched the FEATURE authinfo .. although recommended at:dnl
    dnl hp using access instead as recommended as working with any version sendmail dln
    dnl hp see https://mailoutgoing.com/support/mailrelay/sendmail.html dnl
    dnl hp FEATURE(`authinfo', `hash /etc/mail/auth/client-info.db')dnl FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl

    DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
    DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea, Addr=127.0.0.1')dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl

    dnl hp FEATURE(`no_default_msa')dnl
    dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
    dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
    dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
    dnl #

    dnl # Be somewhat anal in what we allow
    define(`confPRIVACY_FLAGS',dnl `needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
    dnl #
    dnl # Define connection throttling and window length define(`confCONNECTION_RATE_THROTTLE', `15')dnl define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
    dnl #
    dnl # Features
    dnl #
    dnl # use /etc/mail/local-host-names
    FEATURE(`use_cw_file')dnl
    dnl #
    dnl # The access db is the basis for most of sendmail's checking
    dnl FEATURE(`access_db', , `skip')dnl
    dnl #
    dnl # The greet_pause feature stops some automail bots - but check the
    dnl # provided access db for details on excluding localhosts... FEATURE(`greet_pause', `1000')dnl 1 seconds
    dnl #
    dnl # Delay_checks allows sender<->recipient checking
    FEATURE(`delay_checks', `friend', `n')dnl
    dnl #
    dnl # If we get too many bad recipients, slow things down... define(`confBAD_RCPT_THROTTLE',`3')dnl
    dnl #
    dnl # Stop connections that overflow our concurrent and time connection rates FEATURE(`conncontrol', `nodelay', `terminate')dnl
    FEATURE(`ratecontrol', `nodelay', `terminate')dnl
    dnl #
    dnl # If you're on a dialup link, you should enable this - so sendmail
    dnl # will not bring up the link (it will queue mail for later)
    dnl define(`confCON_EXPENSIVE',`True')dnl
    dnl #
    dnl # Dialup/LAN connection overrides
    dnl #
    include(`/etc/mail/m4/dialup.m4')dnl
    include(`/etc/mail/m4/provider.m4')dnl
    dnl #
    dnl # Default Mailer setup
    MAILER_DEFINITIONS
    MAILER(`smtp')dnl
    MAILER(`procmail')dnl

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to hput on Sun Mar 26 15:49:21 2023
    On 3/26/23 1:43 PM, hput wrote:
    Just installed sendmail from ubuntu apt repo
    when I ask the status of the freshly started emacs I see.

    `emacs` or `sendmail`?

    I'm sorry to through so much data out there but I hope someone is
    willing to go through some of it. As must be obviouse I'm in dire
    need of some coaching pointers URLS etc.

    Well, the reason is written on the tin. But you need some familiarity
    with Sendmail to understand what the tin is saying.

    Mar 26 17:52:19 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket Mar 26 17:52:25 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    The MSA daemon(_port) can't bind to the address (that it's configured to
    use) because the "Address (and port are) already in use".

    /From/ /a/ /quick/ /glance/ at your submit.mc and sendmail.mc files, it
    looks like both of them are trying to bind to port 25 on 127.0.0.1.
    That's a conflict and won't work. ;-)



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Grant Taylor on Sun Mar 26 15:50:05 2023
    On 3/26/23 3:49 PM, Grant Taylor wrote:
    /From/ /a/ /quick/ /glance/

    N.B. the emphasis is on me not spending much time and possibly ~> likely overlooking something else.

    This is all about me, nothing about you.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Mon Mar 27 09:57:19 2023
    Am 26.03.2023 um 19:43:48 Uhr schrieb hput:

    DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea, Addr=127.0.0.1')dnl
    dnl hp FEATURE(`no_default_msa')dnl

    I am not an expert, but according to the documentation, the default is
    that SM listens to 25 and 587 (submission).

    https://www.oreilly.com/library/view/sendmail-4th-edition/9780596510299/ch17s08s35.html

    FEATURE(`no_default_msa') disables listening on 587.

    If you have DAEMON_OPTIONS(`Port=submission,...) enabled, this might be
    a conflict, so try to enable FEATURE(`no_default_msa') or disable DAEMON_OPTIONS(`Port=submission by adding dnl at the beginning (m4
    Syntax).

    Then service sendmail restart (this creates the cf file in Ubuntu and
    Debian).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to hput on Mon Mar 27 10:33:48 2023
    On 3/26/23 21:43, hput wrote:
    Just installed sendmail from ubuntu apt repo

    Mar 26 17:52:19 uw sm-mta[199282]: daemon MSA: problem creating SMTP socket Mar 26 17:52:25 uw sm-mta[199282]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MSA: cannot bind: Address already in use

    Is this the only MTA that you are running?
    Could be postfix, msmtp, msmtp-mta already is installed and running and
    those already bound the port.

    You can try with "telnet 127.0.0.1 25" and look at the output to guess
    or using "lsof -i", "netstat -lnp" or "ss -ap" to determine what is
    already bound to port 25.

    --
    //Aho

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harry Putnam@21:1/5 to Grant Taylor on Tue Mar 28 17:44:35 2023
    Grant Taylor <gtaylor@tnetconsulting.net> writes:


    [...]

    /From/ /a/ /quick/ /glance/ at your submit.mc and sendmail.mc files,
    it looks like both of them are trying to bind to port 25 on
    127.0.0.1. That's a conflict and won't work. ;-)

    Yes I see your point. It does look wrong.

    Marco Moock <mo01@posteo.de> writes:

    [...]

    Thanks for input... see comment a the end

    "J.O. Aho" <user@example.net> writes:

    [...]

    Is this the only MTA that you are running?
    Could be postfix, msmtp, msmtp-mta already is installed and running
    and those already bound the port.
    Yes, its the only one

    You can try with "telnet 127.0.0.1 25" and look at the output to guess
    or using "lsof -i", "netstat -lnp" or "ss -ap" to determine what is
    already bound to port 25.

    thanks.

    All posters; thanks for taking the time to help and for giving helpful
    input.

    I'm going to retrench a bit and try installing sendmail from source
    version 8.17.1.26 ... Hopefully I will learn enough in that process
    from the lengthy documentation (whatever I am able to understand of it
    that is), to be a little more confident about what I'm doing.

    I'd like to install the executables in a trial place.... I know there
    is a way to tell `configure' or `make' about a --prefix=some/trial/dir.

    Can anyone say how that is done using sendmails `./Build' command?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Harry Putnam on Tue Mar 28 17:38:45 2023
    On 3/28/23 3:44 PM, Harry Putnam wrote:
    Yes I see your point. It does look wrong.

    ;-)

    All posters; thanks for taking the time to help and for giving helpful
    input.

    :-)

    I'm going to retrench a bit and try installing sendmail from source
    version 8.17.1.26 ... Hopefully I will learn enough in that process
    from the lengthy documentation (whatever I am able to understand of
    it that is), to be a little more confident about what I'm doing.

    I *HIGHLY* recommend the README and cf/README files (namess from
    memory). At least skim them so you have a vague idea of some things
    you'll recognize when you run into them again. You might even want to
    skim them twice, once to have an idea where something was and again to
    skim ~ read for content while referencing things you now have an idea
    where they are.

    I also strongly recommend the Sendmail Installation and Operations Guide
    at some point.

    Those few files should get you started with a simple serviceable
    configuration.

    Also, please feel free to ask questions. You can also email me directly
    if you don't want to discuss things in public.

    I'd like to install the executables in a trial place.... I know there
    is a way to tell `configure' or `make' about a --prefix=some/trial/dir.

    Can anyone say how that is done using sendmails `./Build' command?

    I think that's covered in the README file in the root of the (extracted)
    source code directory.



    --
    Grant. . . .
    unix || die

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