Sunday, March 14, 2010

Mailing Services

Mailers are a set of UNIX® commands that provide command-line interfaces for users
to send and receive messages over the network. These interfaces, which are generally
referred to as Mail User Agents (MUA), communicate with a Mail Transport Agent
(MTA) to send mail messages to the appropriate destination, and receive messages
destined to the end user’s mailbox.

An MUA is a program that allows users to compose and read electronic mail messages.
The MUA provides an interface between the user and the MTA. An outgoing mail is
eventually delivered to an MTA for delivery, and the incoming messages are collected
from the MTA.

An MTA is a program that is responsible for delivering electronic mail messages. Upon
receiving a message from an MUA or another MTA, an MTA stores the message locally,
analyzes the recipients, and either delivers the message (for local addresses) or forwards
the message to another MTA for routing. In either case, the MTA can edit and add to
the message headers.

HP-UX systems use the Sendmail MTA and the elm, mail, and mailx MUAs.

Mailx Examples

echo "this is just for testing" | mailx -s"test" abc@yohoo.com

for files:

mailx -s "subject" recipient < file.txt


Sending Mail to a Local User

To check your local mailer or user agent, send a mail message to a local user (for
example, joe) on your system:

date | mailx -s "Local sendmail Test" joe

This must result in a message similar to the following being sent to user joe:
From joe Wed Aug 6 09:18 MDT 2002
Received: by node2; Wed, 6 Aug 02 09:18:53 mdt
Date: Wed, 6 Aug 02 09:18:53 mdt
From: Joe User
Return-Path:
To: joe
Subject: Local sendmail Test
Wed Aug 6 09:18:49 MDT 2002

An entry in your /var/adm/syslog/mail.log file must have been logged for the
local message transaction.

No comments:

Post a Comment