Skip to main content

Questions tagged [mailx]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
44 views

While sending mail, the body of the mail lines are getting merged in unix

I have to send an email from my development server, the mail body is having some 20 lines. But Few lines are getting merged. I have tried no of scenarios (used mailx,mail & sendmail also) to avoid ...
user609203's user avatar
3 votes
1 answer
109 views

Uucp: copy...but not command execution allowed

I have setup a Unix machine with uucp (Unixware) connected via direct serial to Slackware machine. Using uucp. The copy works on Unixware uucp -m /usr/bin/view Slackware1\!/var/spool/uucppublic mailx ...
elbarna's user avatar
  • 12.8k
0 votes
0 answers
126 views

Mailx call in shell script suddenly sending blank messages

Similar to what was reported in posting, MAILX sends an email but with a blank subject and body text, I have an Oracle EBS 12.2 server that's using a concurrent program (java) to invoke a shell script ...
mattp's user avatar
  • 1
3 votes
2 answers
702 views

Light program (mini MTA?) for system mail (only sending/relay via external server with unattended-upgrades, cron, smartmontools, etc.)

I've come across different names in different places: Light MTA, Remote MTA, Smarthost, etc. Generally, I do not want to install a full-fledged mail server (such as sendmail, postfix, exim), but only ...
DarekH's user avatar
  • 97
1 vote
1 answer
492 views

How to include a display name when sending mail with mailx

I'm sending email from a script using mailx. The script is run daily by systemd, using .service and .timer files. For testing purposes I'm sending from the command line. The mail is sent with the ...
CatchAsCatchCan's user avatar
0 votes
0 answers
118 views

mailx configuration for Yahoo SMTP

I am trying to configure mailx to send an email out using my yahoo email address. I am getting the following error when I try to send an email: smtp-server: 550 Request failed; Mailbox unavailable ...
Patrick Windsor II's user avatar
0 votes
1 answer
163 views

"mailx -a x.txt ..." hangs, while "cat x.txt | mailx..." works

As described in the subject, mailx -a somefile.txt -s "blah blah" [email protected] hangs, while emails sent via cat somefile.txt | mailx -s "blah blah" [email protected] ...
RonJohn's user avatar
  • 1,144
0 votes
1 answer
623 views

send e-mail with mailx in a bash script waiting if needed for the outcome

I'm writing a bash script that sends an e-mail with attachment to the local user root. I noticed that mailx forks some helper program and terminates instantly with exit status 0 even when the command ...
basin's user avatar
  • 2,061
0 votes
0 answers
158 views

Having problem using uuencode in script

I am using below command and it works: uuencode stats.txt stats.txt | mailx -s "users" [email protected] But when I put same command inside my shell script, it does not work. I dont have email. ...
Drsin's user avatar
  • 1
0 votes
1 answer
8k views

How to mailx working with Content-Type: text/html

I've to send a HTML file with mailx command but when I receive the email with the mark up code showed like this : <HTML><HEAD><TITLE>Title One /TITLE> <STYLE> body { ...
dubis's user avatar
  • 1,460
0 votes
0 answers
68 views

Script hangs on slackware 15.0

I wrote the following simple script to automatically run aide and email the result. nice -n 12 aide -C mailx -s "AIDE Report: ${HOST}" ${ADMIN}@${SMTP} < /var/log/aide.log exit It works ...
Garnet's user avatar
  • 398
0 votes
2 answers
1k views

Why doesn't "EOT" end the message body and send the message when using "mailx"?

This is what I tried: $ mailx -s "test email" cloud Cc: "again and agina" . EOT Or, $ mailx -s "test email" cloud Cc: "this is the first email" << EOT ...
Richard Rublev's user avatar
0 votes
2 answers
932 views

Mailx attaching multiple files using wild card

I am looking for Unix script where I can attach multiple files having similar name. For e.g, on server I am having followings files: output2019_1.txt output2019_2.txt output2019_3.txt output2020_1.txt ...
Gujju's user avatar
  • 1
0 votes
1 answer
513 views

Oracle Linux postfix conf SMTP - Default sender 'from' issue

How do I specify a default sender 'from:' address in postfix config for emails through smtp? I'm trying to send emails through SMTP and a relay from two different servers with Oracle Linux 8 The ...
Ricardo's user avatar
0 votes
3 answers
2k views

Sending Zip files through mailx command

I have a zip file named : zip_final.zip I have to attach this file as a attachment and send the mail. Also, I have to display all the file_names present inside the zip file in the mail body. I have ...
Venkatesha Prasad S's user avatar
0 votes
1 answer
2k views

send multiple files as mail though mailx command

I have 3 file names present inside a .txt file I have to read all file names and send them as a attachment in a mail. Example: test.txt - (file name) -query1.dat -query2.dat -query3.dat I have to ...
Venkatesha Prasad S's user avatar
4 votes
1 answer
3k views

How to use s-nail with unattended-upgrades?

My ISP blocks port 25 and I want to send email after unattended-upgrades completes. I set things up so that I can successfully send mail with s-nail, but unattended-upgrades still isn't sending me ...
Erasmus's user avatar
  • 163
6 votes
1 answer
17k views

Install mailx on CentOS 9

I can't install mailx on CentOS 9. yum install mailx -y Last metadata expiration check: 0:04:13 ago on Sat 09 Apr 2022 07:55:59 PM UTC. No match for argument: mailx Error: Unable to find a match: ...
nab's user avatar
  • 163
5 votes
1 answer
372 views

How to avoid the "pager" in mailx?

Having many short mail messages in my inbox, it's quite annoying that even short messages are sent though a pager (less), requiring to press 'q' before I can view the next message (for example). I ...
U. Windl's user avatar
  • 1,493
2 votes
1 answer
51 views

How to run a few commands and have the output emailed once a day?

new person here. I would like to run uptime and bdf and have the output emailed to me. I have the mailx part down- /usr/bin/mailx -s "daily_update" [email protected] </home/...
Mountains792's user avatar
0 votes
1 answer
196 views

Mail sender address is not getting updated

I'm trying to send email, but I constantly get wrong sender email address. OS details: NAME="Ubuntu" VERSION="18.04.5 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME=&...
Mugil Karthikeyan's user avatar
0 votes
1 answer
230 views

Function call with stdin or /dev/null if empty

I'm trying to make a Bash function like this: function send_email { local DEFAULT_EMAIL='[email protected]' local email_subject="${1:-No subject line set, please check $0 on $(hostname -...
OstermanA's user avatar
  • 113
1 vote
1 answer
810 views

mail: How do I mark an email as unread?

I am using mail from GNU Mailutils to read the contents of a Maildir. For emails that have already been marked as read, is there a way to mark them as unread in mail?
Flux's user avatar
  • 2,978
0 votes
1 answer
106 views

Aix: why program mail ignore the mbox setting?

On AIX, I want the mail program to use /root/.mbox instead of default /root/mbox. I edit mailrc vim .mailrc set MBOX=/root/.mbox the result is not good mail Mail [5.2 UCB] [AIX 5.X] Type ? for help. &...
elbarna's user avatar
  • 12.8k
0 votes
0 answers
310 views

connection to blacklisted host DNSBL

I’m trying to build a mail server, but when I tried to check the if TCP Port 25 (outbound) is blocked or not I got the following root@mail:~# telnet gmail-smtp-in.l.google .com 25 Trying 74.125.71.27… ...
Ahmed Monem's user avatar
-1 votes
1 answer
520 views

Issue detecting running processes from shell script

Script: #!/bin/bash kafka=`ps -ef | grep 'kafka' | grep -v grep | wc -l` echo $kafka if [ $kafka<3 ] then echo "Hi Support Team, Kafka is down on QA/Dev server $hostname .Please take ...
Kamesh M's user avatar
0 votes
1 answer
37 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 ...
Luciano's user avatar
  • 1,159
1 vote
2 answers
11k views

Unable to send out emails from my Linux Host

Unable to send out emails from my Linux Host. Below is the command I try: echo "This is the message body and contains the message" | sudo mailx -v [email protected] -s "This is the ...
Ashar's user avatar
  • 511
0 votes
0 answers
311 views

How to properly use mailx to attach a file (not replace content)?

I am using $ mailx -V mailx (GNU Mailutils) 3.5 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free ...
divB's user avatar
  • 208
1 vote
0 answers
415 views

SMTP Server Mail Alerts using TLS and authentication

i am a bit new in using SMTP server Alert configurations on AIX 7.1 OS . i am currently using below syntax which is running fine : mail -s "Subject" "[email protected]" < /path/to/my/...
Black Virus's user avatar
0 votes
1 answer
110 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 ...
ragnar's user avatar
  • 1
0 votes
1 answer
343 views

mailx command in Linux

The below code is working fine in a Unix server for sending mail along with attachments from an array variable, i.e DISCARDED_FILE_NAME, but the same code is not working in Linux server, since -m in ...
Naga Sai Varun's user avatar
0 votes
1 answer
410 views

Sendmail Service Issue: "rejecting new messages: min free: 100"

For a test email with the following command (echo "Hi") | mailx -v -r [email protected] -s "Subject Test" -c [email protected] [email protected] I get the following output in a ...
pOrinG's user avatar
  • 145
0 votes
1 answer
208 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 ...
Esha's user avatar
  • 193
0 votes
0 answers
5k 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 ...
userx's user avatar
  • 103
0 votes
1 answer
1k 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 “...
Tony Jose's user avatar
2 votes
1 answer
2k 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: ...
Nitek's user avatar
  • 121
0 votes
1 answer
700 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 [email protected] Any suggestion?
Ramesh's user avatar
  • 21
0 votes
1 answer
317 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 ...
Sudhakar Nelapati's user avatar
0 votes
0 answers
105 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 ...
Gab's user avatar
  • 101
0 votes
1 answer
3k 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 ...
Rick T's user avatar
  • 357
0 votes
1 answer
1k 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/...
Eye Patch's user avatar
  • 113
1 vote
0 answers
637 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»...
Asenar's user avatar
  • 321
1 vote
0 answers
268 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 ...
Ryan Schaefer's user avatar
0 votes
0 answers
887 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 "...
Arya's user avatar
  • 316
-1 votes
1 answer
13k 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 ...
Bommi's user avatar
  • 25
4 votes
1 answer
2k 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 ...
OjasP's user avatar
  • 43
1 vote
3 answers
3k 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 ...
Patoshi パトシ's user avatar
1 vote
1 answer
230 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/...
Ykaly's user avatar
  • 73
0 votes
0 answers
395 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=<[email protected]>, relay=none, ...
Zama Ques's user avatar
  • 3,336