masqmail(8)
π masqmail(8) β Maintenance Commands π
okay bestie, buckle UP because this is the page for masqmail, and it's a whole thing. this is part 1 of 2, so don't go anywhere. β¨
πΈ NAME πΈ
masqmail β an offline Mail Transfer Agent. yes. she delivers your mail even when the wifi is giving nothing. π
π SYNOPSIS π
here's the vibe, literally in code:
masqmail [-t] [-oi] [-f ADDRESS] RECIPIENT...
mailq
masqmail -bp
runq
masqmail -q
masqmail -qo NAME
mailrm MSGID...
masqmail -Mrm MSGID...
masqmail [-C FILE] [-odq] -bs
masqmail [-C FILE] [-odq] -bd -qINTERVAL
(This list is a selection.)
yes that last line is literally in the original, it's a selection, not the whole menu. iconic of her honestly.
π¦ DESCRIPTION π¦
So. masqmail is a mail server built specifically for hosts that do not have a permanent internet connection β think a home network, or literally just one single host chilling at home. π
She has special support for connecting to different ISPs, which is the whole point. And she's here to replace sendmail, or other MTAs like qmail or exim. no cap. π
π OPERATION MODES π
Masqmail runs in one of several exclusive modes. pick a lane bestie.
The daemon mode has two flavors, and they may be β and usually ARE β used in combination:
π Daemon (listen)
-bdor invoked assmtpd
Run as a daemon. Act as an SMTP server and accept SMTP connections, on port 25 if not configured differently.
This is normally used in the startup script at system boot, and together with -qINTERVAL (see below, babe).
Alternatively masqmail can be run with the -bs option from inetd.
π Daemon (queue)
-qINTERVAL
Run as a daemon. Do regular queue runs at the specified time interval. This is normally used together with -bd (see above).
An argument may be a time interval, i.e. a numerical value followed by one of the letters s,m,h,d,w β which are interpreted as seconds, minutes, hours, days or weeks</> respectively. Example: -q30m. Combinations like -q1h30m, which sendmail accepts, are NOT possible. sorry girl, no stacking.
Alternatively, single queue runs (-q) can be started from cron.
The queue processing mode has two flavors, and those may be used in combination too:
π Single queue run (normal)
-q(without argument) or invoked asrunq
Do a single queue run. Try to deliver all messages in the queue. Masqmail sends to addresses on the local host and to remote ones, if available online routes permit it. That means masqmail sends all queued mail it can. Online detection is done with the configured method (see online_query in masqmail.conf(5)).
π Single queue run (only named route)
-qo NAME
Do a single queue run and deliver only using the specified online route.
The route configuration for NAME is read and queued mail to matching remote recipients is sent. (See query_routes.NAME in the main config file.)
You may want to use this option in scripts that run as soon as a link to the internet has been set up (e.g. ip-up).
Obsolete behavior: Up to now: If -qo has no argument, the online connection is determined by online detect and, if available, mail is sent through it. If none is available, no mail is delivered.
This behavior is likely to change in future versions because it is included in -q. We could do something more useful instead. π
The other modes are the simple ones:
π Rebuild alias database
-bior invoked asnewaliases
A no-op for masqmail, just exit. Old sendmail rebuilds its alias database when invoked with this option. Masqmail reads directly from its alias file (see config option alias_file), thus no database needs to be updated. she said "not me doing extra work for nothing" β¨
π Accept messages
-bm, also the default mode
Accept a text message on stdin. This is the default mode of operation. One will hardly use this switch as it is the default.
The command line options -f,-F,-i/-oi,-t are only used in this mode.
π Print queue
-bpor invoked asmailq
Show the messages in the queue. π
π Stand-alone SMTP server
-bs
Act as SMTP server by reading commands from stdin and writing to stdout. Some mailers (e.g. pine) use this option as an interface. It can also be used to call masqmail from inetd.
π Print version
-bVor if called without arguments
Print version information, then exit. short and sweet, we love her π«Ά
π Queue manipulation mode
-Mrmor invoked asmailrm
Remove given messages from the queue. Privileged users may remove any message, other users only their own. The message identifiers are listed when printing the queue (see -bp).
π The default mode:
When no mode had been specified by either one of the above command line options or by calling masqmail under a special name, then the default mode -bm (i.e. accept messages on stdin) is entered. However, if neither address arguments are specified nor -t is given, then mail can not be sent β hence something more useful is done: -bV is assumed. she's practical like that. π
β¨ OPTIONS β¨
Since masqmail is intended to replace sendmail, it uses the same command line options, but not all are implemented. The -qo option is additional, and unique to masqmail. periodt.
--β not arealoption, it means that all following arguments are to be understood as arguments and not as options, even if they begin with a leading dash-.Muttis known to call sendmail with this option.-bdβ "Daemon (listen)" mode. See above.-biβ "Rebuild alias database" mode. See above.-bmβ "Accept message" mode. See above.-bpβ "Print queue" mode. See above.-bsβ "Stand-alone SMTP server" mode. See above.-bVβ "Print version" mode. See above.-B argβ arg is usually8BITMIME. Some mailers use this to indicate that the message contains characters > 127. Masqmail is 8-bit clean and ignores this, so you do not have to recompileelm, which is very painful ;-). Note though that this violates some conventions: masqmail does not convert 8 bit messages to any MIME format if it encounters a mail server which does not advertise its8BITMIMEcapability, and masqmail does not advertise this itself. This is the same practice as that ofexim(but different tosendmail).-C filenameβ Use another configuration than/etc/masqmail/masqmail.conf. Useful for debugging purposes. If not invoked by a privileged user, masqmail will drop all privileges.-d numberβ Set the debug level. This takes precedence before the value ofdebug_levelin the configuration file. Read the warning in the description of the latter. Only root may set the debug level.-f [address]β Set the return path address to address. Only root, the usermailand anyone in groupmailis allowed to do that.-F [string]β Set the full sender name (in theFrom:header) to string.-iβ Same as-oi, see below. Kept for compatibility.-Mrm msgid...β "Queue manipulation" mode. See above.-mβ "Me too" This switch is ignored as masqmail never excludes the sender from any alias expansions.-mis an ancient alias for-om. Kept for compatibility.-odbβ "Deliver in Background" Masqmail always does this. Hence masqmail ignores this switch. π-odqβ "Do Queueing" Do not attempt to deliver immediately. Any messages will be queued until the next queue running process picks them up and delivers them. You get the same (but global) effect by setting thedo_queueoption in/etc/masqmail/masqmail.conf.-oiβ A dot as a single character in a line does not terminate the message. The same as-i.-oXXXβ Any other switch starting with-ois ignored. This especially affects-om,-oem,-oee.-qβ "Single queue run (normal)" mode. See above.-qINTERVALβ "Daemon (queue)" mode. See above.-qo nameβ "Single queue run (only named route)" mode. See above.-tβ Read recipients from mail headers and add them to the ones specified on the command line. (OnlyTo:,Cc:, andBcc:headers are regarded.)
WARNING: The behavior changed with version 0.3.1!
In earlier versions command line argument addresses were substracted from header addresses.
The old behavior was similar to exim's and smail's (which are anchesters of masqmail). The new behavior is similar to the one of current postfix versions, which add the arguments to the set of header recipients. (Earlier postfix failed in case of address arguments with -t.) Sendmail seems to behave differently, depending on the version. See exim(8) for further information.
For masqmail the most simple approach had been taken.
As the behavior of -t together with command line address arguments differs among MTAs, one better not steps into this corner case. bestie. just don't. π
-vβ "Verbose" Log also tostdout. Currently, some log messages are marked aswrite to stdoutand additionally, all messages with priorityLOG_ALERTandLOG_WARNINGwill be written tostdoutif this option is given. It is disabled in daemon mode.
π ENVIRONMENT FOR PIPES AND MDAS π
For security reasons, before any pipe command from an alias expansion or an mda is called, the environment variables will be completely discarded and newly set up. These are:
SENDER,RETURN_PATHβ the return path.SENDER_DOMAINβ the domain part of the return path.SENDER_LOCALβ the local part of the return path.RECEIVED_HOSTβ the host the message was received from (unless local).LOCAL_PART,USER,LOGNAMEβ the local part of the (original) recipient.MESSAGE_IDβ the unique message id. This is not necessarily identical with the Message ID as given in theMessage ID:header.QUALIFY_DOMAINβ the domain which will be appended to unqualified addresses.
π FILES π
/etc/masqmail/masqmail.confβ The main configuration for masqmail. Depending on the settings in this file, you will also have other configuration files in/etc/masqmail/./var/spool/masqmail/β The spool directory where masqmail stores its queued mails. π¬/var/spool/mail/β The directory where locally delivered mail will be put, if not configured differently inmasqmail.conf./var/log/masqmail/β The directory where masqmail stores its log messages. π
Any of the paths can be configured at compile time, and (except the main config file) also in the main config file. The typical paths are different, depending on the Unix system you use.
okay that's part 1 bestie, don't go anywhere β more is coming π
β¨ CONFORMING TO β¨
okay so like, masqmail is out here being a whole standards girlie π and it plays nice with all of these:
no cap, it really said "I speak fluent protocol" and meant it β¨
π AUTHOR π
so Masqmail was written by Oliver Kurth π«Ά β an actual legend, we stan. And these days it's being maintained by Markus Schnalke <meillo@marmaro.de> πΈ keeping the whole thing alive and thriving, periodt.
You will find the newest version of masqmail on its website: http://marmaro.de/prog/masqmail/ π¦β¨
There is also a mailing list β like, a whole little community bestie β and you will find information about it on the website. go check it out, iykyk π
π BUGS π
okay so here's the tea β β bug reports of any kind are very welcome π They help masqmail to become better, fr fr. Please report bugs to the mailing list (anyone can post) π
not me begging you to tell us when something's broken β every single report is a gift, no gatekeeping allowed πβ¨
π SEE ALSO π
go read these next besties, they're all iconic in their own right:
masqmail.conf(5)π«masqmail.route(5)πmasqmail.aliases(5)β
and that's the whole page, bestie!! π you just read masqmail version masqmail-0.3.4, dated 2012-01-18, and honestly? she ate π
β¨ sending you all the good SMTP vibes, mwah π«Άπππ¦
π¦ where this page comes from
- ubuntu jammy: masqmail 0.3.4-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms