1748285 Members
4065 Online
108761 Solutions
New Discussion юеВ

Re: Sendmail

 
Rachiel
Advisor

Sendmail

Hi,

I have sendmail configured on my system. This is apprently configured on the other systems too.

There is a script wich genetrates the sys_check report and saves it in the output file. Now mailx should attaches the output files and mail it to the windows outlook server, which is not happnning. The mail is send and received by Outlook Express but the attachment file does not come along with it.

Checks made by me:

a] checked if mailx is working.
b] checked windows outlook is working.
c] checked if the firewall has any blocking setup.
d] checked the script which is a similar deployment on the other functining servers.
e] Checked the hostname and "/etc/hosts"

Questions:

1] How does sendmail work or configured?
2] How does mailx work or configured?
3] What other areas should I look in to troubleshoot the problem?

Thanks
Rachiel

PS: I have read the man pages of sendmail, mailx and mailq.
6 REPLIES 6
Steven Schweda
Honored Contributor

Re: Sendmail

> The mail is send and received by Outlook
> Express but the attachment file does not
> come along with it.

Do I understand this? You can send e-mail
from the Tru64 system to wherever you're
trying to send it, and you can read it on
your Windows system, but the attachment is
missing?

If so, then 1) "sendmail is probably working
properly, 2) "mailx" is probably working
properly.

For 3), it might help to see your actual
"mailx" command, but my first guess is that
you have not created a file to send which
contains "the attachment file". Are you
using "mpack"?
Rachiel
Advisor

Re: Sendmail

Hi,

Sorry! I was not good enough to explain myself. But what I meant is that Outlook or for that matter any mail eg yahoo or gmail etc can receive the mail but the attachment (i.e. the text files) in the mail are not received.

1] the command used is
/usr/bin/mailx -s "${SUBJECT}" -r $SENDER ${TO} <<-EOF
Dear Sysadmin,


~< ! uuencode ${OUTFILE}.gz `basename ${OUTFILE}.gz`
~< ! uuencode ${OUTFILE_ERRS} `basename ${OUTFILE_ERRS}`
~.
EOF

rm ${OUTFILE}.gz
rm ${OUTFILE_ERRS}

2] Your guess is wrong. There is an attachment file and if u read my posting carefully it says that the same script functions on the other identical servers properly.

3] I am not using mpack. No questions in that area as it will not effect.

4] My Questions also says "in which areea I have to look into so as to troubleshoot".

I only want to know the log file in Unix too see what the mailx command is doing. I have already done the ground work.

Rachiel
Steven Schweda
Honored Contributor

Re: Sendmail

> 2] Your guess is wrong. There is an
> attachment file and if u read my posting
> carefully it says that the same script
> functions on the other identical servers
> properly.

Sure, it works where it works. The question
is, "What happens where it doesn't work?"
You didn't say what you were doing, so (bad)
guesses are about all you could expect.

Your e-mail message is composed on the fly,
"~< ! uuencode ...". What if there is no
output from "uuencode"? Using a "here
document" ("<<-EOF") means that you destroy
all the evidence of what happened. Put
something into a file (and don't delete it),
so you can see what happened.

> I only want to know the log file in Unix
> too see what the mailx command is doing.

There is no "mailx" log file. It's sending
what you tell it to send, but that may be
(almost) nothing.
Rachiel
Advisor

Re: Sendmail


Well I did try after modifying the code by not deleting the files. It did not work and the file is created normally.

Well I think ther is something wronge with the configeration of sendmail.

Thanks for the answere abt the log file. As I wanted to confirm.
Ivan Ferreira
Honored Contributor

Re: Sendmail

Have you tried sending hte mail using a perl script, like this:
http://www.cs.cf.ac.uk/Dave/PERL/node180.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven Schweda
Honored Contributor

Re: Sendmail

> Well I did try after modifying the code by
> not deleting the files. It did not work and
> the file is created normally.

"[N]ot deleting" _which_ files? I'm not
interested in these:

rm ${OUTFILE}.gz
rm ${OUTFILE_ERRS}

I'm interested in the actual data fed to
"mailx", which you were not saving in a file.
"~< ! uuencode ..." is fine if it works, but
what happens if it fails?

> It did not work

"It did not work" is not very informative.

> and the file is created
> normally.

Which file is "the file"? What's "normally"?

I can't see what you are doing, or what's in
your files. What I'd like to see is a file
with your e-mail message in it. Then, when
we know that you have a complete e-mail
message with the attachments attached, we
can worry about whether "mailx" is sending
it.