1834481 Members
2997 Online
110067 Solutions
New Discussion

mailx truncate msg ...

 
SOLVED
Go to solution
Gerry Xie_1
Advisor

mailx truncate msg ...

Dear Guru,
I use mailx to send normal text msg. to my company's mail system.
the syntax is like this:
mailx -s "notification mail" xieg@dor.state.fl.us < plain_text_file
this has been working OK for long time. But recently, when the text file grown over 300K (in size), received contents be truncated in the middle.
why this happens ?? is this a sendmail configuration issue can resolved by changing configuration to allow large mail going ?? Or any other way to resolve this problem ??

Thanks very much in advance.
Primer
14 REPLIES 14
Steven E. Protter
Exalted Contributor

Re: mailx truncate msg ...

Shalom,

Check sendmail.cf. It does have somewhat human readable text about size limiations but the default is usually 2 MB.

More likely the messag is being trucated by the receiving system.

Also check the file /var/adm/syslog/mail.log for messages. If sendmail chopped the file, it will say so.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

checked /var/adm/syslog/mail.log, didn't find any error msg. even searched word "truncate", didn't find any return.

also, did a test send a much more longer (larger) plain text mail from outside internet (yahoo.com) mail system to our company's mail system. Delivered OK (not a single line missed).

In our Unix box under /etc/mail, there are 2 configuration files: sendmail.cf and Sendmail.cf, don't know which one should be the right one. But check both of them, not find and also don't know which part should be changed. they are all more then 2000 lines long. search the work "size" only find one parameter "MaxMessageSize" may related but it is talking about incoming msg. but not out going msg.
any idea ??
Primer
spex
Honored Contributor

Re: mailx truncate msg ...

Hi Gerry,

Make sure that your mail client is not filtering out part of the message. The way Outlook strips newlines comes to mind...

PCS
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

thanks.
but we are not using outlook.
we are using Novel's GroupWise as our company's email system.

this script is actually working OK for long time.
I have a script run on the Unix box to auto-report all Oracle DB's tablespace fullness status. As the tablespace getting longer and longer, the report is longer and longer also. So, it is a size issue but not a filtering issue.
Primer
spex
Honored Contributor

Re: mailx truncate msg ...

Perhaps your script doesn't scale well. For comparison, here's the script I use to accomplish the same thing:

set feedback off;

column TS_Name format a12 truncated;
column Total_Space format 999,990.00;
column Used_Space format 999,990.00;
column Free_Space format 999,990.00;
column %Utilization format 90.00;

SELECT to_date(sysdate) "Date",
Total.name "TS_Name",
total_space "Total_Space",
nvl(Total_Space-Free_Space, 0) "Used_Space",
nvl(Free_space, 0) "Free_Space",
nvl(100*((Total_Space-Free_Space)/Total_Space), 0) "%Utilization"
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) Total_Space
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_Name(+) = Total.name
ORDER by "%Utilization" desc

spool /tmp/tsutil.out;
/
spool off;

exit;

PCS
Steven Schweda
Honored Contributor

Re: mailx truncate msg ...

If you send the e-mail messsage to some
_reliable_ system, you might be able to
decide whether the problem is with the sender
or the receiver. Always having the
"company's mail system" in the test limits
the usefulness of the test.
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

Thank you very much for all your ideas.
But this still not worked here.
I have cut/pasted Spex's script into my script and run it. the results is same -- successfully finished in Unix box but mailx truncated the results in the middle.

It looks like the problem is on Unix (sender) side but don't know how to fix it.

Also did this test -- mailx a plain text file under $ORACLE_HOME/doc, which is very large, it trucated. However, if I cut/paste this large file to my Yahoo.com email and then send from Yahoo.com to my company's mail system, every bit received 100% complete.

?????????
Primer
Sandman!
Honored Contributor
Solution

Re: mailx truncate msg ...

Try attaching instead of sending it as part of the message body. If this works then it would help in isolating and troubleshooting the problem further i.e.

# uuencode text_file text_file | mailx -m -s "notification mail" xieg@dor.state.fl.us
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

thank you very much.

uuencode did worked!
every bit received.

However -- when open the attached file, the whole file becomes a SINGLE LINE. thus make it impossible to read.

this is not my day.
Primer
Sandman!
Honored Contributor

Re: mailx truncate msg ...

Run file through ux2dos(1) before sending it as an attachment via uuencode(1).

# ux2dos txt_file > winfile
# uuencode winfile winfile | mailx -m -s "notification mail" xieg@dor.state.fl.us
Steven Schweda
Honored Contributor

Re: mailx truncate msg ...

So, what happened? Did you have a line with
only "." on it where the message was
truncated?
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

thank you very much Sandman, this make it finally worked perfectly.
Appreciated.

I'll start assign points to all of you replied me.
Thank you all very much.
Primer
Gerry Xie_1
Advisor

Re: mailx truncate msg ...

All expert/guru friends helped me resolved problem.
Sandman made this thread a period.

Thanks all.

Sincerely
Primer
Sandman!
Honored Contributor

Re: mailx truncate msg ...

Well to me this indicates that some config needs to be changed on the client side i.e. the Novell Group Wise mail client in order to prevent it from truncating the message body greater than a preset byte size.

~cheers