APPNMAIL

Section: User Commands (1)
Index Return to Main Contents
 

NAME

appnmail - append mail to a Mail.app mailbox  

SYNOPSIS

appnmail [ -rfdnvi ] [ -p num ] [ -HV ] [ mbox ... ]  

DESCRIPTION

Appnmail reads a mail message from the standard input and appends it to any number of Mail.app mailboxes. These mailboxes will be created if necessary. To specify a mailbox it is usually sufficient just to give its name without pathname or the `.mbox' extension.

If a mailbox is open in Mail.app, appnmail delivers the message into a temporary mbox inside the mailbox, and then signals Mail.app to incorporate the message in the main mbox. If another program (typically another appnmail process) has locked a mailbox which the program tries to access, it will sleep for a couple of seconds and try again until the mailbox has become available.

If appnmail is invoked with the -n option the message will not be incorporated in open mailboxes. However it has been appended to a temporary mbox, so it will be delivered the next time appnmail visits this mailbox.

The -i option forces a check for the existence of this temporary mbox, and incorporates it into the main mailbox if it exists. When this option is given, the message is optional: if appnmail is invoked interactively, the message is not read if stdin is the tty (but it will be read if redirected from a file, or piped in; an empty message is ignored. Therefore the safest way to invoke it from a script is by redirecting /dev/null to stdin.)

By default appended messages are marked as unread. The -r, -d and -f options will cause the message to be marked read, deleted or flagged respectively. The -p option allows the user to override the default priority level of the message. Valid values are 0 for no priority, 1 for highest priority and 2 for second highest priority, and so on.

Adding the option -v causes appnmail to be more verbose about what it does. Multiple -v options increase the level of verbosity.

The -H option displays a summary of the options that appnmail responds to, and -V shows the program's version.

Appnmail works both with NeXTmail and standard Mime- and plain-text mail.  

EXAMPLES

Append a message called `msg' to the Mailboxes OldMail and Outgoing:

        appnmail <msg OldMail Outgoing

Typical lines to use in a ~/.procmailrc to append all messages from the MiscKit mailing list to the mailbox misckit. (Before you use this make sure that appnmail is in the path specified at the beginning of the ~/.procmailrc file.):

        :0
        * ^TOmisckit@yacktman.com
        | appnmail misckit

Appnmail knows how to handle some European Mime-header encodings (iso-8859-1 and partially iso-8859-2); Japanese encodings are not yet supported. For procmail delivery you can work around this by inserting the following recipe in your ~/.procmailrc, before any rule that invokes appnmail:

        :0fh
        * ^(From|Subject): .*=\?iso-2022-jp\?
        | nkf -e -m

Nkf is Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>'s Network Kanji code conversion Filter, and is included in the mailapp-utilities distribution.

If appnmail is used in conjunction with a mail delivery package like procmail, it is worth noting that it should not be used to put mail in the Active mailbox. Most users will keep the Active mailbox opened and locked in Mail.app whenever they are logged in at the console. Though appnmail does its best to incorporate messages in an open mailbox, it circumvents Mail.app's normal mail-detection and -retrieval mechanism, so you won't get the animated icon and sound when new mail arrives. It may even interfere with automatic mail retrieval, possibly resulting in loss of messages. Instead mail intended for the Active mailbox should be put into the mail spool directory as it normally would be done by default.  

DEFAULTS

Appnmail uses the following (hidden) Mail defaults. If the default is undefined the value in parentheses is used.
MailDir (~/Mailboxes)
PriorityHeader (none)
PriorityValues (none)
TarCommand (/NextApps/Mail.app/safetar, or /usr/bin/gnutar)
UncompressCommand (/usr/bin/gunzip, or /usr/ucb/uncompress)
It adds the following of its own to the Mail defaults:
appnmailDecodeCommand (/NextApps/Mail.app/decode)
appnmailIncorporateDelay (0)
controls the wait (in seconds) between delivery to appnmail's temporary mbox and its incorporation in an open Mail.app's mbox. This is to allow messages delivered by subsequent appnmails to the same mailbox in this interval to be coalesced and incorporated in one fell swoop (for batch mail delivery like UUCP). Immediate incorporation is the default.
 

SEE ALSO

nextmail(1), procmail(1), procmailrc(5), procmailex(5)  

DIAGNOSTICS

`Already locked by %s on %s (pid=%s)' if another process has locked a mailbox.

`Message is not in UNIX mailbox format' if the message on the standard input doesn't begin with the strings `From '. This occurs for example when trying to find raw mh messages to appnmail.  

BUGS

This program by necessity depends on the internal format of Mail.app files. While it cooperates correctly with NS 2.x, 3.x and 4.[012] no guarantee can be made that this won't change in the future.

Delivery into open mailboxes may not work with Mail.app versions before 3.2.  

AUTHOR

Carl Edman <cedman@lynx.ps.uci.edu>

The task was made considerably easier by Chris Paris <cap+@cmu.edu> decoding of the Mail.app transmission and storage formats.

Tom Hageman <mailapp-utilities@basil.icce.rug.nl> is the current maintainer.  

VERSION

Mail.app utilities version 2.1, February 1998.


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
DEFAULTS
SEE ALSO
DIAGNOSTICS
BUGS
AUTHOR
VERSION

This document was created by man2html, using the manual pages.
Time: 05:07:09 GMT, April 11, 2025