OnWorks favicon

avenger.deliver - Online in the Cloud

Run avenger.deliver in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command avenger.deliver that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



deliver - deliver mail to a mailbox or maildir spool


deliver [--umask[=val]] destination1 [destination2 ...]


Takes a mail message on standard input, and delivers it to one or more destination
mailboxes. If a destination ends with a "/" character, it is interpreted as a qmail
maildir format directory (which will be created if it doesn't already exist). Otherwise,
if the destination does not end with a "/" character, it is interpreted as a Unix mbox
format file.

If one of the mailboxes is specified as -, deliver will send a copy of the message to its
standard output after generating the appropriate "From " and "Return-Path:" lines, if
necessary. This is useful when piping messages to programs from avenger.local(8) scripts,
as avenger.local does not generate any "From " or "Return-Path: " lines, while deliver
will generate these based on the SENDER environment variable.

If deliver cannot seek on its standard input, it will first copy the message to a
temporary file before attempting any deliveries. Usually this only occurs when
deliver is being fed the output of another program through a pipe. The --copy option
forces copying regardless of whether deliver could rewind the file pointer.

--fcntl (-P)
This option enables fcntl (a.k.a. POSIX) file locking of mail spools, in addition to
flock and dotfile locking. The advantage of fcntl locking is that it may do the right
thing over NFS. However, if either the NFS client or server does not properly support
fcntl locking, or if the file system is not mounted with the appropriate options,
fcntl locking can fail in one of several ways. It can allow different processes to
lock the same file concurrently--even on the same machine. It can simply hang when
trying to acquire a lock, even if no other process holds a lock on the file. Also, on
some OSes it can interact badly with flock locking, because those OSes actually
implement flock in terms of fcntl.

By default, if deliver can rewind its standard input, it will do so before reading the
message. This lets scripts more easily run several commands over their standard input
when that input is a file. For example, a shell script might do the following:

if test YES = "`formail -cxz X-Spam-Status:`"; then
deliver $HOME/Mail/spam/
deliver $HOME/Mail/ham/

The --norewind inhibits that behavior, so that the above script would likely give
unintended results. --norewind is useful for testing scripts that aren't supposed to
assume they are getting input from a file.

By default, deliver creates all files and directories with a umask value of
077--meaning files are not readable or writable by others. The --umask option tells
deliver to keep whatever umask it was invoked with. The --umask=val option tells
deliver to use a umask of val. Note that to specify val in octal, you must prefix it
with a 0, so the default is equivalent to --umask=077, but not --umask=77.


The following environment variable affects deliver's operation.

Specifies the envelope sender (bounce address) of the message. For maildir format
mailboxes, the sender will be included in a "Return-Path:" header. For mbox format
mailboxes, the sender is reflected in the first line, which will contain "From SENDER
...". If SENDER is unspecified, deliver will attempt to extract it from the first
line of the message, if that line begins "From " or "Return-Path:". Otherwise, the
sender will probably be incorrectly set.


Using avenger.local, to set up an address as a spam trap that reports any messages it
receives as spam, you might place the following in the appropriate .avenger/local file:

| deliver - | spamassassin -r

If you want to reject spam messages during SMTP transactions using spamassassin, but still
want to keep a copy of the spams in $HOME/Mail/spam-log to keep an eye on how spamassassin
is doing, you might place the line "bodytest $HOME/.avenger/spam-check", and write the
spam-check shell script as follows:

edinplace -x 111 spamassassin -e 100
case "$?" in
echo Sorry, spamassassin has flagged this message as spam
deliver $HOME/Mail/spam-log
exit 100
echo Sorry, spamassassin has encountered a temporary error
exit 111
echo Sorry, spamassassin exited witn an unknown status
exit 111

Note here that the bodytest script does not need to pipe the message through "deliver -"
before spamassassin, because bodytest's standard input does contain "From " and
"Return-Path:" lines, even though avenger.local command input does not.

Use avenger.deliver online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Clover EFI bootloader
    Clover EFI bootloader
    Project has moved to
    Features:Boot macOS, Windows, and Linux
    in UEFI or legacy mode on Mac or PC with
    Download Clover EFI bootloader
  • 2
    Join us in Gitter!
    Enable the URPMS repository in your
    system -
    Download unitedrpms
  • 3
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 4
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 5
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Download libusb
  • 6
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    Download SWIG
  • More »

Linux commands