Commands

Commands

biff

[ny]

Biff toggles the system's message notification system. Biff y alerts you when mail arrives and tells you who it is from. Biff n turns notification off .

Example: To set your system to notify you when mail arrives, type

biff y

n

Turn notification off.

y

Turn notification on.

elm

[ -achkKmrtwz ] [ -f alternate-folder ] [ -d debug level ]

elm

[ -s subject ] list of aliases or addresses

elm is a screen-oriented program for sending and receiving mail. It is usually used interactively, but may be used to send mail from the command line.

Example: To mail the file message.txt to jones@abc.com with a subject, type

elm -s "Important" < message.txt

-a

Specify use of the arrow cursor (as opposed to the default, reverse video cursor).

-c

Expand listed aliases and return.

-dlevel

Specify the debug level. Output from debug goes to $HOME/ELM:debug info.

-falternative-folder

Tell elm to read from the specified folder, instead of the inbox.

-h, -?

Print help information.

-ifile

Tell elm to open with the specified file in the edit buffer.

-k

Force knowledge of the HP terminal keyboard.

-K

Enable use of softkeys (HP terminals only).

-m

Turn the menu off to make more room for mail headers.

-ssubj Subject

Allow user to specify mail subject on the command line.

-t

Turn usage of termcap/terminfo ti/te sequences.

-v

Display version information.

-z

Tell elm not to bother opening up if there is no new mail.

fetchmail

[options] [mailserver ]

fetchmailconf

Fetchmail gets mail from remote mail servers and forwards it to your local client machine's delivery system. Typically, this is run as a daemon to check remote mail servers over a PPP/SLIP link. However, it can also be used to gather mail by machines that do not permit their mail servers to initiate an SMTP connection.

Note that fetchmail is not a mail reader. To actually read your mail once retrieved, you must use elm, mail, mailx, or some other mail reader.

Example: To retrieve the mail from the server pop3.isp.com using the pop3 protocol, use

fetchmail -p pop3 pop3.isp.com

General Options

-V, --version

Display version information.

-c, --check

Check to see if there is mail waiting, but do not retrieve it.

-s, --silent

Do not display the normal complement of progress messages.

-v, --verbose

Pass any control messages sent between fetchmail and the mail server on to the display.

Disposal Options

-a, --all

Tell fetchmail to get both new messages and messages that have already been displayed.

-k, --keep

Tell fetchmail to keep any retrieved messages on the mail server, rather than delete them (which is the default).

-K, --nokeep

Tell fetchmail to delete any retrieved messages from the mail server.

-F, --flush

Tell fetchmail to delete old messages before retrieving any new messages.

Protocol and Query Options

-p, --protocolproto

Specify the protocol to use in communications with the remote server.

POP2

Invoke Post Office Protocol 2.

POP3

Invoke Post Office Protocol 3.

APOP

Invoke POP3 with MD5 authentication.

RPOP

Invoke POP3 with RPOP authentication.

KPOP

Invoke POP3 with Kerberos V4 authentication on port 1109.

SDPS

Use POP3 with Demon Internet's SDPS extensions.

IMAP

Use IMAP2bis, IMAP4, or IMAP4rev1 (fetchmail autodetects their capabilities).

IMAP-K4

Invoke IMAP4 or IMAP4rev1.

-U, --uidl

Force Unique ID Listing (UIDL). Use when using POP3.

-P, --port

Use the specified port, rather than the default.

-r folder, --folderfolder

Use the specified mail folder, rather than the default.

-S host, --smtphosthost

Specify a hunt list of hosts to forward mail to (one or more hostnames, comma-separated).

-D domain, --smtpaddressdomain

Specify the domain to be put in RCPT TO lines, shipped to SMTP, rather than the default localhost.

-Z nnn, --antispamnnn[,nnn[,nnn...]]

Specify the list of numeric SMTP errors that are to be interpreted as a spamblock response from the listener.

-m, --mda

Specify that mail will be passed to an MDA directly, rather than port 25.

Resource Limit Control Options

-l, --limit

Specify a maximum octet size argument. (Messages exceeding this size limit will not be fetched or marked as seen.)

-b, --batchlimit

Specify a limit to the number of messages shipped out to an SMTP listener in a single session. (The default is unlimited.)

-B, --fetchlimit

Specify a limit to the number of messages accepted from server in a single poll. (The default is unlimited.)

-e, --expunge

Specify that fetchmail should issue expunges only after the Nth delete. (Expunges force a deletion to be performed immediately, which is sometimes a performance drag.)

Authentication Options

-uname,--usernamename

Specify the user identification to be used when logging in to the mail server.

-Ispecification,--interfacespecification

Tell fetchmail that the specified device must be up and have a specific local IP address before polling.

-Minterface,--monitorinterface

Specify a system TCP/IP interface to be monitored constantly.

-A, --auth

Specify a preauthentication type (password | kerberos_v5 | kerberos).

Miscellaneous Options

-fpathname,--fetchmailrcpathname

Use the specified name as the .fetchmailrc file.

-ipathname,--idfilepathname

Use the specified name as the .fetchids file.

-n, --norewrite

Disable rewrite of address headers. (Of interest only to those truly paranoid about having a machine rewrite their email headers. Prevents addition of "@hostname" clauses to the address.)

-E, --envelope

Change the header. (fetchmail will change the header that it assumes will carry a copy of the mail's envelope address.)

-Q, --qvirtual

Remove the specified string prefix from the user name found in the header denoted with the envelope option.

--configdump

Tell fetchmail to parse the ~/.fetchmailrc file, interpret any command line options it finds there, and dump a configuration report to standard output.

formail

[+skip] [-total] [-bczfrktnedqBY] [-p prefix] [-D maxlen idcache] [-x headerfield] [-X headerfield] [-a headerfield] [-A headerfield] [-i headerfield] [-I headerfield] [-u headerfield] [-U headerfield] [-R oldfield newfield][-m minfields] [-s [command [arg ]]]

formail is a mail filter. It puts mail into mailbox format, does "From" escaping, generates autoreplying headers, does simple header munging/extracting, or splits up the specified mailbox/ digest/articles file.

If formail is started without any command line options, it will force any mail coming from stdin into mailbox format and will escape all bogus "From" lines with a ">".

Example: To remove all fields, except To:, From:, and Subject: from the header, use

formail -k -X To -X From: -X Subject:

-b

Don't escape any misformatted mailbox headers.

-pprefix

Specify a quotation prefix.

-Y

Tell formail to use traditional Berkeley mailbox format.

-c

Concatenate continued fields in the header.

-z

Zap fields containing only a space.

-f

Don't force generation of a "From" line.

-r

Generate an auto-replay header.

-k

Tell formail to retail the message body when generating an auto-reply header or extracting fields.

-t

Trust that the sender has a valid return address in the header.

-sprogram

Separate input into distinct mail messages and pipe into the specified program.

-n

Do not wait for a program to finish before starting the next.

-e

Do not require empty lines to precede the header of a new message.

-d

Disable recognition of the Content-Length: field.

-B

Tell formail it is splitting up a BABYL rmail file.

-mminfields

Specify the minimum number of consecutive fields that will constitute the start of a new message.

-q

Do not display error messages on write errors, duplicate messages, and mismatched Content-Length: fields quiet operation.

-Dmaxlen idcache

Detect if the Message-ID of the current message has already been seen using an id cache file of approximately maxlen size.

-xheaderfield

Extract contents of the specified headerfield from the header, and display it as a single line.

-Xheaderfield

Extract contents of the specified headerfield from the header, and display it as a single line and preserve the field name.

-aheaderfield

Append the specified headerfield to the header if and only if a similar field does not exist yet.

-Aheaderfield

Append the specified headerfield to the header.

-iheaderfield

Append the specified headerfield to the header, adding the word "Old-" to any similar field.

-Iheaderfield

Append the specified headerfield to the header, but remove any similar field.

-uheaderfield

Make the first occurrence of the specified headerfield unique. (Delete all subsequent occurrences.)

-Uheaderfield

Make the last occurrence of the specified headerfield unique. (Delete all previous occurrences.)

-Roldfield newfield

Rename all instances of oldfield as newfield.

+skip

Skip the specified number of messages.

-total

Specify a upper limit of messages to output.

mail

[-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr

mail

[-iInNv] -f [name]

mail

[-iInNv] [-u user]

Mail is a mail processing (send, receive, view) system. It can be used either interactively or strictly from the command line.

Example: To send the file blah.txt to user Susie from the command line with subject "Homework", use

mail -s "Homework" susie < blah.txt

-v

Invoke verbose mode.

-i

Ignore tty interrupt signals (good for use over noisy phone lines).

-I

Force interactive mode.

-n

Do not read /etc/mail.rc on startup.

-N

Do not perform the initial display of message headers.

-ssubject

Specify subject on the command line.

-cuser[user,...]

Copy the message to the specified users.

-buser[user,...]

Send blind copies to the specified users.

-ffile

Use the specified file as your mailbox.

-u

Equivalent to mail -f /var/spool/mail/user.

To use mail interactively, type "mail" at the command line. It will get any mail you have from your default P.O. Box and display headers to the screen. You can then use the following commands:

-

Print preceding messages

?, help

Display help screen.

!command

Execute the specified shell command.

Print, P, Type, T

Display message to screen, including ignored header fields.

Reply, R

Reply to sender of current message.

alias

Print out all aliases or (if any specified) the specified alias only.

alternates

Specify alternate email accounts, usually on other machines such that mail will not copy those accounts when replying.

chdir

Change user's working directory to specified directory (if any) or to the login directory by default.

copy

Save as specified, but do not mark for deletion.

deletemessage, message,...

Mark the specified messages as deleted.

dp

Delete current message and print the next.

edit

Edit the specified list of messages.

exit, xit, x

Quit without modification.

file, fi, folder

Use the specified folder as input.

folders

List the names of the folders in your folder directory.

frommessage[,message, ...]

Print the headers from the specified list of messages.

headers [+|-]

List the current range of headers or the previous (-) or the following (+).

hold, preserve, pre

Mark specified messages to be saved in user's system mailbox.

ignore

Add specified list of headers to the ignored list.

mail username [, username, ...]

Send mail to the specified list of users.

mbox

Send the specified list of messages to mbox in your login directory when you quit mail.

next, n, +, <Enter>

Go to next message in list.

print message [, message, ...]

Display the specified message to the terminal.

quit

End session.

reply, respond

Reply to sender and all other recipients.

retain

Add the specified list of header fields to the retained list.

save, s [messages] [file]

Save message to specified file.

set [variable=value]

Set the variable to the specified value or (if no arguments) print all variables.

shell, sh

Invoke the shell.

size

Print out the size of the characters in the specified list.

source file

Read commands from the specified file.

topmessage[,message, ...]

Print the top few lines of each specified message.

unaliasalias[,alias, ...]

Discard the previously specified aliases.

undeletemessage, [,message, ...]

Mark the specified messages as undeleted.

unreadmessage,[,message,...]

Mark the specified messages as unread.

unset option

Discard the specified option values.

visualmessage[,message, ...]

Use the display editor on each specified message.

write

Save message, but not the associated header.

z [-]

Move forward or backward [-] one windowful.

makemap

[-N] [-d] [-f] [-o] [-r] [-v] maptype mapname

Sendmail uses keyed maps for lookups. The makemap command creates and maintains the map database. maptype must be one of dbm, btree, or hash. Input is read from standard input and is formatted as:

key value

where key is the database key and value is the corresponding value, separated by white space(s).

Example: To input the contents of the /etc/hosts file to makemap, use

awk '/^[^#]/ {print $2, $1}' /etc/hosts | makemap

-N

Do not trim the null byte that terminates the string when creating the map.

-d

Permit duplicate keys.

-f

Do not translate (fold) uppercase letters to lowercase.

-o

Append to an existing file.

-r

Permit replacement of existing keys.

-v

Invoke verbose output.

mesg

[y|n]

This command specifies whether you will allow other users to write to your terminal.

Example: To turn off the other user's ability to display messages (via write, talk, etc.) to your screen, type

mesg n

mimencode

[-u] [-b] [-q] [-p] [file name] [-o outputfile]

Used to attach a binary file to a mail message. Reads from standard input (by default) and sends a base64 encoded version to standard output. If a file is specified, mimencode will use that, rather than standard input.

Example: To format the file spreadsheet.xls for attachment to a mail message and store it in ss.mme, use

mimencode spreadsheet.xls -o ss.mme

graphics/tip.gif

mimencode is more reliable than uuencode.

 

-q

Use the specified quoted-printable encoding, rather than base64.

-u

Decode standard input, rather than encoding.

-p

Translate decoded carriage return/line feed sequences into whatever the local newline convention is during decoding.

-o file

Send output to the specified file, rather than standard output.

rmail

user

rmail interprets incoming mail received via uucp. It collapses From lines into a single line of the form "return-path!finder" and passes the processed mail on to sendmail.

rwall

host [file]

The rwall command sends a message to all users logged in to the specified host. By default, the message is taken from standard input, but if a file is specified, that will be used instead.

Example: To send the message contained in the file go.away to users currently logged in to the host local.net, type

rwall local.net go.away

sendmail

[flags] [address ]

newaliases

mailq

[-v]

Sendmail is responsible for delivering messages to the intended recipients. It transports messages across networks as necessary, but it is not designed for contact with the end user, as other programs (mail, elm) handle that phase of the mail process.

Example: To invoke sendmail as a foreground daemon in verbose mode, use

sendmail -bD -v

-Btype

Specify the body type of the message. (Current legal values 7BIT or 8BITMIME.)

-ba

Specify ARPANET mode.

-bd

Tell sendmail to run as a daemon.

-bD

Tell sendmail to run in foreground as a daemon.

-bh

Display the persistent host status database.

-bH

Empty the persistent host status database.

-bi

Initialize the alias database.

-bm

Deliver mail in the usual way (default).

-bp

Display a listing of the queue.

-bs

Tell sendmail to use the SMTP protocol as described in RFC821 on standard input and output.

-bt

Run in address test mode.

-bv

Verify names onlydo not try to collect or deliver a message.

-Cfile

Tell sendmail to use the specified configuration file.

-dX

Set debugging value to X.

-Ffullname

Set the full name of the sender.

-fname

Set the name of the sender of the mail.

-hN

Set the hop count to the specified number.

-i

Ignore dots that are alone on lines by themselves in incoming messages. (This should be set if you are reading data from a file.)

-Ndsn

Set delivery status notification conditions to dsn, which can be one of these: never, failure, delay, or success.

-n

Specify no aliasing.

-Ooption=value

Set the specified option to the specified value.

-oxvalue

Set option x to the specified value.

-pprotocol

Specify the protocol used to receive the message.

-q[time]

Specify the interval at which to process the saved messages in the queue.

-qIsubstr

Limit the processing to jobs that have substr as a substring of the queue id.

-qRsubstr

Limit the processing to jobs that contain substr as a substring of one of the recipients.

-qSsubstr

Limit the processing to jobs that contain substr as a substring of the sender.

-Rreturn

Specify the portion of the message to be returned if message bounces (one of [full|headers]).

-rname

Same as -f (obsolete).

-t

Scan the To:, Cc:, and Bcc: lines for message recipients.

-U

Initial (user) submission. [Used with user agents (e.g. Mail, elm), but never with network delivery agents.]

-Venvid

Tell sendmail to set the original envelope id.

-v

Invoke verbose mode.

-Xlogfile

Tell sendmail to log all traffic in the specified file.

AliasFile=file

Tell sendmail to use the specified alias file.

talk user

[ttyname]

Sets up a talk session. When a talk session is open, you and another user can write directly to a section of each other's terminals. You can terminate the session by pressing Ctrl-C.

Example: To attempt to initiate a talk session with user Darrell, type

talk darrell

user

Specify the user to whom you wish to talk.

ttyname

Specify the tty with which you wish to open a talk session. (Useful when the other user is logged in more than once.)

uuencode

[-m] [ file ] name

uudecode

[-o outfile] [ file ]

The uuencode/uudecode programs are used to encode binary files for transmission over media that support only transmission of ASCII data.

Example: To encode the binary file program and mail to user someguy@wherever.com, use

uuencode program | mailsomeguy@wherever.com

-m

Use base64 encoding format.

-o

Write output to the specified file.

wall

[ message ]

Displays the specified message to the terminals of all users currently logged in. wall does not write to the terminals of those users whose mesg value is set to no.

Example: To send the message "Go away" to all users currently logged in, use

wall "Go away"

write

user [ttyname]

Display the specified message to the terminal of another user.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net