From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6FC89158086 for ; Tue, 14 Dec 2021 23:34:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22B762BC023; Tue, 14 Dec 2021 23:34:21 +0000 (UTC) Received: from tncsrv06.tnetconsulting.net (tncsrv06.tnetconsulting.net [IPv6:2600:3c00:e000:1e9::8849]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A90B52BC013 for ; Tue, 14 Dec 2021 23:34:18 +0000 (UTC) Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 1BENYGpS024043 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 14 Dec 2021 17:34:17 -0600 Subject: Re: [gentoo-user] Local mail delivery agent (MDA) wanted To: gentoo-user@lists.gentoo.org References: <20211213204005.3317f4c7@ventiloplattform.tastytea.de> From: Grant Taylor Organization: TNet Consulting Message-ID: Date: Tue, 14 Dec 2021 16:34:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Archives-Salt: 1ac43b5c-110e-46a4-8061-3569e2cc5a39 X-Archives-Hash: 1bf292a189bff9e0b20e212be1813fd6 On 12/13/21 3:12 PM, Frank Steinmetzger wrote: >> Using strace, I found out that mail from mailx puts those mail into >> /var/spool/clientmqueue/, one file per mail, but not in a maildir structure. Yes, the /var/spool/clientmqueue is the mail queue for outgoing messages from clients. Hence the name "client m(ail) queue". > OK, I found out that this is the usual outgoing queue which needs to be > processed by sendmail, probably through another cronjob or a process that > itself checks that directory periodically. Sendmail is quintessentially a daemon that's running all the time. As such it usually does it's own scheduling and does not depend on external scheduling. >> In many places I read that system mail—by default—goes into >> /var/spool/mail/, but until now I’ve yet to observe this behavior. /var/spool/mail/ and /var/mail/ are the quintessential locations for mbox based inbound email storage. Note: There are a number of other fancy client mail storage routines that don't use files in this path. > It’s really not easy to find a description of the default setup of olden > days (or I’m simply using the wrong search terms). Because when you search > for something like unix local mail setup, most results are about setting up > an SMTP server. In hindsight—perhaps that is simply the way to go. :-/ You will quite likely need a Mail Transfer Agent to receive the email, either via command (mail(x) / sendmail / etc) or read from a queue location like /var/spool/clientmqueue and then deliver the messages to where they belong. There /may/ be an alternate "mail" command that does all of this in one function. But I'd be surprised to learn about such. Most of the surprise is because it would be combining three distinct parts of the email flow: the Mail User Agent (a.k.a. MUA) generating the original outgoing message, the Message Transfer Agent (a.k.a. MTA) to receive the original message and do something with it, and the Local Delivery Agent (a.k.a. LDA) to put the message in the proper location. The originating MUA can frequently be substituted at will with "mail", "mailx", and "nail" being three CLI based that come to mind immediately. The MTA can frequently be one of many with Sendmail, Postfix, Courier, Exim coming to mind. The LDA can easily be one of the following; procmail, maildrop, Courier, and something super simple I don't remember the name of because I've not used it in so long. -- Grant. . . . unix || die