Hello,
I was using a shell script for sending contents of a text file(email.report) to different users.
I was using the below command in my script to send email...
It was working fine all these days but now all of a sudden it stopped to send emails...
when i treid to send the mail using below command I will get the mail within a sec.
but when I tried include the contents of the text file(as shown in the first code) the mails are not going.
What may be problem?? Why this happend suddenly when the mails are going properly before.. and how to solve this? Pls pls pls help me...
Regards,
Deepak.
Well, something must have changed between the mailx command and der recipients mailbox. We have to check all steps to see, where things go wrong.
The first step ist the mailx command, which does not output any errors. OK.
The next is your local MDA. Please check its logfile (like /var/log/syslog on Solaris or /var/log/mail.log on Linux). Are there any traces of your mail in this log, especially if the mail was delivered to the next upstream mailserver? A message like "Mail accepted" would indicate, that the problem is not on the sending server.
Good that you can get the email. Looks like your MTA does not like heavy emails. I guess the file is not too big. Check the size email.report
$ du -h email.report
if your "du" does not like -h option just try without it.
If you see the size of file is too big in GB's then size is the problem. If size is not too big then example less than 20-30 MB then there might be some other problem.
Also check the logs of your MTA usually in /var/log/sendmail etc etc ...
Two ways to solve: (I like 2nd way)
Try the max number of lines your MTA likes
$ tail -n 1000 email.report | /usr/bin/mailx -s $REQ_SUBJECT -h 5 abc@xyz.com
# increase 1000 in step of 1000 till the time you dont get email.
# Also can try with size check main tail
Method 2:
If you still need the file in email and dont mind as attachment try this
then i tried with ur 2nd method of tarring and sending it as attachment but to my badluck i didnot get the email
---------- Post updated at 10:31 PM ---------- Previous update was at 10:26 PM ----------
all these days it was working fine y all of a sudden it happened like this? is there any space problem?? i dont know much about unix ... i just use this tool for sending auto email after completing my work...
if i just type mail in my unix prompt i can see lots of old mails... do u think that is creating problem??
---------- Post updated at 10:33 PM ---------- Previous update was at 10:31 PM ----------
and about your first method i didnot get mail in the first attempt itself i mean for 1000 itself i didnot get the mail
now i have deleted all the mails which were there in the my unix.. but still my mails are not going... i mean those text files which are having more than 85 lines i am unable to send it..