Fwd: Fwd: folders and subfolders

Stephane Magnier steph.mag220 at netcourrier.com
Tue Jul 20 10:25:44 EEST 2021


Hi,

Do you agree that if I 'm listening on opened ports, I should see twice 
the port 24 ?

I stopped the  sendmail service  .. I start Dovecot :nmap give me this

*/var/log/dovecot-info.log*

Jul 20 08:47:50 master: Info: Dovecot v2.3.8 (9df20d2db) *starting up 
for imap, pop3, lmtp*

and nmap

PORT      STATE SERVICE
22/tcp    open  ssh
*24/tcp    open  priv-mail*
110/tcp   open  pop3
111/tcp   open  rpcbind
631/tcp   open  ipp
783/tcp   open  spamassassin
993/tcp   open  imaps
995/tcp   open  pop3s
10000/tcp open  snet-sensor-mgmt
=> I can see the port 24 running

now, closing dovecot service and starting sendmail

PORT      STATE SERVICE
22/tcp    open  ssh
25/tcp    open  smtp
111/tcp   open  rpcbind
465/tcp   open  smtps
587/tcp   open  submission
631/tcp   open  ipp
783/tcp   open  spamassassin
900/tcp   open  omginitialrefs
10000/tcp open  snet-sensor-mgmt

So, this is no port 24 opened -> this is sendmail, which is not working 
as lmtp port. I can alos recognize all the opened ports.. this is any 
lmtp server running

Do you agree ?  if not, how can I trace the lmtp port ?
The log file for Sendmail, doesn't say anything at all
When an email is coming.. I cannot see anywhere something linked ot 
lmtp..  absolutely non existant


================

Sendmail CF is

    divert(-1)dnl
    include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
    VERSIONID(`setup for linux')dnl
    OSTYPE(`linux')dnl
    dnl ##
    define(`confPRIVACY_FLAGS',`authwarnings,novrfy,noexpn,restrictqrun,needmailhelo,needvrfyhelo,restrictqrun')dnl

    LOCAL_DOMAIN(`mbox1.xxxx.net')dnl
    # DeliveryMode=queueonly
    define(`confDELIVERY_MODE',`background')dnl
    dnl ###################################"""""""""# dnl
    dnl ###### spamass-milter #####
    MAIL_FILTER(`spamassassin',`S=local:/run/spamass-milter/spamass-milter.sock,
    F=, T=C:15m;S:4m;R:4m;E:10m')dnl
    define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name},
    {if_name}, {if_addr}')dnl
    dnl ######
    dnl ################  security #####
    define(`confCT_FILE', `/etc/mail/trusted.list')dnl
    define(`confMAX_MESSAGE_SIZE',24000000)
    define(`confSAFE_QUEUE',`true')dnl
    dnl ############  connection SPAM ###########
    define(`confDOUBLE_BOUNCE_ADDRESS',`it at xxx.com')
    dnl ###### DNSBL####
    FEATURE(`dnsbl',`dnsbl.office.itx')dnl
    dnl # FEATURE(`dnsbl',`sbl.spamhaus.org')dnl
    dnl # FEATURE(`dnsbl',`rbl.metunet.com ',`"Email suspected to be a
    spam with the IP address: "$&{client_addr} " - contact us via
    another way if you are not a SPAM"')dnl
    dnl ######
    dnl  ######### min connection Regulate flow #########
    define(`confMAX_DAEMON_CHILDREN',312)
    define(`confMAX_QUEUE_CHILDREN',120)dnl
    define(`confMAX_RUNNERS_PER_QUEUE',5)dnl
    define(`confMAX_QUEUE_RUN_SIZE',200)dnl
    dnl ############################# dnl
    FEATURE(`delay_checks')dnl
    FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
    FEATURE(`ratecontrol',`nodelay',`terminate',`conncontrol')dnl
    define(`confCONNECTION_RATE_THROTTLE',30)dnl
    dnl # define(`confCONNECTION_RATE_WINDOW_SIZE',90s)dnl
    define(`confMAXRCPTSPERMESSAGE', `15')dnl
    define(`confBAD_RCPT_THROTTLE',12)dnl
    define(`confTRY_NULL_MX_LIST', `True')dnl
    define(`confCW_FILE',`/etc/mail/local-host-names')dnl
    define(`confNO_RCPT_ACTION',`add-to-undisclosed')dnl
    define(`confRRT_IMPLIES_DSN')dnl
    dnl ##
    dnl ### milter-limit
    define(`confMILTER_MACROS_EOM', `{msg_id}')dnl
    dnl ##
    dnl ######################dnl
    dnl ################  Def RELAY
    dnl # FEATURE(`relay_hosts_only')dnl
    define(`SMTP_MAILER_FLAGS',`l8')dnl
    define(`ESMTP_MAILER_FLAGS',`l8')dnl
    define(`SMART_HOST',`sas.intranet.office.itx')
    define(`RELAY_MAILER',`RELAY')dnl
    dnl #####
    define(`confSMTP_LOGIN_MSG',`mbox1.xxxx.net - $b')
    define(`confQUEUE_SORT_ORDER',`Time')dnl
    define(`confDEF_USER_ID', ``8:12'')dnl
    dnl define(`confAUTO_REBUILD')dnl
    dnl #define(`confTO_CONNECT',0)dnl
    define(`confTRY_NULL_MX_LIST', `True')dnl
    define(`confDONT_PROBE_INTERFACES', `True')dnl
    define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
    define(`ALIAS_FILE', `/etc/aliases')dnl
    define(`STATUS_FILE', `/var/log/mail/statistics')dnl
    define(`UUCP_MAILER_MAX', `2000000')dnl
    define(`confTIME_ZONE',`CEST')dnl
    define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
    define(`confQUEUE_SORT_ORDER',priority)dnl
    define(`confTO_QUEUERETURN',`2h')
    define(`confTO_QUEUEWARN',`10m')
    dnl ####### 03/11/20
    define(`confWORK_RECIPIENT_FACTOR', `1000')dnl
    define(`confWORK_TIME_FACTOR',6000)dnl
    define(`confTO_HOSTSTATUS',`15m')dnl
    dnl # define(`confTO_DATAINIT', `6m')dnl
    dnl # define(`confTO_DATABLOCK', `35m')dnl
    dnl # define(`confTO_DATAFINAL', `35m')dnl
    dnl #### Max load average for sending dnl
    dnl # ax load average for receiving dnl
    define(`confQUEUE_LA',30)
    define(`confREFUSE_LA',156)dnl
    define(`confDELAY_LA',3)dnl
    dnl # define(`confTO_IDENT',0)
    dnl #########  Direct go everywhere
    dnl # FEATURE(`accept_unresolvable_domains')dnl
    dnl # FEATURE(`accept_unqualified_senders')dnl
    define(`confDIRECT_SUBMISSION_MODIFIERS', `C')dnl
    dnl #
    define(`confBIND_OPTS', `-DNSRCH -DEFNAMES +WorkAroundBrokenAAAA')dnl
    dnl ##############################
    dnl # If you're operating in a DSCP/RFC-4594 environment with QoSdnl
    define(`confINET_QOS',`AF33')dnl
    dnl ### ne souhaite pas necessairement le cryptage
    dnl # define(`confTLS_SRV_OPTIONS', `V')dnl
    FEATURE(delay_checks)dnl
    FEATURE(`no_default_msa', `dnl')dnl
    FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
    FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
    FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
    FEATURE(redirect)dnl
    FEATURE(domaintable)dnl
    FEATURE(always_add_domain)dnl
    FEATURE(use_cw_file)dnl
    FEATURE(use_ct_file)dnl
    FEATURE(`nocanonify',`canonify_hosts')dnl
    dnl #FEATURE(`blacklist_recipients')dnl
    dnl #
    dnl #### sasl ####
    define(`confAUTH_OPTIONS',`A,')
    TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
    define(`confAUTH_MECHANISMS', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
    dnl #
    dnl
    ###########################################################################dnl
    dnl
    ###########################################################################dnl
    dnl ######################   SSL/ STARTTLS ####################dnl
    define(`confCACERT_PATH', `/etc/mail/ssl/ssl1')dnl
    define(`confCACERT', `/etc/mail/ssl/ssl1/STAR_xxx_net.ca-bundle')dnl
    define(`confSERVER_CERT', `/etc/mail/ssl/ssl1/STAR_xxx_net.crt')dnl
    define(`confSERVER_KEY', `/etc/mail/ssl/ssl1/private.key')dnl
    define(`confCLIENT_CERT',`/etc/mail/ssl/ssl1/STAR_xxx_net.crt')dnl
    define(`confCLIENT_KEY',`/etc/mail/ssl/ssl1/private.key')dnl
    dnl
    ###########################################################################dnl
    dnl ############  OPENDKIM ####################################
    MAIL_FILTER(`opendkim', `S=inet:8891 at 127.0.0.1')dnl
    define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}, {auth_authen},
    {auth_ssf}, {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}')dnl
    define(`confMILTER_MACROS_ENVRCPT',`r, v, b, Z, {auth_type},
    {greylist}, {auth_ssf}')dnl
    define(`confRECEIVED_HEADER',`( _Code originator:
    MBOX1_901_13_)_$?{auth_type}Abused? contact-us_at **
    abuse at foo.saa**')dnl
    dnl #### Local lmtp/Dovecot ######
    dnl # define(`DOVECOT_MAILER_ARGS', `TCP $h 24')dnl
    dnl ####FEATURE(`local_lmtp',`[IPC]',`FILE /var/run/dovecot/lmtp')dnl
    dnl ############################  FIN OPENDKIM ######
    dnl ###### boost traitement ############"dnl
    dnl #############################################################
    DAEMON_OPTIONS(`Name=MTA,Family=inet,Port=25')
    DAEMON_OPTIONS(`Name=MTA2,Family=inet6,Port=587,Modifiers=aE')
    DAEMON_OPTIONS(`Name=MSA,Family=inet6,Port=465,Modifiers=asE')
    DAEMON_OPTIONS(`Name=TRANS, family=inet, Port=900,Modifiers=bh')
    FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
    dnl # define(`confCONNECTION_RATE_THROTTLE',2800)dnl
    dnl # FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
    MAILER(dovecot)dnl
    MAILER(smtp)dnl


and /usr/share/sendmail-cf/mail/dovecot.m4

Mdovecot,      P=[IPC],
                 F=l59DFMPhnu,
                 S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
                 U=mail:mail,
                 T=DNS/RFC822/SMTP,
                 A=TCP localhost 24






REceiving  an email


Jul 20 09:13:09 mbox1 sendmail[5595]: STARTTLS=server, 
relay=sas.intranet.office.itx [172.18.2.85], version=TLSv1.3, verify=NO, 
cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Jul 20 09:13:09 mbox1 sendmail[5595]: 16K7D9xA005595: 
from=<alertalert13 at azer.com>, size=2443, class=0, nrcpts=1, 
msgid=<52761626765166 at mail.azer.com>, proto=ESMTPS, daemon=TRANS, 
relay=sas.intranet.office.itx [172.18.2.85]
Jul 20 09:13:09 mbox1 spamd[1858]: spamd: connection from ::1 
[::1]:50664 to port 783, fd 5
Jul 20 09:13:09 mbox1 spamd[1858]: spamd: setuid to user1 succeeded
Jul 20 09:13:09 mbox1 spamd[1858]: spamd: processing message 
<52761626765166 at mail.azer.com> for user1:1001
Jul 20 09:13:09 mbox1 spamd[1858]: dns: no callback for id 
63256/IN/A/sas1-d367461f7756.qloud-c.yandex.net, ignored, packet on next 
debug line
Jul 20 09:13:09 mbox1 spamd[1858]: dns: no likely matching queries for 
id 63256
Jul 20 09:13:09 mbox1 spamd[1858]: dns: no callback for id 
29336/IN/TXT/sas1-d367461f7756.qloud-c.yandex.net, ignored, packet on 
next debug line
Jul 20 09:13:09 mbox1 spamd[1858]: dns: no likely matching queries for 
id 29336
Jul 20 09:13:13 mbox1 spamd[1858]: spamd: clean message (-292.6/5.0) for 
user1:1001 in 3.7 seconds, 2582 bytes.
Jul 20 09:13:13 mbox1 spamd[1858]: spamd: result: . -292 - 
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HELO_DYNAMIC_IPADDR,HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,MAIL_GENERAL,MIME_HTML_ONLY,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_SOFTFAIL,T_SPF_HELO_TEMPERROR,UNPARSEABLE_RELAY,URIBL_BLOCKED 
scantime=3.7,size=2582,user=user1,uid=1001,required_score=5.0,rhost=::1,raddr=::1,rport=50664,mid=<52761626765166 at mail.azer.com>,autolearn=ham 
autolearn_force=no
Jul 20 09:13:13 mbox1 sendmail[5596]: 16K7D9xA005595: to=user1, 
delay=00:00:04, xdelay=00:00:04, mailer=local, pri=3480, dsn=2.0.0, 
stat=Sent
Jul 20 09:13:13 mbox1 spamd[1081]: prefork: child states: II



and absolutely NOTHING on Dovecot log file.. and I cannot see anything

-------- Message transféré --------
Sujet : 	Re: Fwd: folders and subfolders
Date : 	Mon, 19 Jul 2021 18:03:31 +0200
De : 	Alexander Dalloz <ad+lists at uni-x.org>
Pour : 	dovecot at dovecot.org



Am 19.07.2021 um 06:49 schrieb Stephane Magnier:
> define(`DOVECOT_MAILER_ARGS', `TCP $h 24')dnl

Why do you define that here? It is already in your dovecot.m4.

> dnl ############################  FIN OPENDKIM ######
> dnl ###### boost traitement ############"dnl
> FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
> dnl # define(`confCONNECTION_RATE_THROTTLE',2800)dnl
> FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
> dnl # FEATURE(`local_lmtp') dnl
> MAILER(dovecot)dnl
> dnl  #MAILER(smtp)dnl

You need the SMTP MAILER!

> dnl #MAILER(procmail)dnl

Do not place anything below the MAILER definitions. There are very few 
exceptions. See



"Beware: MAILER declarations should always be at the end of the 
configuration file."

> dnl #############################################################
> DAEMON_OPTIONS(`Name=MTA,Family=inet,Port=25')
> DAEMON_OPTIONS(`Name=MTA2,Family=inet6,Port=587,Modifiers=aE')
> DAEMON_OPTIONS(`Name=MSA,Family=inet6,Port=465,Modifiers=asE')
> DAEMON_OPTIONS(`Name=TRANS, family=inet, Port=900,Modifiers=bh')

In case adding the SMTP MAILER does not fix your issue at this state, 
please provide log details which represents the errors reported by 
Sendmail and/or dovecot.

Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210720/112bb642/attachment-0001.html>


More information about the dovecot mailing list