Article View: comp.mail.sendmail
Article #129Re: Sendmail on System V Rel 4 - Still Trying ??
From: Kevin Darcy
Date: Tue, 11 Aug 1992 22:23
Date: Tue, 11 Aug 1992 22:23
79 lines
3852 bytes
3852 bytes
In article <Bsstnn.HAq@world.std.com> sandyb@world.std.com (Sandy Bendremer) writes:
>We are (still) trying to get a working sendmail installation on System V
>Release 4. Our sendmail configuration file seems to test well, and we
>have sendmail running in the background. Locally originated and outbound
>mail work fine!!
>
>We seem to have some problems with rmail! When we replace /bin/rmail with
>the /usr/ucblib/rmail, all of our inbound uucp mail for local users is lost.
>The uucp control files X.xxxxx, etc look fine, but the messages just vanish,
>with no errors (that we know of). Inbound mail for other systems on our
>network is processed by sendmail and delivered?? Any ideas on how to
>correctly deliver the local mail would be appreciated!!
>
>If we use the original /bin/rmail, and tell the mailsurr file to route
>everything through sendmail, mail is delivered, but an extra From uucp
>header is added to the top of each message. The real from header follows,
>but is prepended with a > symbol (such as: >From bob@host.com). Why is this
>happening??
My theory is that the SMTP daemon is adding a From_ header, and the braindead
rmail isn't even LOOKING for a From_ header, so it just slaps one on anyway.
And, since the stock rmail is still basically a stone-age SysV/UUCP kinda
beast at heart, it doesn't grok any of the RFC822 headers either, so it thinks
everything is "message body", and therefore escapes the existing From_ into
">From". Then, this whole mess (both a From_ AND a >From_ header, in other
words) gets to sendmail, which stops its header-parsing once it hits the
">From", remedially adds some "Apparently-To:" and "Apparently-From:" headers,
etc. and voila! half your headers are now INSIDE your message, and the
remaining headers look goofy. Thanks, USL.
>Any help would be a BIG help!
I don't have a permanent fix yet, but there's always an ugly kludge. :-)
Change your /etc/mail/mailsurr to something like
'.+' '(.+)' '< /usr/ucblib/sendmail.wrapper \\1'
Then, in "sendmail.wrapper", or whatever, do something like
---
awk '{
if (NR > 2) {
print
next
}
if (NR == 1) {
firstline=$0
weekday=$3
month=$4
monthday=$5
time=$6
timezone=$7
year=$8
remote=$NF
next
}
if ($1 ~ /^>From/)
printf("From %s!%s %s %s %s %s %s %s\n", remote, $2, weekday, month, monthday, time, timezone, year)
else {
print firstline
print
}
}' | /usr/ucblib/sendmail $1
---
This will combine the double From_ headers into a single one, and keep
sendmail happy, until your vendor comes up with a permanent fix. At least,
we've been running this hack for a coupla weeks and haven't seen any major
problems yet...
------------------------------------------------------------------------------
kevin@cfctech.cfc.com | Kevin Darcy, Unix Systems Administrator
...sharkey!cfctech!kevin | Technical Services (CFC)
Voice: (313) 759-7140 | Chrysler Corporation
Fax: (313) 758-8173 | 25999 Lawrence Ave, Center Line, MI 48015
------------------------------------------------------------------------------
Technical Details
Message-ID:
<1992Aug11.222300.28744@cfctech.cfc.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!rphroy!cfctech!kevinReferences:
<Bsstnn.HAq@world.std.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!rphroy!cfctech!kevin From: kevin@cfctech.cfc.com (Kevin Darcy) Newsgroups: comp.mail.sendmail Subject: Re: Sendmail on System V Rel 4 - Still Trying ?? Keywords: sendmail SVR4 rmail Message-ID: <1992Aug11.222300.28744@cfctech.cfc.com> Date: 11 Aug 92 22:23:00 GMT References: <Bsstnn.HAq@world.std.com> Organization: Chrysler Financial Corp., Southfield, MI Lines: 79