Questions tagged [mail-command]

The mail, Mail and mailx command line utilities

2
votes
2answers
84 views

Create a script to check the date, time and string and trigger a mail

Need to create a script where I want to take the last few lines of the log file and check that the last line with Start Date contains the date of today and the time 17:00:xx and is followed by xxxxx ...
2
votes
2answers
416 views

How to get response from mail command

I am trying to send the send email using the mail command as mail -s "subject" email_address < email_text but how will I confirm whether email is actually sent or not ( i.e. email_address is ...
1
vote
1answer
320 views

Trouble sending email from the mail utility in Bash

I used the following command to send an email echo "Body of the mail" | mail -s "subject" "something@gmail.com" The first time I ran it, it returned an error saying the program mail is not installed....
1
vote
1answer
594 views

Can't send mail via sendmail

I'm trying send mail via sendmail, but mail is not received. Here is the command: /bin/cat /scripts/zabbix/test.txt | mail -v -s "Blocked IPs" example@example.com Here is the output example@example....
1
vote
1answer
45 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 ...
0
votes
1answer
34 views

How do I pass a script argument to a pipelined argument?

I have the following code and I wanted the argument to -s to include the first argument of my bash script. Currently it prints "$1" verbatim for subject though the message body has $1 evaluated ...
0
votes
1answer
639 views

How to receive new email?

mail -f /home/debian9/Maildir When new email coming,how to receive it in mailutils interface? There are 1 email in my /home/debian9/Maildir. Sent an email from admin to debian9 with command: echo "...
0
votes
1answer
1k views

sending alerts from linux machine through email to MS outlook exchange

I Have a Scenario. I have written a shell script who check the space of mount point '/u06'. if free space is greater then 20% then its OK or if free space is less then 20% then it should generate a ...
0
votes
1answer
100 views

Checking for mails

I recently started using mails via UNIX. I would like to create a script , that would write (every time I log in ) something like "The content of your mailbox has changed since last checkup" or ...
1
vote
0answers
24 views

mail command sends empty body if file attached

Whenever I attach a file to mail like: $ mail -A attachment.pdf -s"Subject" id@domain.com Cc: This body never gets sent. And hit Ctrl+d to send the mail. The attachment and the subject get sent, but ...
1
vote
0answers
25 views

18.04.1-Ubuntu: Mail command unable to set mail body with attachment

I am trying to use mail command to send 2 attachments. The issue which i am facing is unable to send attachment and mail body content. tried following command echo "Hello World" | mail -s 'Test Email'...
1
vote
0answers
76 views

How to monitor system with `snort` and send emails about `alerts`

PROBLEM: I have been configuring snort on my systems and would like to get emails from the systems if there are any alerts. What I have tried is swatch but I can't find much documentation on it, can ...
1
vote
0answers
34 views

Cause Code Not Implemented for Heirloom-Mailx

I am attempting to send an message with an attachment from my RP3 to my phone, which uses Sprint. I have Exim4 setup as a MTA and the Heirloom-MailX configured so I can send an attachment. I am using ...
1
vote
0answers
2k views

How to check whether I can send mail from my Linux server?

When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server? When I tried to see help for ...
1
vote
0answers
290 views

mail/mailx: How to specify recipents with full names?

Rich email clients allow users to be identified likewise: John Smith <jsmith@example.com> How can I use such format for recipients (or other email fields for that matter) with mail and/or ...
1
vote
0answers
181 views

BSD Mail - Single Sending Address

I've been working on sending HTML emails using BSD mail and so far I've been successful. I've even been able to modify, not change though, the sender. Current Command: cat $htmlFile | mail -s "$(...
0
votes
0answers
295 views

usr/lib/sendmail doesn't work

On one of our company server, suddenly /usr/lib/sendmail stopped working. We have a call to it in few scripts (owned and ran by oracle user) and none of them is able to send an email out, even ...
0
votes
0answers
537 views

how to read postfix mail from command line

I have setup postfix server and set home_mailbox = Mail/. How to make mail read mail from ~/Mail/. I tried ln -s ~/Mail /var/mail/$USER but mail complains Cannot open mailbox /var/mail/$USER: Is a ...
0
votes
0answers
65 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
0answers
3k 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 ...