Gnus development mailing list
 help / color / mirror / Atom feed
* How does gnus talk to sendmail
@ 2006-12-03 20:28 reader
  2006-12-04  3:28 ` Dave Goldberg
  2006-12-04  9:09 ` Reiner Steib
  0 siblings, 2 replies; 11+ messages in thread
From: reader @ 2006-12-03 20:28 UTC (permalink / raw)


Setup:
   Gentoo linux 2.6.18 
   sendmail 8.13.8
   several week old cvs gnus

I've just let gnus find sendmail for years for sending mail but
suddenly am getting an error:

  `no such program as /usr/lib/sendmail'

I'm not really sure what OS changes have caused this.. there was one
semi major upgrade since I last sent mail from this gnus.  I haven't
sent mail from this machine for probably 2 wks. or more so not really
sure about changes.

I fixed the problem temporarily by symlinking 
 /usr/lib/sendmail -> /usr/sbin/sendmail

But I wondered why gnus thinks sendmail is at /usr/lib/sendmail and
where it is told that information. 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-03 20:28 How does gnus talk to sendmail reader
@ 2006-12-04  3:28 ` Dave Goldberg
  2006-12-04 14:14   ` gdt
  2006-12-04  9:09 ` Reiner Steib
  1 sibling, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2006-12-04  3:28 UTC (permalink / raw)


/usr/lib/sendmail has been the traditional place for sendmail for a
long time, so it's a reasonable default.  The project that's trying to
standardize paths for applications in linux (sorry, it's late here and
I've just finished 6 hours in the car so the name escapes me) wants to
restrict /.*lib to libraries and /.*bin for apps (I'm probably
oversimplifying and thereby offending someone but what the heck I
don't think I'm being judgmental about it).  For now you should just
adjust the variable sendmail-program in your .emacs.  Eventually I
imagine someone will figure out how to have Emacs and/or Xemacs et al
figure it out at startup time.
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-03 20:28 How does gnus talk to sendmail reader
  2006-12-04  3:28 ` Dave Goldberg
@ 2006-12-04  9:09 ` Reiner Steib
  2006-12-04 19:04   ` reader
  1 sibling, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2006-12-04  9:09 UTC (permalink / raw)


On Sun, Dec 03 2006, reader@newsguy.com wrote:

> Setup:
>    Gentoo linux 2.6.18 
>    sendmail 8.13.8
>    several week old cvs gnus
>
> I've just let gnus find sendmail for years for sending mail but
> suddenly am getting an error:
>
>   `no such program as /usr/lib/sendmail'
[...]
> I fixed the problem temporarily by symlinking 
>  /usr/lib/sendmail -> /usr/sbin/sendmail
>
> But I wondered why gnus thinks sendmail is at /usr/lib/sendmail and
> where it is told that information. 

All the code in `message.el' (Gnus) and `sendmail.el' (Emacs) prefers
/usr/sbin/sendmail over /usr/lib/sendmail, AFAICS.  Maybe a you have
set `sendmail-program' in your (site) init files?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-04  3:28 ` Dave Goldberg
@ 2006-12-04 14:14   ` gdt
  2006-12-04 18:51     ` reader
  0 siblings, 1 reply; 11+ messages in thread
From: gdt @ 2006-12-04 14:14 UTC (permalink / raw)
  Cc: ding

  /usr/lib/sendmail has been the traditional place for sendmail for a
  long time, so it's a reasonable default.  The project that's trying
  to standardize paths for applications in linux (sorry, it's late
  here and I've just finished 6 hours in the car so the name escapes
  me) wants to restrict /.*lib to libraries and /.*bin for apps (I'm
  probably oversimplifying and thereby offending someone but what the
  heck I don't think I'm being judgmental about it).

NetBSD's hier(7) documents similar rules for /{usr/,}{lib,bin}.

I think /usr/lib/sendmail was the traditional place in 2.8BSD and
4.0BSD.  In BSD land, it's been in /usr/sbin/sendmail for quite some
time, I think since 4.3BSD or 4.4BSD in the early 90s at the latest.
In NetBSD, there's /usr/sbin/sendmail which is really mailwrapper(1)
to choose among available MTAs, and sendmail itself is in
/usr/libexec/sendmail/sendmail.  But, /usr/sbin/sendmail is what emacs
should be calling.

I haven't had any problems with emacs calling sendmail incorrectly as
long as I can remember.

{I realize you probably know most of this, but for the benefit of the
person having trouble:}

Reading the sources (21.4, in lisp/mail/sendmail.el), I see some
amusing workarounds for SunOS 4.  Bit, I also see /usr/lib/sendmail as
a default if sendmail-program is not defined.
paths.el sets sendmail program by looking for sendmail in various
places:

(defconst sendmail-program
  (cond
    ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
    ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
    ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
    (t "fakemail"))			;In ../etc, to interface to /bin/mail.
  "Program used to send messages.")

So all looks well, on both modern and old systems.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-04 14:14   ` gdt
@ 2006-12-04 18:51     ` reader
  0 siblings, 0 replies; 11+ messages in thread
From: reader @ 2006-12-04 18:51 UTC (permalink / raw)


gdt@work.lexort.com writes:

> Reading the sources (21.4, in lisp/mail/sendmail.el), I see some
> amusing workarounds for SunOS 4.  Bit, I also see /usr/lib/sendmail as
> a default if sendmail-program is not defined.
> paths.el sets sendmail program by looking for sendmail in various
> places:
>
> (defconst sendmail-program
>   (cond
>     ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
>     ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
>     ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
>     (t "fakemail"))			;In ../etc, to interface to /bin/mail.
>   "Program used to send messages.")
>

That source file should have found my sendmail at /usr/sbin/sendmail
so I should not be having this problem, but I am.

Checking lisp/mail  I see both sendmail.el.gz and sendmail.elc so this
stuff should be loading.

I've forgotten how to check if the source file is loading.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-04  9:09 ` Reiner Steib
@ 2006-12-04 19:04   ` reader
  2006-12-04 21:12     ` Dave Goldberg
  0 siblings, 1 reply; 11+ messages in thread
From: reader @ 2006-12-04 19:04 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Sun, Dec 03 2006, reader@newsguy.com wrote:
>
>> Setup:
>>    Gentoo linux 2.6.18 
>>    sendmail 8.13.8
>>    several week old cvs gnus
>>
>> I've just let gnus find sendmail for years for sending mail but
>> suddenly am getting an error:
>>
>>   `no such program as /usr/lib/sendmail'
> [...]
>> I fixed the problem temporarily by symlinking 
>>  /usr/lib/sendmail -> /usr/sbin/sendmail
>>
>> But I wondered why gnus thinks sendmail is at /usr/lib/sendmail and
>> where it is told that information. 
>
> All the code in `message.el' (Gnus) and `sendmail.el' (Emacs) prefers
> /usr/sbin/sendmail over /usr/lib/sendmail, AFAICS.  Maybe a you have
> set `sendmail-program' in your (site) init files?

No mention of sendmail in any init files 
(.gnus .emacs ../site-start.el)

So unless the gentoo os has its own emacs init files someplace it
isn't coming from init.   

I build emacs myself (don't use the gentoo OS installer) so should not
have any problems from OS specific init files.   And don't see any
installed. 

What is puzzling is that it suddenly doesn't know where sendmail is.
Like others who have posted on this... I've had no problem for years
with emacs/gnus finding sendmail.


GNU Emacs 22.0.90.1 (i686-pc-linux-gnu, X toolkit) of 2006-11-15 on
reader:  

Should be loading ../lisp/mail/sendmail.elc which in turn
should be finding sendmail at /usr/sbin/sendmail.


  (defcustom sendmail-program
  (cond
    ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
    ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
    ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
    (t "fakemail"))        ;In ../etc, to interface to /bin/mail.
  "Program used to send messages."
  :group 'mail
  :type 'file)

ls -l /usr/sbin/sendmail:
-r-xr-s--x 1 root smmsp 647832 Aug 12 10:50 /usr/sbin/sendmail
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-04 19:04   ` reader
@ 2006-12-04 21:12     ` Dave Goldberg
  2006-12-05 15:40       ` reader
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Goldberg @ 2006-12-04 21:12 UTC (permalink / raw)


The reason is that for all those years, even with sendmail's preferred
place having moved to /usr/sbin (thanks to gdt for reminding me that
the move is older than I remembered last night) /usr/lib/sendmail has
typically been kept as a symbolic link.  That's how it is on all the
systems I see at work (various flavors of RedHat/Fedora, Solaris and
IRIX).  Your upgraded system does not.  I've seen some discussion on
the removal of the link, but can't recall where off hand.  Thanks
again to gdt for reminding me that there's already code to find
sendmail in paths.el, but that is, to my knowledge, only run at build
time.  So you can either set sendmail-program in your .emacs or
recompile.

-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-04 21:12     ` Dave Goldberg
@ 2006-12-05 15:40       ` reader
  2006-12-05 23:36         ` Dave Goldberg
  0 siblings, 1 reply; 11+ messages in thread
From: reader @ 2006-12-05 15:40 UTC (permalink / raw)


Dave Goldberg <david.goldberg6@verizon.net> writes:

> The reason is that for all those years, even with sendmail's preferred
> place having moved to /usr/sbin (thanks to gdt for reminding me that
> the move is older than I remembered last night) /usr/lib/sendmail has
> typically been kept as a symbolic link.  That's how it is on all the
> systems I see at work (various flavors of RedHat/Fedora, Solaris and
> IRIX).  Your upgraded system does not.  I've seen some discussion on
> the removal of the link, but can't recall where off hand.  Thanks
> again to gdt for reminding me that there's already code to find
> sendmail in paths.el, but that is, to my knowledge, only run at build
> time.  So you can either set sendmail-program in your .emacs or
> recompile.

so the code posted in sendmail.el does not get run? Or does not ferret
out the sendmail binary?




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-05 15:40       ` reader
@ 2006-12-05 23:36         ` Dave Goldberg
  2006-12-06 15:11           ` Simon Josefsson
  2006-12-06 16:19           ` reader
  0 siblings, 2 replies; 11+ messages in thread
From: Dave Goldberg @ 2006-12-05 23:36 UTC (permalink / raw)


I use XEmacs, not GNU Emacs, so that may be the difference.  In my sendmail.el there is no code that ferets out sendmail's location.  It either uses sendmail-program if it's set or defaults to /usr/lib/sendmail.  There is code in paths.el that sets sendmail-program but as far as I know, paths.el is run at compile time only.
-- 
Dave Goldberg
david.goldberg6@verizon.net




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-05 23:36         ` Dave Goldberg
@ 2006-12-06 15:11           ` Simon Josefsson
  2006-12-06 16:19           ` reader
  1 sibling, 0 replies; 11+ messages in thread
From: Simon Josefsson @ 2006-12-06 15:11 UTC (permalink / raw)
  Cc: ding

Dave Goldberg <david.goldberg6@verizon.net> writes:

> I use XEmacs, not GNU Emacs, so that may be the difference.

It is.  XEmacs defines smtpmail-program not in the mail-lib module,
but in the core XEmacs in paths.el, as follows:

(defconst sendmail-program nil
  "Program used to send messages.")

and sendmail.el does:

	(program (if (boundp 'sendmail-program)
		     sendmail-program
		   "/usr/lib/sendmail"))

Ideally, the paths.el declaration should be removed, but maybe
sendmail-program has to be declared for other core packages to work.

In any case, it is an XEmacs problem, and should be reported to them.
The XEmacs mail-lib package maintainer can help to improve the XEmacs
sendmail.el, but that will probably not help unless core XEmacs is
improved too.

/Simon



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How does gnus talk to sendmail
  2006-12-05 23:36         ` Dave Goldberg
  2006-12-06 15:11           ` Simon Josefsson
@ 2006-12-06 16:19           ` reader
  1 sibling, 0 replies; 11+ messages in thread
From: reader @ 2006-12-06 16:19 UTC (permalink / raw)


Dave Goldberg <david.goldberg6@verizon.net> writes:

> I use XEmacs, not GNU Emacs, so that may be the difference.  In my
> sendmail.el there is no code that ferets out sendmail's location.
> It either uses sendmail-program if it's set or defaults to
> /usr/lib/sendmail.  There is code in paths.el that sets
> sendmail-program but as far as I know, paths.el is run at compile
> time only.

Just for your information.  After a restart of emacs (and removing of
my temporary symlink) emacs now finds the binary as expected.  So
apparently the (fsf emacs) sendmail.el code I posted does do the job.

Still not sure why this happened but I guess it was related to
updating OS while emacs was running.  Emacs appears to have needed
only a restart to start working as expected again.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-12-06 16:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-03 20:28 How does gnus talk to sendmail reader
2006-12-04  3:28 ` Dave Goldberg
2006-12-04 14:14   ` gdt
2006-12-04 18:51     ` reader
2006-12-04  9:09 ` Reiner Steib
2006-12-04 19:04   ` reader
2006-12-04 21:12     ` Dave Goldberg
2006-12-05 15:40       ` reader
2006-12-05 23:36         ` Dave Goldberg
2006-12-06 15:11           ` Simon Josefsson
2006-12-06 16:19           ` reader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).