Questions tagged [mailx]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
5 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: ...
-1
votes
0answers
16 views

Please Help i have a script which Searches for the string in logs and send email

I have a script , which searches for particular string in logs and send me an email notification .The script is working but its spamming the my inbox , what should i do to modify my script like if it ...
0
votes
1answer
30 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?
-2
votes
0answers
26 views

Shell Script Email Address Special Character [duplicate]

echo -e "Message Example." | mail -s "My Subject" -r "TOM<tom@eamil.com>" bb&my-Team@email.com bb&my-Team@email.com email has special character "&" and shell doesn't like it. ...
0
votes
1answer
16 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
44 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
43 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
62 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
70 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
52 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
32 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
61 views

Automatically forwarding new emails with mailx

I'm trying to figure out a way to have mailx automatically forward new emails. Essentially, I'm looking for something that might work as follow: List the id of all new emails Forward those emails ...
0
votes
0answers
123 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
710 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
341 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
1answer
418 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
35 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
34 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
461 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
184 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
23 views

Handle dead.letter queue on mailx

I have mailx installed on a Linux server. It used to work perfectly. From some reason, I had connectivy issue. So, all mail that tried to be sent went to the dead.letter file. After resolving my ...
0
votes
0answers
62 views

Sending Table using Mailx

Following is the content of my file results.txt VM Size -- ---- ABC - DEV - WinS16 - PASSANGER-LH.XXX.local 0....
0
votes
0answers
63 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
41 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
2k 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
756 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
179 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
3k 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
5k 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
781 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
187 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
758 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
187 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
81 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
2k 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
636 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 ...
1
vote
2answers
3k 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
568 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
36 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
7k 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
84 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
345 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?
3
votes
1answer
548 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
389 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
762 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
46 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
648 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 ...
1
vote
0answers
3k views

How to check whether I can send mail from my Linux server?

When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server? When I tried to see help for ...
4
votes
1answer
17k views

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 ...
1
vote
2answers
1k views

Forward email but change the FROM address

I have a postfix server running on an EC2 instance. I want to forward all email, via SES, to my personal inbox. The problem: AWS only allows a FROM address that is verified in the AWS console and the ...