From nobody Sun Nov 3 13:58:21 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XhGR92BBfz5c9pt for ; Sun, 03 Nov 2024 13:58:45 +0000 (UTC) (envelope-from dan@langille.org) Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4XhGR81D1Sz43H2 for ; Sun, 3 Nov 2024 13:58:44 +0000 (UTC) (envelope-from dan@langille.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=langille.org header.s=fm3 header.b=XmVTN2WZ; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=fiUs89qN; spf=pass (mx1.freebsd.org: domain of dan@langille.org designates 103.168.172.158 as permitted sender) smtp.mailfrom=dan@langille.org; dmarc=pass (policy=none) header.from=langille.org Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id E5B33114013B for ; Sun, 3 Nov 2024 08:58:42 -0500 (EST) Received: from phl-imap-08 ([10.202.2.84]) by phl-compute-06.internal (MEProxy); Sun, 03 Nov 2024 08:58:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=langille.org; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1730642322; x=1730728722; bh=2gWhIhp+/jn1dh9Z2rmvJnRTn+FIE7QG01t1CihMxLM=; b= XmVTN2WZ2/OkqQT9BXJgRBGqEWqttkXQ7AzW5LuY6+HFRFEJ2nQ9kx+0XiseWAZ2 dcqez/h6Mv4o74ktqcbU0bptuvLI91recYtRZtef7g/CS67uY6ScqJn5Xg3olKqI yCagDzAlj5VnSobBLSRdMyw1lgjxs/vS4OowD6I5l3/2S5817O7NlmUSsczVnNLj 4hWerblZyd0rE4a1CJpGF1QYATudQ9YR/j0Kjh3+O5U1BKHAc5MB2rAo4z7qIQ0M VMU5hFyjIrE6zr5Hm1Mrz2rm7yKwudImeTk2GOi9Uyj/XhB3V3sJ5VkFkocYlORL +YkT6lFCwwTb81C6UcGDfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730642322; x=1730728722; bh=2 gWhIhp+/jn1dh9Z2rmvJnRTn+FIE7QG01t1CihMxLM=; b=fiUs89qNGWzYyWkaC i4K4QrKVggJ+FCBOT1pK29N7fCsOv0CzcwGjP6Wf2ckHIIalPNFlkADdXKYDpiSM sEiJJHAfEXLyHE8mdAAGuDywpiCOYErVjgrdWWhRbexuaTFhBFLBIQnYDZtUCkrI yxcFTfYL8i50h7pMP6ca09fpmuhKJpU8b6NWZuQ8YEkD4sc/vWZ0SJMkFhCdc/aO 0Tjgurp1ZK0w0UqoUOZGsObYmGe6NpY6g6KxGJaHocZO0JmZSQbgTDpIrt5s/M1Q FfghpilN9Ma5/v7H6IzPmDlWIsLgNJcXOUg5X8070DYCxGfVS/S+ReNGWmoU8Om0 EEj+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdelgedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredttden ucfhrhhomhepfdffrghnucfnrghnghhilhhlvgdfuceouggrnheslhgrnhhgihhllhgvrd horhhgqeenucggtffrrghtthgvrhhnpedtveegjeeihfffteduteekvdfgveehffdtgefg vddtgeehfeejheejtdfgueeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegurghnsehlrghnghhilhhlvgdrohhrghdpnhgspghrtghpthht ohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepqhhuvghsthhiohhnshesfh hrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ifbf9424e:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 8292918A0068; Sun, 3 Nov 2024 08:58:42 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 Date: Sun, 03 Nov 2024 08:58:21 -0500 From: "Dan Langille" To: "via questions" Message-Id: In-Reply-To: References: <685d00e3-bacb-45cd-a166-40c6a484347e@app.fastmail.com> <22042f18-4cbb-4f62-841b-fef4a7262899@app.fastmail.com> <1c49d4a22aefd22541a526d387912eb3@dalescott.net> <20241031225337.288E8A4F1F81@ary.qy> <382f9b53-0d5e-0fd3-5d9f-9d1a8954dd5b@iecc.com> <00907865-86c5-4fb4-bc3f-0c795de2f6fc@taugh.com> Subject: Re: dma: could not pick up queue file Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.29 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[langille.org,none]; R_SPF_ALLOW(-0.20)[+ip4:103.168.172.128/27]; R_DKIM_ALLOW(-0.20)[langille.org:s=fm3,messagingengine.com:s=fm3]; RWL_MAILSPIKE_VERYGOOD(-0.20)[103.168.172.158:from]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.158:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FREEFALL_USER(0.00)[dan]; ASN(0.00)[asn:151847, ipnet:103.168.172.0/24, country:AU]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[langille.org:+,messagingengine.com:+] X-Rspamd-Queue-Id: 4XhGR81D1Sz43H2 X-Spamd-Bar: ---- On Sun, Nov 3, 2024, at 3:32 AM, Daniel Tameling wrote: > On Fri, Nov 01, 2024 at 06:37:24PM -0400, Dan Langille wrote: >> There is something I'm not following. >> >> [22:35 wikis dvl ~] % sudo /usr/libexec/dma -q >> [22:35 wikis dvl ~] % sudo ps auwx | grep dma >> dvl 42469 0.0 0.1 12808 2376 2 S+J 22:35 0:00.00 grep dma >> >> This tells me the daemon doesn't stick around. It starts, does stuff, goes away. >> >> That does not match what we're seeing in the logs below. >> >> If it is the daemon from the top of the hour, it's been sitting around for nearly 6 minutes. > > Maybe there is some periodic script that starts another dma? Daniel, I think you've got it. What I found is also entirely consistent with what John was saying at well. I'll show what I checked on my way to figuring out what it was, based on your clue. I checked cron, and I'm sure it's not cron: [13:25 wikis dvl ~] % sudo grep -r dma /var/cron/tabs [13:25 wikis dvl ~] % sudo grep -r dma /etc/crontab [13:27 wikis dvl ~] % sudo grep dma /var/log/cron | egrep -ve ':00:|:30:' [13:27 wikis dvl ~] % The log grep checks for anything not starting on the hour or half hour. Let's check periodic. Your idea turns out to be a likely suspect. [13:27 wikis dvl ~] % grep -r dma /usr/local/etc/periodic [13:29 wikis dvl ~] % grep -r dma /etc/periodic /etc/periodic/daily/500.queuerun: if [ ! -x /usr/sbin/sendmail ] /etc/periodic/daily/500.queuerun: echo '$daily_queuerun_enable is set but /usr/sbin/sendmail' \ /etc/periodic/daily/500.queuerun: /usr/sbin/sendmail -q >/dev/null 2>&1 & /etc/periodic/daily/500.queuerun: /usr/sbin/sendmail -q -Ac >/dev/null 2>&1 & /etc/periodic/daily/150.clean-hoststat: echo "Removing stale entries from sendmail host status cache:" /etc/periodic/monthly/200.accounting:oldmask=$(umask) /etc/periodic/monthly/200.accounting:umask $oldmask I think you're onto something. Let's look at the enable variable for the first two scripts listed above (the third one is not relevant). [13:32 wikis dvl ~] % grep enable /etc/periodic/daily/500.queuerun /etc/periodic/daily/150.clean-hoststat /etc/periodic/daily/500.queuerun:case "$daily_queuerun_enable" in /etc/periodic/daily/500.queuerun: echo '$daily_queuerun_enable is set but /usr/sbin/sendmail' \ /etc/periodic/daily/150.clean-hoststat:case "$daily_clean_hoststat_enable" in [13:33 wikis dvl ~] % grep daily_queuerun_enable /etc/periodic.conf /etc/defaults/periodic.conf /etc/defaults/periodic.conf:daily_queuerun_enable="YES" # Run mail queue That one runs by default. [13:34 wikis dvl ~] % grep daily_clean_hoststat_enable /etc/periodic.conf /etc/defaults/periodic.conf /etc/periodic.conf:daily_clean_hoststat_enable="NO" /etc/defaults/periodic.conf:daily_clean_hoststat_enable="YES" # Purge sendmail host That one is enabled by default, but disabled on this host. Looking to see when daily periodic runs: [13:35 wikis dvl ~] % grep daily /etc/crontab # Perform daily/weekly/monthly maintenance. 1 3 * * * root periodic daily Given that each script in periodic runs in series (one after another), it is entirely possible that this may be the cause. Pasting the logs from the original post: >>> Nov 1 03:05:42 wikis dma[46d60][90243]: new mail from user=root uid=26 envelope_from= >>> Nov 1 03:05:42 wikis dma[dma][90258]: could not pick up queue file: `/var/spool/dma/Q46d60.432a50848050'/`/var/spool/dma/M46d60.432a50848050': No such file or directory >>> Nov 1 03:05:42 wikis dma[46d60][90243]: mail to= queued as 46d60.432a50848050 It's entirely possible that process 90258 above relates to /etc/periodic/daily/500.queuerun For the record, this is my mail configuration: [13:54 wikis dvl ~] % cat /etc/mail/mailer.conf sendmail /usr/libexec/dma mailq /usr/libexec/dma newaliases /usr/libexec/dma rmail /usr/libexec/dma Based on that, I'll add this to /etc/periodic.conf: # disable queuerun_enable to avoid conflict with dma daily_queuerun_enable="NO" That comment is just to remind me what it's for. Now it's just a matter of time. If there are no more incidents, I say you've solved it. Let's give it a few weeks. Thank you. Good job. :) -- Dan Langille dan@langille.org