The mail, Mail and mailx command line utilities
3
votes
1answer
21 views
sending emails with heirloom, even when Postfix is not running locally
Normally, I can send email from commandline, such as
echo hello | mail -s "subject" [email protected]
I have noticed that even when Postfix is not running on my machine, I can still "send" emails. ...
0
votes
0answers
22 views
Invalid mail alert
When I log in to Unix, I get new mail alert:
[YOU HAVE NEW MAIL]
I checked my mail and I don't have any:
$ mail
Mail [5.2 UCB] [AIX 5.X] Type ? for help.
"/var/spool/mail/userId": 0 messages
No ...
0
votes
1answer
41 views
How to save mails in Unix? [closed]
I wanted to save mail in unix in some directory, as we do in outlook (files are saved with .msg extensions). Is there any workaround for doing this.
2
votes
3answers
72 views
Standard and portable way to send email from console?
What is the most portable or standard way to send an email from the console or a script on Linux, and possibly Unix?
1
vote
1answer
51 views
Email file attachment from command line
I want to email the file returned by the following command as an attachment (on RHEL/CentOS):
ls -1 $(hostname -s)*.xml | tail -n 1
For example, the command above returns server-20140430080511.xml ...
5
votes
3answers
97 views
How to grab the oldest unread message from `mail` in a script?
In a script I am trying to finish writing now, I need to get the oldest unread message from the current user's mailbox (specifically, I need the subject line for this project).
After extracting the ...
2
votes
1answer
78 views
Block local (unix) users from sending mail
Is there a way to block a local/unix user (or a list of local users) from sending mails via mail command (or maybe even in postfix, which is the MTA I have).
2
votes
1answer
157 views
How do postfix and mailx interact with mbox locking?
If postfix is setup as the MTA using its virtual transport to deliver mail to a local mbox file (and handling delivery of outgoing messages), and mailx is the MUA, being used on that same computer for ...
4
votes
3answers
638 views
RHEL - Uuencode + mailx = gibberish
I understand uuencode is for encoding files, and mailx sends mail. However, I'm not exactly understanding...
Why uuencode file file | mailx -s "subject" email_adress keeps sending messages with the ...
2
votes
2answers
677 views
Mail command to send attachements
I tried the below command
uuencode data.txt | mailx –s “Test Mail” “[email protected]”
But I get the below error
ksh: uuencode: not found.
Null Message body; hope that' ok
which clearly tell that ...
1
vote
1answer
260 views
Maildir and mailutils?
I want to use the mailutils app on a install of Ubuntu 12.04.3 LTS with a Maildir format, but every time I run the mail command, the system looks in /var/mail/user, instead of the Maildir directory in ...
2
votes
2answers
173 views
Where do uncaught local emails go?
Suppose I run -
mail goldfish
There is no such account on the system and no such aliases defined, where would the mail go?
How do I see a list of such mails?
0
votes
0answers
471 views
How to set up smtp and send emails?
I'm new to raspberry pi.
I installed the raspian OS on it. I want to send emails from it using my gmail account. I want to send from the command line interface and from php scripts.
I followed this ...
0
votes
1answer
25 views
Weird logging behavior in Berkeley mail on a Mac
I use Berkeley mail (/usr/bin/mail) on an iMac. It has just started behaving in strange ways. If I type "~v", to open an editor, I get "[LogLevel VERBOSE]" or sometimes "[LogLevel DEBUG]" and the ...
1
vote
1answer
349 views
How do I track down the source of a ssh login message?
I installed mailutils on my linux machine with Linux Mint 15 (basically Ubuntu 13.04).
When I log in, I get the following:
Welcome to Linux Mint 15 Olivia (GNU/Linux 3.8.0-32-generic i686)
Welcome ...
5
votes
1answer
542 views
How can I bcc with mailx?
I'm trying to send unix mail (heirloom-mailx) via bcc.
$ mail -V
12.5 6/20/10
My MTA is exim, which sends via Gmail SMTP.
I can execute the following:
echo -e "body" | mail -s 'subject' -b ...
3
votes
2answers
622 views
Does the mail command require a mail server?
Does one need to set up a mail server before being able to use the linux mail command?
2
votes
1answer
530 views
mail doesn't work [duplicate]
I'm new to GNU/Linux and I want to send e-mail to other users on my computer (specifically from root to david). I've searched on google and I have tried the following:
# mail david
Subject: ...
4
votes
1answer
279 views
How can I set an e-mail's headers using /usr/bin/mail?
I have a bunch of scripts on an IBM AIX server's crontab that call the mail command to send myself an e-mail, kinda like this:
$ mail -r [email protected] -s "Results for `hostname`" ...
3
votes
3answers
329 views
How can I connect mail(1) to my Gmail/Yahoo/Hotmail account?
I would like to use the mail command in a shell script to automatically connect to my Gmail/Yahoo/Hotmail account and send/receive messages. How can I do this?
1
vote
2answers
682 views
set up local mail delivery to user from cron script
A line in my cron.daily script not work as expected. I haven't any special smtp mail server in system,
this line
rsync -avun --inplace /oneuser/file.xls /otheruser/file.xls| mail -s "$0 $?"
...
1
vote
1answer
458 views
Sending Emails from bash script in Solaris VM
I am trying to send emails using the following bash script:
/bin/mail -s "#subject" "$emailto" < "$message"
It works fine on my local machine but does not work on my VM.
I looked it up and read ...
5
votes
3answers
4k views
How to delete a range of mails in Solaris using the 'mail' command?
I have some 1k+ mails in an inbox (old cronjob stdout), how to delete them in bulk?
I'm on Solaris 8 and I have only mail available, no pine or mutt or similar "UI"-based client.
Inline help and ...
3
votes
1answer
3k views
Shell script hangs on mail command
I'm finding that a call to the mail command is causing a script to suspend without error. To close the script I have to ctrl-c or issue a kill command on the process id.
The pertinent section of ...
3
votes
2answers
401 views
Can not use mail command
error like this:
[user1@fedora ~]$ mail
No mail for user1
but that is appear Maildir(mailbox) in /home/user1.
4
votes
3answers
6k views
Setting headers using the /bin/mail command
I have a bash script that I use with nagios that sends notifications by email. The key part of it looks like this:
# $1 (FROM) | $2 (TO) | $3 (SUBJECT) | $4 (BODY)
/usr/bin/printf "%b" "$4" | ...
29
votes
3answers
26k views
How can I use the “mail” command?
I am not great at using the mail command on Linux. How can I get better? I don't even know what program this is. Is it pine? I doubt it. It is in /usr/bin/mail and when I start it is tells me that it ...
3
votes
2answers
2k views
Mail vs. mail what is the difference
what is this business about mail and Mail?
[On a centos box] Why mail does not work but wont return an error either while Mail works fine with the exact same syntax?
Mail is basically a link to mail ...
1
vote
1answer
177 views
Why doesn't the list command work in mail?
Why doesn't the list command work in mail?
When I try l or list, it doesn't work. It instead gives me a list of the valid commands, including list.
Commands are:
next, alias, print, type, Type, ...
32
votes
5answers
41k views
How do I send HTML email using linux 'mail' command?
mail -s "subject" [email protected] <test.html
works, but only for plain text email.
What is the correct way to send HTML email using the Linux command mail?