mailx is a command-line utility for reading and sending email

learn more… | top users | synonyms

0
votes
2answers
32 views

Uuencode is displaying the file contents in email body instead of attaching the file in the attachments

I want to send a simple text file as an attachment in an email. When the email is delivered, the attachment is missing, instead, the contents of the attachments are displayed in the email body. Need ...
1
vote
1answer
32 views

Calling mailx from crond

I had a problem that gmail was blocking emails sent using mailx. I solved this by setting up an appropriate ~/.mailrc, which looks like: set smtp-use-starttls set nss-config-dir=/home/theuser/.certs ...
1
vote
2answers
37 views

Shell shows I have mail, but how can I check it

When I startup the shell, it displays the message You have mail. and this is because I touched a file /var/mail/${USER} and wrote to it. But how can I check it? I use mail, but it shows me No mail ...
1
vote
1answer
30 views

How do I change FROM address using mailx on FreeBSD from command line?

I'm using following system: $ uname -a FreeBSD X 9.2-RELEASE-p17 FreeBSD 9.2-RELEASE-p17 #0 r282430: Mon May 4 13:59:58 PDT 2015 root@X:/usr/obj/usr/src/sys/R610 amd64 $ pkg info mailx mailx-0....
0
votes
0answers
27 views

What does the “pipe” command do in mailx?

When using the mailx command line utility, there is a command called pipe listed in the man page (although not visible when using the help command). What does this command do? I want to be able to ...
0
votes
2answers
67 views

Can't send mails with BCC using mailx “illegal option — b”

I'm trying to BCC e-mails through unix using the following command. echo "E-mail message" | mailx -r Senders@Address.com -s "E-mails Subject" ~b BCC_Receiver@Address.com But I get the error ~b... ...
0
votes
2answers
47 views

mailx execute successfully but not sending mail out

I'm using mailx and sendmail functions to send mail from set of solaris machine with different versions. And the script send mail for most of the machine. Still issue is there on sending out mail for ...
1
vote
2answers
32 views

IPV4 supportive mail function in linux

I'm working on a linux machine where changes are not allowed. But While I use sendmail function I'm getting following error. sendmail: warning: inet_protocols: IPv6 support is disabled: Address ...
0
votes
0answers
10 views

'agent-shell-lookup' does not work for mailx

I configured .mailrc as follows: set smtp-use-starttls set ssl-verify=ignore set smtp=smtp://smtp.mail.com:587 set smtp-auth=login set agent-shell-lookup-USER@HOST="gpg -d .password-store/smtp/smtp....
0
votes
1answer
34 views

can't send mail to domain prefixed username

How can I send mail to a local user with a domain prefixed username? Running SUSE Linux Enterprise Server 11.3 joined to an active directory domain with Heirloom mailx version 12.5 7/5/10 Scenario: ...
0
votes
2answers
79 views

Does postfix using mail command report if an email was unable to be sent to an address?

I am writing a program that will be sending external emails using postfix with the mail -s command and I need to verify that the email was sent to the specified address. In which case, I am curious ...
0
votes
1answer
27 views

Strange error on exit mail from hpux

My HP-UX mailer works fine; I can reach machines and send emails and also delete. But on exit from mailx, after deleting messages, I get rmmail: cannot unlink /var/mail/myuser Why? My permissions (...
0
votes
1answer
42 views

Executing command for sendmail not working

Good Day, I'm still new in Linux CLI and I'm using RHEL 6. I'm executing command for sending email via terminal. $ cat log.txt | mail -s "Logs" myemail@e.mail.com Hosted by outlook365 When I try ...
0
votes
1answer
74 views

too many connection to SMTP server in exim_mainlog, How to solve it?

It is a cPanel server and from /var/log/exim_mainlog, I can see that, there are too many connections to the server. Mostly the number of action connection will be less than 25. But even after ...
1
vote
1answer
27 views

mbox still shows mail messages after they have been deleted

I deleted all messages from my mail with mailx d MSGS, and now mailx shows no mail. But why does cat ~/mbox still show all of the supposedly deleted messages?
2
votes
2answers
250 views

Sending HTML using mailx with postfix 2.6.6 and centOS 6.4 [duplicate]

I'm trying to send an HTML email from our CentOS server to users. In the long run I'll be building a COBOL program that runs the command to send reports to the user. Here are a few details. ...
0
votes
1answer
43 views

Only send email if disk usages exceeds 80%

My script is: abc=$(df -h | sed s/%//g | awk '{ if($5 > 80) print "Alert "$0;}' | awk '{print $2,$6}') \ && echo -e "Dear All, \n\n$abc\n\nABC" \ | mailx -s "Disk partition" ...
3
votes
2answers
47 views

Control character handling in cron/mailx

I have a cron job which runs a long script producing lots of output. Some of the output is lines delimited by single carriage returns; when run from the command line, these make the successive lines ...
1
vote
1answer
106 views

How to extract date and calculate if it is within “x” days from today?

Currently I have file with structure as Foo Sign: blah SubFoo Sign: blah BarDate: 2017-11-31 Foo Sign: blah BarDate: Never Foo Sign: blah BarDate: 2016-12-20 Foo Sign: blah ...
0
votes
0answers
21 views

Linux - temporary mail file: Read-only file system [duplicate]

Being new to linux On Linux Server; When i try to execute mailx echo "Test Mail" | mailx -S smtp="ron.emaven.baya" -r "monitoring@bayatree.com" -s "Critical Issue**" -v "ranjan@bayatree.com" I ...
2
votes
1answer
101 views

Can't send local mail message between users on linux

In http://unix.stackexchange.com/a/21336/99621 it says that if you do echo 'body' | mail -s 'subject' myuser It will send a mail message to the myuser linux account on the local system that this ...
0
votes
0answers
76 views

Saving attachment from mail

I am using this command to send email with attachment and message body: echo "Message body" | mail -s "Temat" -a myFile student7 And this is how I try to extract this file (inside mail): ? s file ...
2
votes
1answer
903 views

use 'mail' to read email from command line

I know we can use mail command in terminal to start using the mail program in interactive mode. However, I want to read the email using mail command non-interactively. Is there a command like $ ...
0
votes
0answers
51 views

Mail from another server

On my development UNIX server mail server is not installed. I want to mail a file everyday which I create on development server. Now I am doing it manually by copying file to another UNIX server ...
2
votes
1answer
91 views

how to set Internal Variables in mailx in linux?

save internal variable enable saving of messages in the dead.letter file on interrupt or delivery error.The default is save. problem: default is save so dead.letter file is created at home directory, ...
1
vote
2answers
914 views

dead.letter issue on Linux?

I am sending mail to a list of users, using the mailx utility: mailx -s "$SUBJECT" "$TO" < $FILE It is working fine with valid emails, but I am getting a dead.letter issue when I try to send ...
0
votes
0answers
603 views

mailx cannot send mail through gmail any more?

mailx -v -r "${USER}@gmail.com" -s "This is the subject" -S smtp="smtps://smtp.gmail.com:587" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp-auth-user="${USER}@gmail.com" ${USER}...
0
votes
1answer
216 views

Can I specify a command line recipient using bsd-mailx and Debian 8?

I usually configure exim4 and bsd-mailx to send mail, via GMail or Google Apps, on my Debian machines. I use a very simple mail sent by smarthost; no local mail Exim configuration. I've always ...
0
votes
2answers
329 views

Installing mailx on ubuntu 14.04.2

So I've installed mailx but I'm unable to get it to send an e-mail. I do the following: mailx -s "Test" To: myemail@email.com Cc: "This is a test." CTRL-D (does not work) CTRL-D does nothing. It's ...
0
votes
0answers
983 views

How to set mail subject using variable and ensure attachment is not included in email body

I have the following shell script fragment. var_name='ZZPCI' for emailadd in `cat /tmp/email_list.tmp` do subject_text="Subject with Var Name "$var_name subj_text_novar="Subject without Var ...
-2
votes
1answer
106 views

Mailx command help in UNIX [duplicate]

Please advise how to send body content template to DL groups using MAILX command. Ex:- Whenever process is down,i need to send to email with body content to all the DL groups.
1
vote
2answers
105 views

Unable to send email using mailx in Light ubuntu vmware

I am getting the following error while trying to send an email using mailx command used: uuencode Final_report.html $(date +"%Y-%m-%d")_report.html |mailx -s "Test of monthly report from ${HOSTNAME}"...
2
votes
1answer
359 views

Using mailx without storing a password

I'm trying to setup mailx to use my Gmail account. I've found a configuration that can send mail successfully but it requires me to store my email password in a configuration file in my home directory....
0
votes
2answers
84 views

Using an ASCII file in mailx

I have a ASCII file with Unix user names. How can I mail this list to everyone on the list itself? I do not want to use an alias. I was trying to cat the file to a mailx string but it was not working. ...
1
vote
1answer
2k views

root can't send mail (apticron) but user can (mail/mailx)

I'm running Debian I've set up ssmtp as my MTA and this works perfectly I can send mail using both mail and mailx with a standard user account BUT... When I run sudo apticron I get: send-mail: RCPT ...
2
votes
2answers
222 views

check “newness” / “is-read” of /var/spool/mail/$USER like pam_mail for custom motd script

How can I check with bash or python (preferred) if there are some unread mails in /var/spool/mail/$USER like pam_mail does? I'd like to use this for my own custom motd script, motd.dynamic
0
votes
1answer
298 views

Modify date in email header using script with mailx

I am trying to modify a script which grabs data from a database and puts it into the message of an email which is then sent out using mailx. What I need to do is grab the date which is in the first ...
0
votes
0answers
70 views

What mail variable is needed to make sure I receive a copy as well when emailing an alias

The alias includes a list of addresses and includes mine as well what mail variable do I need to make sure I still receive a copy of the message as well?
1
vote
1answer
227 views

exim4 on debian 7.8 sent mail never arrives @gmail

I followed the instruction on this page Debian Exim and configured my exim with a single file via the dpkg-reconfigure exim4-config setup. Now I can send mails between local users (from root to ...
3
votes
1answer
151 views

Can I resend a message with (plain) mailx?

Say I receive a message with an attachment, and all I want to do is to resend this message to another address. Is it possible to do this using plain mailx? If so, how? I know Heirloom mailx has a ...
1
vote
0answers
197 views

How to display entire subject line in `mail`?

There are two messages in /var/mail/test. mail Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/test": 2 messages 2 new >N 1 test@test Tue Feb 17 15:07 18/628 *** SECURITY ...
0
votes
1answer
276 views

How to send an email using mailx so that From and To appear correctly in the email?

I need to send an email from my Ubuntu 12.04 machine. I am using mailx command to do that. Below is the command I am using which works fine. echo "Test server started at `date +"%F %T"` on `hostname -...
2
votes
2answers
928 views

Mailx with multiple uuencode attachments and body

I am sending multiple files using following line in my script find . -type f -name "Sum*pdf*"|while read name; do uuencode "$name" "${name##*/}"; done | mailx -s "North Bus Correction" $RECIP Now I ...
0
votes
1answer
49 views

Why do I get mail when I unplug my adapter?

Usually I only get the terminal output You have new mail in /var/mail/$USER after running certain upgrades but I've started getting it every couple days after running other commands, seemingly at ...
-1
votes
1answer
466 views

Show the content of a file in the mail body

I am writing a script where it shows the content of file in the body of the mail. But i am getting error while I am executing it. RECIP="abc@gmail.com" lines=`wc -l $HOME/totals` if [ $lines == 6 ];...
2
votes
1answer
1k views

Is there any way to check email sent success acknowledgement?

I need to send the generated CSV files on regular intervals using script. I am using UUENCODE and mailx for the same. But i need to know that is there any method/way to know that email sent ...
1
vote
1answer
213 views

can i get imap access using just postfix and mailx?

I have postfix and mailx installed on a CentOS 7 server. I am able to send and receive email from the command line using the mailx command. I am also able to read email in each user's inbox using ...
2
votes
2answers
351 views

Why does uninstalling sendmail install exim, and uninstalling exim installs xmail?

I just set up a VPS with Debian 7 x64, and removed Sendmail along with some other programs. When it removed Sendmail, it also installed Exim. When I removed Exim, it installed xmail. Is there any ...
0
votes
0answers
2k views

What is the maximum size for attachment using unix mailx

I am using RHEL 6.4. I have a script which runs in bash. The script sends an email using: mailx -a report.txt "Monthly Report" "business@user.com" < messageBody.html where report.txt is a pipe ...
1
vote
1answer
278 views

Debian: exim, Maildir and mail

I have exim installed and configured as "internet site; mail is sent and received directly using SMTP". Mail is stored in /home/*user*/Maildir and it is really there. I can send and receive mail ...