1 |
On 12/13/21 3:12 PM, Frank Steinmetzger wrote: |
2 |
>> Using strace, I found out that mail from mailx puts those mail into |
3 |
>> /var/spool/clientmqueue/, one file per mail, but not in a maildir structure. |
4 |
|
5 |
Yes, the /var/spool/clientmqueue is the mail queue for outgoing messages |
6 |
from clients. Hence the name "client m(ail) queue". |
7 |
|
8 |
> OK, I found out that this is the usual outgoing queue which needs to be |
9 |
> processed by sendmail, probably through another cronjob or a process that |
10 |
> itself checks that directory periodically. |
11 |
|
12 |
Sendmail is quintessentially a daemon that's running all the time. As |
13 |
such it usually does it's own scheduling and does not depend on external |
14 |
scheduling. |
15 |
|
16 |
>> In many places I read that system mail—by default—goes into |
17 |
>> /var/spool/mail/<user>, but until now I’ve yet to observe this behavior. |
18 |
|
19 |
/var/spool/mail/<user> and /var/mail/<user> are the quintessential |
20 |
locations for mbox based inbound email storage. |
21 |
|
22 |
Note: There are a number of other fancy client mail storage routines |
23 |
that don't use files in this path. |
24 |
|
25 |
> It’s really not easy to find a description of the default setup of olden |
26 |
> days (or I’m simply using the wrong search terms). Because when you search |
27 |
> for something like unix local mail setup, most results are about setting up |
28 |
> an SMTP server. In hindsight—perhaps that is simply the way to go. :-/ |
29 |
You will quite likely need a Mail Transfer Agent to receive the email, |
30 |
either via command (mail(x) / sendmail / etc) or read from a queue |
31 |
location like /var/spool/clientmqueue and then deliver the messages to |
32 |
where they belong. |
33 |
|
34 |
There /may/ be an alternate "mail" command that does all of this in one |
35 |
function. But I'd be surprised to learn about such. |
36 |
|
37 |
Most of the surprise is because it would be combining three distinct |
38 |
parts of the email flow: the Mail User Agent (a.k.a. MUA) generating |
39 |
the original outgoing message, the Message Transfer Agent (a.k.a. MTA) |
40 |
to receive the original message and do something with it, and the Local |
41 |
Delivery Agent (a.k.a. LDA) to put the message in the proper location. |
42 |
|
43 |
The originating MUA can frequently be substituted at will with "mail", |
44 |
"mailx", and "nail" being three CLI based that come to mind immediately. |
45 |
|
46 |
The MTA can frequently be one of many with Sendmail, Postfix, Courier, |
47 |
Exim coming to mind. |
48 |
|
49 |
The LDA can easily be one of the following; procmail, maildrop, Courier, |
50 |
and something super simple I don't remember the name of because I've |
51 |
not used it in so long. |
52 |
|
53 |
|
54 |
|
55 |
-- |
56 |
Grant. . . . |
57 |
unix || die |