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.

179 questions
6
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:…
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 toaddress@domain.com like the normal one on Microsoft Outlook or gmail account e.g "Thomas" ls -l $HOME | mailx -r…
Mree
  • 61
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?
4
votes
1 answer

Change mailx mailbox location

On my computer, mail is stored in ~/Mailbox, not in a centralized directory. Is there a way to get bsd-mailx to read mail from there, instead of looking in /var/mail?
cpast
  • 328
4
votes
1 answer

How to send email attachment using mailx -a with a different attachment name?

We could do this using uuencode: uuencode actual_file display_file_name | mailx testemail@org.com Could you please advice how this can be done using mailx -a? The only option seems to be to copy file with a different name, and then try.
4
votes
1 answer

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 resend command, but I was wondering if it is possible…
3
votes
3 answers

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 mail like adffadf, i.e., the string is not a valid…
3
votes
1 answer

Sending attachments with mailx and uuencode

I am in the process of trying to run a script which usually sits on an AIX machine on its new host Linux node. The code I am running looks like this: (uuencode $path/info.dat info.csv; uuencode $RESULTS results.log) | mail -s "Info"…
mixiul__
  • 213
1
vote
1 answer

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 script executes the mailx command as root with no issue.…
1
vote
1 answer

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 plain text, and it looks sane. I would like to…
wemily
  • 113
1
vote
0 answers

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/TLS handshake failed: Unknown error -5938 on my…
chip
  • 153
1
vote
1 answer

ssl3 mailx and bounce

I have set some email server(postfix with tsl3) and i have reach the goal to remove ssl2 from it,but thunderbird works perfect,mailx no. I did echo prova|mail -S smtp-use-starttls user@domain and all mail are bounced said: 530 5.7.0 Must issue a…
elbarna
  • 12,695
0
votes
2 answers

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 But after pressing Enter nothing happens. Why?
0
votes
2 answers

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 echo "Hello" | mailx -a "test attachments" -a…
Gujju
  • 1
0
votes
1 answer

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").gz echo "Log file for project" | mailx -s "Log…
1
2