Questions tagged [mailx]

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

mailx is a command-line utility for reading and sending email. It is a variant of the traditional mail command that evolved into many incompatible versions. The mailx command is standardized in POSIX.

175 questions
67
votes
5 answers

dpkg cannot find ldconfig/start-stop-daemon in the PATH variable

I was trying to install bsd-mailx utility the package got installed however I am wondering about the error. This is the error I get: Preconfiguring packages ... dpkg: warning: 'ldconfig' not found in PATH or not executable. dpkg: warning:…
user87142
  • 679
  • 1
  • 5
  • 4
23
votes
1 answer

Difference between mail and mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS command but executing the same command from server B throws me…
Rhyuk
  • 1,095
  • 2
  • 8
  • 10
12
votes
1 answer

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 $ mail -optionToReadMail -mailNumber 1; which will…
sps
  • 1,396
  • 5
  • 15
  • 23
9
votes
2 answers

How can I bcc with mailx?

I'm trying to send unix mail (heirloom-mailx) via bcc. $ mail -V 12.5 6/20/10 My MTA is exim, which sends via Gmail SMTP. I can execute the following: echo -e "body" | mail -s 'subject' -b [email protected],[email protected]
Sparhawk
  • 19,561
  • 18
  • 86
  • 152
8
votes
2 answers

How to make cron send email with error log when script throws errors?

I have a cron job that runs a script that writes checks for errors in an sql database and writes the errors to a log file. The log file is supplied in the command to run the script. I only want to receive an email when the script finds errors, and I…
linuxuser
  • 81
  • 1
  • 1
  • 2
7
votes
1 answer

How to download all the e-mail messages from POP3 server to a single text file with mailx?

I would like to download all the e-mails in my old e-mail server. It uses POP3 and I'm interested in e-mails in "Inbox" and "Sent" folders. Once I have downloaded all the messages, I would like to make a script which lists all the e-mails between my…
Martin
  • 7,284
  • 40
  • 125
  • 208
7
votes
3 answers

HTML email from heirloom mailx on linux

I've been trying to work through sending a html email from mailx on a linux server. Few Notes: I have to specify a smtp server so therefore I cannot use sendmail (This is not something I can change on my end) I cannot install 3rd party things such…
FzZB03KCa46QeaU
  • 91
  • 1
  • 2
  • 8
7
votes
1 answer

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 set ssl-verify=ignore set…
watfordxp
  • 95
  • 1
  • 5
6
votes
2 answers

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 Ubuntu 18.04 and the following problem: mailx:…
Filip Parker
  • 163
  • 1
  • 1
  • 5
6
votes
1 answer

How to include the name in the to: address of the person you are sending mail to in mailx(UNIX-HP)

I am trying to use the mailx program to send an e-mail. I want the name of the person to be included in the [email protected] like the normal one on Microsoft Outlook or gmail account e.g "Thomas" ls -l $HOME | mailx -r…
Mree
  • 61
  • 2
5
votes
1 answer

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: mailx
nab
  • 153
  • 1
  • 5
5
votes
1 answer

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 read the manual page about pager, but none of these…
U. Windl
  • 1,095
  • 7
  • 21
5
votes
3 answers

what things i should know when using mailx command

I am using mailx command to send mail, I tried it by two ways.. mailx -s "This is Subject" toAddr < bodyFile.txt mailx -r "fromAddr" -s "This is Subject" toAddr < bodyFile.txt I am getting same error: send-mail: fatal: parameter inet_interfaces:…
firoj_mujawar
  • 315
  • 1
  • 3
  • 9
5
votes
2 answers

Sending HTML using mailx with postfix 2.6.6 and centOS 6.4

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. CentOS 6.4 MAU : Mailx MTA : Postfix 2.6.6 Postfix is…
AndyV
  • 53
  • 1
  • 1
  • 5
5
votes
2 answers

Get list of unread emails from Unix server

We are trying to get a list of unread emails from our Unix server using mailx -L. However, the email subject gets truncated if its length is greater than 25 characters. How can this be resolved?
user54930
  • 51
  • 2
1
2 3
11 12