Questions tagged [mailx]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
12 views

Mail command stalls

I give the command $ echo "{{content}}" | mailx -s "{{subject}}" {{to_addr}} ^C^X^Z [1]+ Stopped echo "{{content}}" | mailx -s "{{subject}}" {{...
0
votes
1answer
58 views

Discriminating between log entries' timestamps from bash script

My Bash script executes as a cron job. It seeks a string within a log file and is supposed to forward the corresponding log entry by mail if found. My script works but floods me with already reported ...
0
votes
1answer
33 views

Sendmail Service Issue: “rejecting new messages: min free: 100”

For a test email with the following command (echo "Hi") | mailx -v -r from@something.com -s "Subject Test" -c cc@something.com to@something.com I get the following output in a ...
0
votes
1answer
44 views

What is the difference between sending carbon copies of mail message to other users and sending mail to multiple users at the same time

In Unix, the -c option in mailx command sends copy of message to other people and has the following syntax: mailx -s "Subject" -c "jpm,sumit" charlie < message.txt where jpm ...
0
votes
0answers
34 views

How to send email on linux with HTML content AND attachment?

I have Oracle Linux server 7.8, on which I am trying to explore programs which be used for emailing HTML content and also send an attachment. Let say I am in my home directory and i have the following ...
0
votes
0answers
22 views

mailx command splitting the file

I'm using mailx in a script to send a file to the recipient from a Linux machine. If the text file has few lines, mailx is working fine for sending the file BUT, if the attachment file has too many ...
0
votes
0answers
235 views

getting error “drop_privileges: setuid(207) failed” while sending test email in unix server

I am trying to send a email from unix box to my personal email using the below command mail -s "TEST_EMAIL" abc@xyz.com on pressing enter and writing the body hi this is a test email. Cc: vuy@abc....
0
votes
1answer
140 views

Mailx or mail command is not including the body when triggered via crontab

I created a script that checks the process of apache server and sends an email if the process is down. apache_down=`service httpd status | grep "inactive (dead)"` echo “$apache_down" | mailx -s “...
0
votes
0answers
259 views

MBSync Maildir++ to IMAP with subfolder in INBOX

I am trying to use MBSync to sync a local Maildir++ folder (dovecot mail data) into a remote IMAP mailbox. While it works in general, subdirs of INBOX are ignored. Config looks like this: ...
0
votes
1answer
49 views

I want to send one of the zip folder which consisit of 8 to 10 files, attaching via e-mail using Linux command

I tried with this command but no luck. echo 'These are contents of my mail' | mailx -s 'This is my email subject' -a /home/user/Desktop/data.zip mail_id@example.com Any suggestion?
0
votes
1answer
23 views

How do I make .xls Or .pdf appear in body of email?

I know how to attach PDF or XLS file to email as an attachment using Unix commands. I would like to know how to send these reports to email body, so that users can access it quickly, instead of extra ...
0
votes
0answers
57 views

Problem with sending Unix mail from home (because of Spamhaus block list?) [duplicate]

I have a script that sends a simple email at the end. When running it while my laptop is inside my university'e network, everything works just fine. However, when I send an email from home using a ...
0
votes
0answers
329 views

Sending email using mailx gives “Connection timeout” in logs

i am using mailx client (Postfix email server) to send emails but i always get the following error in /var/spool/main/root file: connect to yahoo.com[72.30.35.10]:25: Connection timed out I ...
0
votes
1answer
217 views

Attaching multiple files using bash and emailing it out using SWAKS or another program

I'm trying to: Attach multiple files into one email. Have the email sent out using a Gmail account with the current date and time in the subject header. I'm having trouble with the for a loop ...
0
votes
1answer
115 views

How to read mail using terminal?

I've set up my my smtp server using ssmtp which I set up as default. So now I can send emails using mail and I'm receiving them(checked on my phone), but I can't read them using mail, or by cat /var/...
1
vote
0answers
112 views

Unknown keyword `smtp-auth' when using --set=smtp-auth=login

I use a bash script to make some process, then send me a mail report. This works fine when I use a local postfix configuration, but this not works with smtp auth and I got the error «smtp-auth unknown»...
1
vote
0answers
50 views

Mailx command attachment style is different between platforms

On a virtual ubuntu box the mailx command has -a refers to the content headers and -f adds attachments. Whereas on my school's virtual machines (I think they run centOS) -a adds attachments. I tried ...
0
votes
0answers
224 views

how can we send an image in the body of the mail using any of the mail utilities in Linux

How can we send an image in the body of a mail with rich text / HTML. I tried to get from few of the links , but i am not able to get complete solution. I tried below code but no luck mpack -s "...
-1
votes
1answer
3k views

Unix command to send mail having subject from a variable

We have created a UNIX program which is used to send mails. In that program we are fetching the mail subject and body based on user inputs (through Oracle Concurrent Program) For example: The ...
4
votes
1answer
735 views

How can I read one message at a time from /var/mail

Lets say I have 5 messages in /var/mail/ and I want to read one message at a time and then do some string search in that mail before moving on to the next message. Is there a command that I can use to ...
0
votes
2answers
895 views

Install Postfix using Mailutils on Ubuntu 19.04 server for sending out mail only

I followed this tutorial: https://computingforgeeks.com/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04-lts/ I'm trying to setup a send only mail from my Ubuntu 19 ...
1
vote
1answer
70 views

Cron is not logging stderr in /var/mail/user

I have this user who have a lot of cron jobs and I expected it to log stderr in its /var/mail/user. Sample below cron entry is working as expected in a different server. * 30 * * * * /usr/local/bin/...
0
votes
0answers
90 views

Mails not going through with “Host not found” error

Mails are not going through from my postfix mail server and it is failing with below error Jun 21 07:53:23 node-002 postfix/error[23121]: 06899101C478: to=<blas@example.com>, relay=none, ...
2
votes
2answers
1k views

Debian mailx won't attach files to emails

(Note: I have seen this question, but it does not work for me) I am attempting to send an email with an attachment using Bash on Debian Stretch, using the mailx package (not mutt). My implementation ...
1
vote
1answer
486 views

mailx execution as non-root failing

I am running Oracle Linux 7 for the purpose of hosting an Oracle database. As part of this process I run a script that mails a log file at the end on a daily basis. Crux of my issue is that my ...
0
votes
0answers
64 views

How to fix “Account starting with zero”

Because this company uses Centrify, I made a local Oracle account starting with zero on another server so as not to conflict with the original. No problem except when my scripts email me I get: ...
0
votes
1answer
53 views

Compose a path from a file name. Send file through email

I want to send to my e mail account a mail with log from program execution. This file changes everyday and it's named like this log-20190703.gz My attempt: #!/bin/bash log_file=logs-$(date +"%Y%m%d"...
0
votes
1answer
3k views

Linux Mailx is creating a dead.letter and not sending email [closed]

I am having issues with sending emails from my Redhat6 linux server. Each type of mailing command sendmail/mailx creates a dead.letter in the users home directory. Examples of how I am sending ...
0
votes
1answer
1k views

-c and -b options not working in mailx in ubuntu

I was trying to send a mail from the shell script using the command mailx -s "TEST MAIL" -c "user_name ..." user<message.txt but it generates an error as unrecognized option -c ,the same happens ...
1
vote
1answer
229 views

Why does mailx see 0 messages in my mbox file?

I have an MBOX file created by dragging a folder from Outlook (For Mac v.16) into Finder (because the Export wizard in Outlook For Mac only generates OLM files). I can look at the MBOX contents as ...
0
votes
3answers
7k views

Trouble Sending file content in the mail body with mailx

I need to send an email using the mailx command. I am clear that the command would be the following by example: echo "Body message" | mailx -s "Sending mail with Mailx" -r "abc@mail.com" "abc@mail....
4
votes
2answers
7k views

Ubuntu 18.04: Error with mailx smtp - mailx: unrecognized option “-S'”?

I was trying to send an email to multiple persons using mailx (mailx (GNU Mailutils) 3.4). I did that successfully on a previous version of Ubuntu, v16.04, and the script was working fine. Now I have ...
1
vote
0answers
1k views

how to debug what's wrong with mailx

I'm trying to see what happening why my mailx is failing. I tried to run the mailx command locally with a debug flag but it just returns a empty carriage return. Once it showed me this error. SSL/...
0
votes
1answer
312 views

changes to /etc/mail.rc does not seem to take effect

there were some changes with our smtps server, specifically the port that we can use. as I have done before, I changed the details in /etc/mail.rc file. but when I run my script, there is a log in /...
0
votes
1answer
863 views

How can I save the result of mailx command in unix to read mails to a text file?

I want to save the unread mails to a text file in UNIX using a shell script. This shell script is executed frequently using crontab. I have tried with the below code: #!/bin/ksh mailx > mytest....
-1
votes
1answer
342 views

Mail command using for loop not reliable?

I have a test email account environment that I'm trying to fill with emails before running migrating tests. I've been trying to achieve this with the following bash script: for i in {1..1000}; do ...
0
votes
1answer
95 views

send email from terminal bad behaviour

I have the following script that i put togheter from the web, to send emails from terminal trough gmail. #!/bin/bash #sendGmail "FROM" "TO" "SUBJECT" "BODY" "ATTACHMENTS (optional)" FROM=$1 TO=$2 ...
2
votes
1answer
3k views

How to install heirloom-mailx on Ubuntu 14.04

I want to install heirloom-mailx on Ubuntu 14.04 My current /etc/apt/sources.list reads like this: deb http://archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://archive.ubuntu.com/...
-1
votes
1answer
819 views

Generating .XLS file as an output file of sqlplus query and sending that .XLS file as an attachment in email

I am generating output file (.xls format) from the below DB query- sqlplus -S -L user/pass@DB <<EOF | sed '/^$/d' >> home/test/query_output.xls set line 22000 set head off set feedback ...
2
votes
2answers
4k views

Send an image in the body of the mail using any of the mail utilities in Linux

I am trying to send an email from Linux server, I want to send an image, not as an attachment, that should be displayed in the message body. I tried. mailx -s "TEST mail" <MASKED>@mask.com <...
1
vote
2answers
750 views

Ways to add recipients in mailx

What options do I have for adding recipients to email when using mailx (or variations thereof)? The ones I know about are: Manually type email address character by character from memory Enter an ...
1
vote
1answer
37 views

How to retain retain et. al. in mail(x)

When entering personal preferences like retain me@example.com inside command line mail, how can I have these saved so they are reloaded the next time I start mail?
0
votes
2answers
11k views

how to send a mail with attachment using sendmail command in unix

This is how I try to send, email with sendmail command. echo "Dear user, please find the attached file. Thanks, Support team " | mailx -s "x12 extract for 837 transaction" -a $LogFilePath/file.csv $...
0
votes
1answer
93 views

Why claws mail can receive email instead of mail command?

mail -f /var/mail/debian9 /var/mail/debian9: 0 messages When mail -f /var/mail/debian9 executing ,the claws mail application is in off status. Now open the /var/mail/debian9 with claws mail. ...
1
vote
1answer
394 views

How to search my email containing some string in email'content?

The mail command can list email messages stored on my pc. How to search my email containing some string in email'content?
4
votes
2answers
792 views

Unattended upgrades won’t use mailx when run by Systemd

I have setup unattended-upgrades on servers running Raspbian (Raspbian GNU/Linux 9.4 (stretch)). Version of Unattended-upgrades: 0.93.1+nmu1 Updates work, but I am having problems with the email ...
0
votes
1answer
449 views

Getting error while using -c option in mailx command

I'm running a script to send a mail with few lines. Requirement is I need to add few people in cc. So I have created below scripts. For people who needs to be in TO and CC , I have created 2 ...
0
votes
0answers
814 views

Multiple html files in message body-mailx

I'm using pandas to get csv to html #!/usr/bin/python import pandas as pd import sys import json sys.stdout = open('output.html','wt') df = pd.read_csv('users.csv') print(df.to_html()) For another ...
1
vote
0answers
49 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 ...
3
votes
2answers
852 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 ...