1828787 Members
2824 Online
109985 Solutions
New Discussion

sendmail

 
SOLVED
Go to solution
Steve_3
Frequent Advisor

sendmail

I configured one of my server to sendmail to the exchange server and it works great.

I configured the same configuration on another server and it receives it as an attachment. Why is this?

mailx -s "Subject" xxx@xxx.com < file

thx
steve
7 REPLIES 7
Dave Kelly_1
Respected Contributor

Re: sendmail

Can you detail what you configured in your /etc/mail/sendmail.cf file ?
CHRIS_ANORUO
Honored Contributor
Solution

Re: sendmail

Check for the version of sendmail that your are running. Vi the sendmail.cf file and search for the version number (DZ). Try and upgrade to 8.9.3.
Also try mailx -m username@hp.com < filename
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Dave Kelly_1
Respected Contributor

Re: sendmail

What version of sendmail are you using ?

Run the command

sendmail -d0.1
to find out.

You can trap the messages you are sending by editing your sendmail.cf file so that the DeliveryMode line becomes

O DeliveryMode=queue

Stop/restart sendmail and run your mailx command again.

This will stop messages from being processed immediately, you can then move them from /usr/spool/mqueue to another directory.
Each message is made up of 2 parts, a qf and df file. The qf file is the header, the df file is the body. Make sure you have both files.


If you do this on both the working and problem machine, you will be able to determine the differences between the 2 messages.
Kofi ARTHIABAH
Honored Contributor

Re: sendmail

Steve:

To answer your question, if you look at the headers of the two messages you receive, the one that comes as an attachment will have a content type something like:

Content-Type: text/plain; charset=X-roman8

the one that appears "normally" will have a content type of:
Content-Type: text/plain; charset=us-ascii

when exchange gets a message with a charset of us-ascii it is able to display it normally... otherwise, it appears as an attachment!

to fix it, on the machine that generates attachments, issue the following command:

# echo "charset=us-ascii" >> /usr/share/lib/mailx.rc
for system-wide

or
# echo "charset=us-ascii" >> $HOME/.mailrc
for a single user

to a man on mailx and search for mailrc (and also charset) for more information

Good luck
nothing wrong with me that a few lines of code cannot fix!
Berlene Herren
Honored Contributor

Re: sendmail

Steve, I think Kotfi has the answer. Also, make sure your binary and your sendmail.cf match. Run

#sendmail -bs

You should see something like this:Sendmail 8.9.3 (PHNE_18979)/8.9.3; Mon, 20 Nov 200
0 12:52:05 -0500 (EST)

(control C to escape)

The 8.9.3 after the / is the version .cf file.


Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
Rita C Workman
Honored Contributor

Re: sendmail

Because the syntax you gave will create that result.
You can read the detail at the below url, but to sum it up I would be willing to bet you have PHNE_15835 loaded on the one box. This server gives you MIME capability.
We use it send reports as true attachments (as opposed to within the body of the message) and incorporated the syntax with our production jobstreams. You may want to review the details:

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=05fc44ed089266ab79/screen=ckiDisplayDocument?docId=200000048789276

JUST AS AN FYI....to folks who do like this option. Make sure you don't by mistake download and configure PHNE_20505, because it will conflict with the MIME patch and you have to go back and remove it and reinstall the MIME (PHNE_15835) patch.

Regards
Steve_3
Frequent Advisor

Re: sendmail

Thanks.

-m did eliminated the problem.