Mailx

From Leo's Notes
Revision as of 07:25, 25 June 2013 by Leo (talk | contribs) (Created page with " By default, <code>mailx</code> will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, <code>mailx</code> will fail to ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 25 June 2013, at 07:25.

By default, mailx will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, mailx will fail to send the email.

This can be resolved by specifying a mail server directly, in the case below, the SMTP server:

mail -s "subject" -S smtp=smtp://smtp.home.steamr.com "recipient@home.steamr.com"

You can set the default SMTP server by defining it in /etc/mail.rc with the following line:

set smtp=smtp://smtp.home.steamr.com