Im facing a problem with sending tar file via mailx command. Your help would be much appreciated.
Im trying to tar a set of CSV files in a folder using the below command
and sending this tar file using mailx command as mentioned below
The problem here is, if all the CSV files are of size 0 byte, the tar file contains all the 0byte CSV files in the email attachment.
If any of the file size greater than zero, then the attachment contains files until a non zero byte file is encountered in the alphatebetically sorted list.
PS : i tried to ftp the tar file manually to windows and chkd it, and in both cases, all the CSV s files were present in the tar.
I know its confusing.. I've attached the email and the manually ftp'ed tar file for your ref
Looks like smethg is goin wrong in the mailx command.
Kindly share your inputs to fix the issue.
Also let me know if there are any other ways to zip and send all the CSV files as email attachment.
tar cvf does nut produce tar.gz files, for that you need tar zcvf if your tar supports that, or use gzip separately to gzip the tar file.. ux2dos only makes sense on unix style text files, not tar files or gz files..
This User Gave Thanks to Scrutinizer For This Post:
Hello,
I am facing an issue with email in Linux. I am using mailx command to send email.
When I give invalid domain address then it is taking both sender and recipient as sender email and trying to send email.
Below is my command
echo -e "${EMAIL_TEXT}" | mailx -v -s "${SUBJECT}" -r... (5 Replies)
Hi,
I am trying to send an email using mailx command in Linux terminal. Though I give invalid address it is giving response as Recipient ok and sent message. My command is here. Not sure what is wrong. Can anyone please assist?
echo -e 'New User'| mailx -v -s 'New User' y@gggg.com
... (1 Reply)
Hello,
I have a file temp.txt with the below contents :
Sep 9 03:04:51 adcsdp01 MAPDR2_00: Unable to open trace file adpstartarv.log. (Error 110 Resource temporarily unavailable)
Sep 9 03:05:35 adcsdp01 MAPDR2_00: SAP Service ADPMR2_00 successfully started.
Sep 9 03:04:51 adcsdp01... (7 Replies)
Hi All,
I have a situation where we need to send out mails from our Unix server to different mailing ids inside our scripts.The mails are working fine.But we have occasional issues where we are getting time out errors from the SMTP server while sending out mails.
Command that we are using... (3 Replies)
Hi guys
I am trying to send an email using mailx function and want the message body to appear on different lines.
My code is :
WT=`echo "Tapes are : $x Holder are : $y" `
echo $WT|mailx -s "Alert" xyx@abc.com
I want to receive the email like this:
Tapes are :2
Holders are... (2 Replies)
Hi all,
I know this issues has been discussed multiple times, i have gone through many such discussion but unfortunately i am still not able to solve the issue being faced.
I have configured the sendmail.cf with the smtp host name (Editing the entry starting with DS...)
Post that restarted... (7 Replies)
Hi All,
Can anyone please provide the command for sending an mail with attachment using mailx command.
Thanks in Advance :)
Regards,
Siram. (3 Replies)
Hi,
I am sending mail inside my script based on various conditions.
Here is the problem,
when there are more than one condion at a time, the mailx adds the messages into one ( at the time of the second mail)
example:
inner_fn ()
{
if ; then
echo "inner function mail" | mailx... (3 Replies)
Hiya... I've got a script on AIX 4.2 that sends an email, with an attachment, that has always worked happily in the past and has chosen today to stop working. It now throws up an error "/tmp/Rs13492: The file access permissions do not allow the specified action"
The /tmp/RsXXXXX file name... (2 Replies)
I've used "mailx -r return@address" before many times for automated scripts, but when I try to use it on FreeBSD, I get "mailx: illegal option -- r". Is there another version of mailx I should be using to get this to work? The full command I'm trying to run is:
mailx -s "Load Results $(date... (1 Reply)