[comp.unix.questions] mailx <-> smail incompatibilities

riddle@woton.UUCP (Prentiss Riddle ) (04/09/88)

I am in the process of installing smail 2.5 on our AT&T 3B15 running
SVR2.1.1.  Our front end for mail is "mailx", the SysV clone of
Berkeley Mail.  We don't have sendmail.  I'm having a couple of
problems which someone out there may have insight into. 

(1) I would like to eliminate a long list of mail aliases from mailx's
"mailx.rc" file and put them instead in smail's "/usr/lib/aliases"
file, since smail is more flexible in its aliasing scheme and can
expand aliases in incoming network mail which mailx never sees. 

Unfortunately there's a hitch: if a user types "mailx foobar" where
"foobar" is an smail alias, mailx notices that there is no user
"foobar" on the system and exits with the error message "Can't send to
foobar".  However, if the user types "mailx woton!foobar" then mailx is
content to defer the interpretation of what it thinks is a network
address to the mail delivery program. 

Is there any way, short of keeping redundant alias lists in both the
"mailx.rc" and "aliases" files, to convince mailx to pass simple
unrecognized addresses on to smail?  (I'm encouraged by the fact that
I've also installed smail on our 3B1 UNIX PCs and haven't noticed this
problem with the 3B1 version of mailx.)

(2) Has anyone noticed a case of mailx developing indigestion when
replying to mail sent by smail?  Our mailx goes into an apparently
infinite loop if a user tries to reply with the "r" command to all
recipients of a previous message.  This generates a "To:" field like
"user1@host1.UUCP (John Doe ) user2@host2.UUCP (Mary Smith )".  My
guess is that the parenthesized names are the source of the problem,
but oddly enough this only occurs with multiple recipients -- a single
"user@host.UUCP (John Doe )" works great. 

-- Prentiss Riddle ("Aprendiz de todo, maestro de nada.")
-- Opinions expressed are not necessarily those of my employer.
-- riddle%woton.uucp@cs.utexas.edu  {ihnp4,uunet}!ut-sally!im4u!woton!riddle

james@bigtex.uucp (James Van Artsdalen) (04/11/88)

IN article <1040@woton.UUCP>, riddle@woton.UUCP (Prentiss Riddle ) wrote:
> Is there any way, short of keeping redundant alias lists in both the
> "mailx.rc" and "aliases" files, to convince mailx to pass simple
> unrecognized addresses on to smail?  (I'm encouraged by the fact that
> I've also installed smail on our 3B1 UNIX PCs and haven't noticed this
> problem with the 3B1 version of mailx.)

In your .mailrc file, add

set sendmail=/bin/mail

and mailx will stop trying to figure out if you've really got the named user
locally.  I personally use

set sendmail=/usr/local/lib/news/recmail

so that my .signature is appended to the mail (that's the usenet recmail).

> (2) Has anyone noticed a case of mailx developing indigestion when
> replying to mail sent by smail?  Our mailx goes into an apparently
> infinite loop if a user tries to reply with the "r" command to all
> recipients of a previous message.

I've never seen the "re" command work right.  I always use "Re" and manually
add other recipients.

BTW: If you try to use smail with SysVr3 mailx, it won't work, because the
SysVr3 mailx uses the new -s option to /bin/mail, which smail doesn't know
about.  I have a patch to svbinmail from smail 2.5 that correctly emulates
the -s option of /bin/mail, and passed the rest of the non-sending flags
to /bin/lmail (such as -F): in short, makes smail SysVr3 compatible.
-- 
James R. Van Artsdalen   ...!ut-sally!uastro!bigtex!james    "Live Free or Die"
Home: 512-346-2444 Work: 328-0282; 110 Wild Basin Rd. Ste #230, Austin TX 78746

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (04/11/88)

riddle@woton.UUCP writes:
   (1) I would like to eliminate a long list of mail aliases from mailx's
   "mailx.rc" file and put them instead in smail's "/usr/lib/aliases"
   file, since smail is more flexible in its aliasing scheme and can
   expand aliases in incoming network mail which mailx never sees. 

   Unfortunately there's a hitch: if a user types "mailx foobar" where
   "foobar" is an smail alias, mailx notices that there is no user
   "foobar" on the system and exits with the error message "Can't send to
   foobar".  However, if the user types "mailx woton!foobar" then mailx is
   content to defer the interpretation of what it thinks is a network
   address to the mail delivery program. 

That's a misfeature on the part of the latest release of mailx.
Defeat the misfeature by including `set sendmail=/bin/mail' in
/usr/lib/mailx/mailx.rc and the problem goes away, since mailx assumes
that if you have something willing to identify itself as `sendmail,'
it must have the guts to deal with an `unreal' user address.

You may also find it worthwhile to add `set noaddsopt' to mailx.rc for
reasons that become obvious after trying to deal with domain addresses.

   (I'm encouraged by the fact that
   I've also installed smail on our 3B1 UNIX PCs and haven't noticed this
   problem with the 3B1 version of mailx.)

3B1s are running an older incarnation of mailx, without the misfeature.

   (2) Has anyone noticed a case of mailx developing indigestion when
   replying to mail sent by smail?

Sorry, I've not seen that one.  We're running V.3.0 on our 3B2s.

--Karl

tim@acich.UUCP (Tim Lowe) (04/12/88)

In article <1510@bigtex.uucp>, james@bigtex.uucp (James Van Artsdalen) 
Asks advice on how to solve some mailx - smail problems

and...

In article <1040@woton.UUCP>, riddle@woton.UUCP (Prentiss Riddle ) 
Provided some sound advice on how to work around these problems.

I myself asked similar questions of a sysop that has been very
helpful to me and his response was "You can go to a lot of trouble
and work around all these problems or you can just install elm".

He sent me the sources, I learned to type "make" :-) and I haven't
had to ask for that kind of help since.

-- 
Tim L Lowe
Automated Concepts Inc.
UUCP: ..ihnp4!acich!tim
PSTN: 1-312-346-8640

naftoli@aecom.YU.EDU (Robert N. Berlinger) (04/12/88)

In article <1040@woton.UUCP>, riddle@woton.UUCP (Prentiss Riddle ) writes:
> (1) ...Unfortunately there's a hitch: if a user types "mailx foobar" where
> "foobar" is an smail alias, mailx notices that there is no user
> "foobar" on the system and exits with the error message "Can't send to
> foobar".  However, if the user types "mailx woton!foobar" then mailx is
> content to defer the interpretation of what it thinks is a network
> address to the mail delivery program. ...
> 
> (2) Has anyone noticed a case of mailx developing indigestion when
> replying to mail sent by smail? 

In answer to (1) -- put "set sendmail=/bin/smail" into /usr/lib/mailx/mailx.rc.
That tells mailx that there is a "non-standard" mailer and it doesn't
perform the pre-validation.  Aliases work fine.

(2) is more of a hard problem -- there are many bugs in mailx relating
to domain style addressing (not even fixed in 3.0!).  We live with them
(don't use 'r' but manually enter the reply address).  That's quality
software for you.
-- 
Robert N. Berlinger		    |        /------Preferred-------\
Supervisor of Systems Support	    |Domain: | naftoli@aecom.yu.edu |
Scientific Computing Center	    |UUCP: {philabs,cucard,ihnp4}!aecom!naftoli
Albert Einstein College of Medicine |CompuServe: 73047,741 GEnie: R.Berlinger

zeeff@b-tech.UUCP (Jon Zeeff) (04/12/88)

In article <1510@bigtex.uucp> james@bigtex.UUCP (James Van Artsdalen) writes:
>
>BTW: If you try to use smail with SysVr3 mailx, it won't work, because the
>SysVr3 mailx uses the new -s option to /bin/mail, which smail doesn't know
>about.  I have a patch to svbinmail from smail 2.5 that correctly emulates

I believe that adding "set noaddsopt" to /usr/lib/mailx/mailx.rc will also
cure this problem.






-- 
Jon Zeeff           		Branch Technology,
uunet!umix!b-tech!zeeff  	zeeff%b-tech.uucp@umix.cc.umich.edu

riddle@woton.UUCP (Prentiss Riddle ) (04/13/88)

Thanks to the several people who suggested the "set sendmail=/bin/mail"
fix (or "set sendmail=/bin/smail", which some preferred).  Mailx's
behavior in this instance is not that illogical -- if only it were
properly documented in the man page! 

As for my second problem (mailx getting confused by "(John Doe)"
usernames in "From:" lines), I kluged a workaround by removing the code
to generate said usernames from our local version of smail.  The change
is pretty simple, but if anyone wants it I'd be happy to share. 

-- Prentiss Riddle ("Aprendiz de todo, maestro de nada.")
-- Opinions expressed are not necessarily those of my employer.
-- riddle%woton.uucp@cs.utexas.edu  {ihnp4,uunet}!ut-sally!im4u!woton!riddle

tot@clinet.FI (Teemu Torma) (04/15/88)

In article <1510@bigtex.uucp> james@bigtex.UUCP (James Van Artsdalen) writes:
>BTW: If you try to use smail with SysVr3 mailx, it won't work, because the
>SysVr3 mailx uses the new -s option to /bin/mail, which smail doesn't know
>about.  I have a patch to svbinmail from smail 2.5 that correctly emulates
>the -s option of /bin/mail, and passed the rest of the non-sending flags
>to /bin/lmail (such as -F): in short, makes smail SysVr3 compatible.

Add `set noaddsopt' to mailx startup file for SVR3 mailx (mailx 3.0).
After that it does not use -s option to /bin/mail (or whatever is set by
`set sendmail=blaah').
-- 
Teemu Torma
City Lines Oy, Helsinki, Finland
Internet: tot@clinet.fi
UUCP: mcvax!santra!clinet!tot

olapw@olgb1.oliv.co.uk (Tony Walton) (04/26/88)

In article <621@clinet.FI>, tot@clinet.FI (Teemu Torma) writes:
> In article <1510@bigtex.uucp> james@bigtex.UUCP (James Van Artsdalen) writes:
....
> >BTW: If you try to use smail with SysVr3 mailx, it won't work, because the
....
> Add `set noaddsopt' to mailx startup file for SVR3 mailx (mailx 3.0).

We're using smail2.5 and SVR3.1, without 'set noaddsopt' in a mailx
startup file.  I have noticed a problem with the mailx on a 3B15 running
SVR2.1, in that the mailx won't allow addresses like tony.walton@foo.bar -
it just throws it out as an illegal (or unknown) address. mailx under SVR3.1
doesn't throw such addresses out, it passes the fullname to smail as it should.

-- 
Tony Walton, OEM/VAR Division, British Olivetti Ltd., Wellington House,
154-160 Upper Richmond Road, London, England SW15 2FN
LONDON, SW15 2FN.  Tel: (+44) 1 789 6699 Telefax: (+44) 1 785 6670 Telex:27258
Uucp : { ukc | mcvax!olnl1 | ihnp4!cuuxb | iconet | olhqma } !olgb1!olapw