DMAIL(1)

πŸ’Œ DMAIL(1) β€” the manual, but make it cute

okay bestie, so this is the page for dmail, living in the General Commands Manual section of your man pages. grab a boba, we're learning mail delivery πŸ’…


✨ NAME ✨

dmail β€” procmail Mail Delivery Module πŸŽ€


🌸 SYNOPSIS 🌸

dmail [-D] [-f from_name] [-s] [-k keyword_list] [user][+folder]

πŸ’– DESCRIPTION πŸ’–

dmail delivers mail to a user's INBOX or a designated folder. she can be configured as a drop-in replacement for binmail(1) and mail.local(1), for use with a mail delivery filter like procmail(1). iconic behavior fr fr ✨

because of security considerations (scroll down babe, it's giving important), dmail is not intended to be used for direct delivery by the mailer daemon β€” tmail(1) is the preferred tool for that job. if you do use dmail for mailer daemon delivery, the mailer daemon must invoke dmail with the dmail process' user id set to the recipient's user id. no cap, that part is not optional πŸ™ˆ

when dmail exits, she returns exit status values so procmail(1) can figure out whether a message was delivered successfully, or had a temporary failure (requeue for later delivery), or a permanent failure (return to sender). she's literally telling you how it went πŸ’€

if the user name is present, it must be the same as the logged-in user name. periodt.

if the +folder extension is included in the user argument (or appears by itself, if there is no user argument), dmail will attempt to deliver to the designated folder. if the folder does not exist, or the extension is not included, the message goes to the user's INBOX. and if delivery is to INBOX and no INBOX currently exists, dmail will create a brand new INBOX for you, she's so thoughtful 🫢 dmail recognizes the format of an existing INBOX or folder, and appends the new message in that format. she matches the vibe of what's already there, lowkey queen πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -D β€” specifies debugging; this enables additional message telemetry. she's giving you the receipts πŸ”
  • -f or -r β€” used to specify a Return-Path. the header
Return-Path: <from_name>

gets prepended to the message before delivery βœ‰οΈ

  • -s β€” specifies that the message will be flagged as being "seen" πŸ‘€
  • -k β€” used to specify delivery keywords, which are set on the message at delivery time if and only if the keywords are already defined in the mailbox. multiple keywords can be specified by using a quoted string, e.g.,
dmail -k "$Junk Discard" +junkbox

yes bestie, if and only if β€” that's the rule and we respect it πŸ’–


🚫 RESTRICTIONS 🚫

absolute pathnames and ~user specifications are not permitted in +folder extensions. don't even try it πŸ’€


πŸ” SECURITY CONSIDERATIONS πŸ”

unlike tmail, you can use dmail to deliver to IMAP4 namespace names via +folder extensions. which means it's possible to deliver to mh(1) format mailboxes. slay, flexibility ✨

however 😭 β€” this can also include such namespaces as #shared, #public, and #ftp. in most cases, it is undesirable to allow anybody sending mail to the user to deliver to these namespaces. so there needs to be a rule in place in the configuration of either sendmail(8) or procmail(1) to prevent such abuse.

fr fr, do not skip this one. set up that rule in sendmail(8) or procmail(1) or you're gonna have a bad time πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Mark Crispin, MRC@CAC.Washington.EDU β€” the icon who wrote this πŸ’œ


🌈 SEE ALSO 🌈


and that's the whole page bestie πŸŽ€ this version dropped way back on June 18, 2007, and it's the DMAIL(1) page from the General Commands Manual β€” go forth and deliver that mail, you main character πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from