Questions tagged [mail-command]
The mail, Mail and mailx command line utilities
122 questions
2
votes
1
answer
53
views
How to send a mail with text file as content and image as attachement
I want to send the content of file.txt as the body and file.png as attachment.
I only have mail cli (mail (GNU Mailutils) 3.10). No other software package can be installed, so Mutt is out of the ...
1
vote
0
answers
123
views
Send an email with an attachment using mail command line
I'm trying to send an email with an attachment using the command mail but neither option -a nor -A works.
With -a:
echo "Please, find attached the report" | mail -s "Report" -r &...
0
votes
0
answers
224
views
How do we add email classification or Sensitivity comparable to Outlook onto mail command on Linux
How do we add email classification onto mail command on Linux?
I'm currently using the following command:
mail -s "$(echo - e " Test\From:abc\nContent-Type: text/html")" -S -smtp=&...
0
votes
1
answer
998
views
mail: unrecognized option '-S' | sending mail from linux server
I am trying to run a bash to send emails from my linux server. I am using the following command:
echo "This is the message body" | mail -s "This is the subject line" -a "From: ...
0
votes
1
answer
782
views
How to make mail command to send email to root after installing msmtp?
Install a simple SMTP client:
sudo apt install msmtp msmtp-mda
Set in msmtprc
::
cat .msmtprc
account default
host smtp.qq.com
from [email protected]
auth on
tls on
tls_certcheck off
user [email protected]
...
0
votes
1
answer
321
views
Script to send an alert mail once the disk space is above 90% sends disk full even when the disk isn't full, how to resolve this issue?
#!/bin/bash
df -m > myfile
server_ip_address=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
if awk '$2 &...
0
votes
0
answers
1k
views
timed out while receiving the initial server greeting
I'm trying to host a postfix mail server.I have a box with a fixed IP and also a mx record and spf record that link my box IP to my dns record. I can telnet to alt4.gmail-smtp-in.l.google.com 25 but ...
4
votes
1
answer
204
views
Where are these "extra" RCPT_TO lines coming from when I send an email via SSMTP?
I've been using SSTMP on a local FreeBSD machine to send stuff like the output of certain cron jobs to my "real" main email account, which is not hosted on the same machine (or even domain). ...
0
votes
1
answer
305
views
How to print the entire contents of a sent mail for debug purposes?
I try to see the raw data of a mail that I sent with mail -s "My Subject" [email protected].
Is it possible, if so, how?
Expected output is similar to:
From: "root" <root@example....
0
votes
0
answers
37
views
mail sent in encoded format without any attachments
I am trying to migrate a certain script from AIX to Linux and having issues with the mail functionality. The rest of the script works fine, but the mail function is sending encoded mails with no ...
3
votes
1
answer
5k
views
How can I make GNU mailutils to use an external SMTP server?
Does anybody on this planet know what the equivalent GNU mailutils command to the following looks like?
Is this even possible without a local MTA with mailutils?
Using s-nail it works as intended.
s-...
0
votes
0
answers
781
views
Cannot get shell script to send error message as mail body
I have a shell script I want to email me when a particular command fails and send along the error message. Either it doesn't send an email at all, or it sends an email with an attachment named ...
1
vote
1
answer
754
views
mail command sends body as attachment, unlike normal email client? How to stop this?
I am using the mail command from mailutils on Ubuntu Linux 20.04. I am using it to send documents automatically to a service on the web which processes them. They provide an email address to which you ...
0
votes
1
answer
84
views
'If' statement breaking his own rule or I'm doing so
Explanation:
I'm playing a little bit with a script this one helps notifying to user about SSL certificate expiration. If certificate has less than 30 days to expires, this will notify to user, if isn'...
0
votes
1
answer
50
views
Increasing the width of messages listing in mail prompt
How to increase the width of listings in mail command prompt? Especially the message listing with the command h.
The current listing is truncated at 80 characters as showing below:
$ mail
Mail [5.2 ...