Gnus development mailing list
 help / color / mirror / Atom feed
* DSN
@ 2002-04-21 11:07 Joseph Barillari
  2002-04-21 13:16 ` DSN Simon Josefsson
  2002-04-24  9:21 ` DSN Matthieu Moy
  0 siblings, 2 replies; 19+ messages in thread
From: Joseph Barillari @ 2002-04-21 11:07 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

I was surprised that Gnus didn't support Delivery Status
Notification. I've patched OGnus 0.05 message.el to handle it; the
patch is attached.

Given that DSN support requires only a few lines of code, was there a
philosophical reason for its exclusion?

--Joe


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: DSN patch --]
[-- Type: text/x-patch, Size: 1841 bytes --]

--- message.el.~1~	Mon Feb 25 01:11:57 2002
+++ message.el	Sun Apr 21 06:57:38 2002
@@ -244,6 +244,25 @@
   :group 'message-mail
   :type 'boolean)
 
+(defcustom message-use-dsn-failure nil
+  "If this variable is non-nil, ask the MTA for notification by mail
+   of failed delivery. Note that only some MTAs (namely recent versions 
+   of Sendmail) support Delivery Status Notification."
+  :group 'message-sending
+  :type 'boolean)
+
+(defcustom message-use-dsn-delay nil
+  "If this variable is non-nil, ask the sendmail for notification by mail of
+ delayed delivery."
+  :group 'message-sending
+  :type 'boolean)
+
+(defcustom message-use-dsn-success nil
+  "If this variable is non-nil, ask sendmail for notification by mail
+ of successful delivery."
+  :group 'message-sending
+  :type 'boolean)
+
 (defcustom message-generate-new-buffers 'unique
   "*Non-nil means create a new message buffer whenever `message-setup' is called.
 If this is a function, call that function with three parameters:  The type,
@@ -2439,7 +2458,17 @@
 		     ;; we'll let users override this.
 		     (if (null message-sendmail-f-is-evil)
 			 (list "-f" (message-make-address)))
-		     '("-Nfailure,delay,success") 
+		     '(if (or (message-use-dsn-failure) 
+			      (message-use-dsn-delay) 
+			      (message-use-dsn-success))
+			  (concat "-N" (if (message-use-dsn-failure) "failure") 
+				  (if (and (message-use-dsn-failure) 
+					   (message-use-dsn-delay) ) ",")
+				  (if (message-use-dsn-delay) "delay")
+				  (if (and (message-use-dsn-success) 
+					   (message-use-dsn-delay) ) ",")
+				  (if (message-use-dsn-success) "success")
+				  ))
 		     ;; These mean "report errors by mail"
 		     ;; and "deliver in background".
 		     (if (null message-interactive) '("-oem" "-odb"))

[-- Attachment #2.2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN
  2002-04-21 11:07 DSN Joseph Barillari
@ 2002-04-21 13:16 ` Simon Josefsson
  2002-04-21 14:10   ` DSN Joseph Barillari
  2002-04-24  9:21 ` DSN Matthieu Moy
  1 sibling, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-21 13:16 UTC (permalink / raw)
  Cc: ding

Joseph Barillari <jbarilla@princeton.edu> writes:

> I was surprised that Gnus didn't support Delivery Status
> Notification. I've patched OGnus 0.05 message.el to handle it; the
> patch is attached.

Thanks.

It looks specific to sendmail.  Maybe renaming the variables to
`message-sendmail-use-dsn-*'?  Alternatively, implementing it for
non-sendmail methods as well (smtpmail, qmail, ...), of course.

> Given that DSN support requires only a few lines of code, was there a
> philosophical reason for its exclusion?

I think it has been discussed a few times here before (see the
archives).  If it is disabled by default, I don't see any harm in
supporting it.

Would it be useful to have toolbar buttons and message mode key
bindings for requesting DSN on a message?  I'm not sure you'd want to
use DSN on all messages.

Do you want to write documentation for it as well (message.texi)?
Have you signed FSF papers?




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

* Re: DSN
  2002-04-21 13:16 ` DSN Simon Josefsson
@ 2002-04-21 14:10   ` Joseph Barillari
  2002-04-23 20:28     ` DSN [PATCH] Joseph Barillari
  0 siblings, 1 reply; 19+ messages in thread
From: Joseph Barillari @ 2002-04-21 14:10 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]

>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:

    SJ> Joseph Barillari <jbarilla@princeton.edu> writes:
    >> I was surprised that Gnus didn't support Delivery Status
    >> Notification. I've patched OGnus 0.05 message.el to handle it;
    >> the patch is attached.

    SJ> Thanks.

    SJ> It looks specific to sendmail.  Maybe renaming the variables
    SJ> to `message-sendmail-use-dsn-*'?  Alternatively, implementing
    SJ> it for non-sendmail methods as well (smtpmail, qmail, ...), of
    SJ> course.

qmail doesn't support DSN [0]. Neither does Exim. As for the rest, I
don't know.

    >> Given that DSN support requires only a few lines of code, was
    >> there a philosophical reason for its exclusion?

    SJ> I think it has been discussed a few times here before (see the
    SJ> archives).  If it is disabled by default, I don't see any harm
    SJ> in supporting it.

    SJ> Would it be useful to have toolbar buttons and message mode
    SJ> key bindings for requesting DSN on a message?  I'm not sure
    SJ> you'd want to use DSN on all messages.

Not a bad idea, but I use it on all messages, with a procmail rule to
save the receipts in an mbox if I should ever need them. A nifty hack
would be to have Gnus process the incoming DSN messages, and insert a
header into the corresponding sent messages to indicate their final
disposition. It could (perhaps) tick messages that were delayed or
failed.

But if Bernstein is correct in asserting [0] that `DSN is obsolete',
implementing such a feature may be a waste of time.

    SJ> Do you want to write documentation for it as well
    SJ> (message.texi)?  Have you signed FSF papers?

I think this falls into the `too trivial to need copyright
reassignment' category. But if it's necessary, sure.

Speaking of which, I just re-read the patch and realized that it
patches the code relative to one of my earlier revisions, rather than
relative to a vanilla version of Gnus. I've attached a fresh patch
against 0.06 from CVS. Please disregard the last one.

As for the documentation, the following should suffice:

    Delivery Status Notification (see
    http://www.sendmail.org/~ca/email/dsn.html) is a means by which
    MTAs can report the final disposition of a message. Support for
    DSN varies: recent versions of Sendmail may have it enabled, but
    Exim and qmail do not support it. DSN `success' status messages
    will be returned by the last mail server in the relay sequence
    capable of DSN. Microsoft Exchange generates DSN `success'
    messages. Sendmail can be configured to do so.

    If the variable `message-use-dsn-failure' is non-nil, Gnus will
    ask the MTA to ask for DSN status messages if delivery
    fails. Likewise for delivery delays, with `message-use-dsn-delay',
    and successful delivery, with `message-use-dsn-success'.

--Joe

[0] <http://www.sendmail.org/~ca/email/qm-sm.html>

Corrected patch follows: 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: DSN patch --]
[-- Type: text/x-patch, Size: 1886 bytes --]

--- message.el	Sun Apr 21 10:00:46 2002
+++ /home/jbarilla/dl/gnus-cvs/gnus/lisp/message.el	Thu Apr 18 15:01:10 2002
@@ -265,26 +265,6 @@
   :group 'message-mail
   :type 'boolean)
 
-(defcustom message-use-dsn-failure nil
-  "If this variable is non-nil, ask the MTA for notification by mail
-   of failed delivery. Note that only some MTAs (namely recent versions 
-   of Sendmail) support Delivery Status Notification."
-  :group 'message-sending
-  :type 'boolean)
-
-(defcustom message-use-dsn-delay nil
-  "If this variable is non-nil, ask the sendmail for notification by mail of
- delayed delivery."
-  :group 'message-sending
-  :type 'boolean)
-
-(defcustom message-use-dsn-success nil
-  "If this variable is non-nil, ask sendmail for notification by mail
- of successful delivery."
-  :group 'message-sending
-  :type 'boolean)
-
-
 (defcustom message-generate-new-buffers 'unique
   "*Non-nil means create a new message buffer whenever `message-setup' is called.
 If this is a function, call that function with three parameters:  The type,
@@ -3023,19 +3003,6 @@
 		     ;; we'll let users override this.
 		     (if (null message-sendmail-f-is-evil)
 			 (list "-f" (message-make-address)))
-		     ;; Insert DSN-related command line arguments
-		     (if (or message-use-dsn-failure
-			      message-use-dsn-delay 
-			      message-use-dsn-success)
-			  (list 
-			   (concat "-N" (if message-use-dsn-failure "failure") 
-				  (if (and message-use-dsn-failure 
-					   message-use-dsn-delay ) ",")
-				  (if message-use-dsn-delay "delay")
-				  (if (and message-use-dsn-success 
-					   message-use-dsn-delay ) ",")
-				  (if message-use-dsn-success "success")
-				  )))
 		     ;; These mean "report errors by mail"
 		     ;; and "deliver in background".
 		     (if (null message-interactive) '("-oem" "-odb"))

[-- Attachment #2.2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
  2002-04-21 14:10   ` DSN Joseph Barillari
@ 2002-04-23 20:28     ` Joseph Barillari
  2002-04-24 11:31       ` Kai Großjohann
  0 siblings, 1 reply; 19+ messages in thread
From: Joseph Barillari @ 2002-04-23 20:28 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

I've attached the DSN patch w.r.t. the latest Gnus source in CVS,
including documentation. How might I go about adding a control to
quickly switch the option on or off at composition time, as Simon
Josefsson suggested? I leave it on all the time, because I catch the
flood of receipts with procmail, but I assume this isn't everybody's
preferred behavior.

--Joe


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: DSN patch --]
[-- Type: text/x-patch, Size: 3484 bytes --]

diff -urN -x CVS gnus/lisp/message.el mygnus/lisp/message.el
--- gnus/lisp/message.el	Sat Apr 20 22:42:45 2002
+++ mygnus/lisp/message.el	Tue Apr 23 16:06:03 2002
@@ -265,6 +265,26 @@
   :group 'message-mail
   :type 'boolean)
 
+(defcustom message-sendmail-use-dsn-failure nil
+  "If this variable is non-nil, ask the MTA for notification by mail
+   of failed delivery. Note that only some MTAs (namely recent versions 
+   of Sendmail) support Delivery Status Notification."
+  :group 'message-sending
+  :type 'boolean)
+
+(defcustom message-sendmail-use-dsn-delay nil
+  "If this variable is non-nil, ask the sendmail for notification by mail of
+ delayed delivery."
+  :group 'message-sending
+  :type 'boolean)
+
+(defcustom message-sendmail-use-dsn-success nil
+  "If this variable is non-nil, ask sendmail for notification by mail
+ of successful delivery."
+  :group 'message-sending
+  :type 'boolean)
+
+
 (defcustom message-generate-new-buffers 'unique
   "*Non-nil means create a new message buffer whenever `message-setup' is called.
 If this is a function, call that function with three parameters:  The type,
@@ -3005,6 +3025,20 @@
 		     ;; we'll let users override this.
 		     (if (null message-sendmail-f-is-evil)
 			 (list "-f" (message-make-address)))
+		     ;; Insert DSN-related command line arguments
+		     (if (or message-sendmail-use-dsn-failure
+			      message-sendmail-use-dsn-delay 
+			      message-sendmail-use-dsn-success)
+			  (list 
+			   (concat "-N" 
+			     (if message-sendmail-use-dsn-failure "failure") 
+			     (if (and message-sendmail-use-dsn-failure 
+				   message-sendmail-use-dsn-delay ) ",")
+			     (if message-sendmail-use-dsn-delay "delay")
+			     (if (and message-sendmail-use-dsn-success 
+				   message-sendmail-use-dsn-delay ) ",")
+			     (if message-sendmail-use-dsn-success "success")
+			  )))
 		     ;; These mean "report errors by mail"
 		     ;; and "deliver in background".
 		     (if (null message-interactive) '("-oem" "-odb"))
diff -urN -x CVS gnus/texi/message.texi mygnus/texi/message.texi
--- gnus/texi/message.texi	Mon Apr  8 17:58:00 2002
+++ mygnus/texi/message.texi	Tue Apr 23 15:56:57 2002
@@ -1242,6 +1242,27 @@
 The lower bound of message size in characters, beyond which the message 
 should be sent in several parts. If it is nil, the size is unlimited.
 
+@item message-sendmail-use-dsn-failure
+@vindex message-sendmail-use-dsn-failure
+Set this to non-@code{nil} to tell Sendmail to request downstream MTAs
+to generate DSN (RFC 1891) response messages if delivery fails. Note
+that this does not work with all versions of Sendmail. Support from
+downstream MTAs varies by vendor and product.
+
+@item message-sendmail-use-dsn-success
+@vindex message-sendmail-use-dsn-success
+Set this to non-@code{nil} to tell Sendmail to request downstream MTAs
+to generate DSN (RFC 1891) response messages if delivery
+succeeds. Note that this does not work with all versions of
+Sendmail. Support from downstream MTAs varies by vendor and product.
+
+@item message-sendmail-use-dsn-delay
+@vindex message-sendmail-use-dsn-delay
+Set this to non-@code{nil} to tell Sendmail to request downstream MTAs
+to generate DSN (RFC 1891) response messages if delivery is
+delayed. Note that this does not work with all versions of
+Sendmail. Support from downstream MTAs varies by vendor and product.
+
 @end table
 
 

[-- Attachment #2.2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN
  2002-04-21 11:07 DSN Joseph Barillari
  2002-04-21 13:16 ` DSN Simon Josefsson
@ 2002-04-24  9:21 ` Matthieu Moy
  1 sibling, 0 replies; 19+ messages in thread
From: Matthieu Moy @ 2002-04-24  9:21 UTC (permalink / raw)


Joseph Barillari <jbarilla@princeton.edu> writes:

> I was surprised that Gnus didn't support Delivery Status
> Notification. I've patched OGnus 0.05 message.el to handle it; the
> patch is attached.

Good thing in my opinion. 

> Given that DSN support requires only a few lines of code, was there a
> philosophical reason for its exclusion?

There have been a thread. See google's archives here :

http://groups.google.fr/groups?hl=fr&threadm=ilun0zo4sht.fsf%40extundo.com&rnum=5&prev=/groups%3Fq%3Ddelivery-status-notification%2Bgnus%26hl%3Dfr%26selm%3Dilun0zo4sht.fsf%2540extundo.com%26rnum%3D5

-- 
Matthieu



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

* Re: DSN [PATCH]
  2002-04-23 20:28     ` DSN [PATCH] Joseph Barillari
@ 2002-04-24 11:31       ` Kai Großjohann
  2002-04-24 12:04         ` Matthieu Moy
  0 siblings, 1 reply; 19+ messages in thread
From: Kai Großjohann @ 2002-04-24 11:31 UTC (permalink / raw)
  Cc: ding

Joseph Barillari <jbarilla@princeton.edu> writes:

> I've attached the DSN patch w.r.t. the latest Gnus source in CVS,
> including documentation. How might I go about adding a control to
> quickly switch the option on or off at composition time, as Simon
> Josefsson suggested?

I guess the solution is to write some commands for each of the boolean
variables.  For the variable foo, it could be the command toggle-foo,
and it could toggle the variable if invoked normally, set it to true
if invoked with a positive prefix arg, and set it to false if invoked
with a nonpositive prefix arg.

This would be like the other toggle commands in Emacs.

But there is one more thing: you might wish to set the switch for the
current message only, or globally.  The implementation could be by
making the variable have a local value in the current buffer.  (But
then you need to make sure you're in the message buffer when you
access the variable.)

I'm not sure what should be the user interface for the buffer-local
versus global thing.  Could be two different commands.  Doing it via
the prefix arg appears to be difficult.  Hm.

There is the command toggle-global-lazy-font-lock-mode in Emacs 21.
Maybe this could be a guideline for the command names.

kai
-- 
Silence is foo!



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

* Re: DSN [PATCH]
  2002-04-24 11:31       ` Kai Großjohann
@ 2002-04-24 12:04         ` Matthieu Moy
  2002-04-24 12:35           ` Joseph Barillari
                             ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Matthieu Moy @ 2002-04-24 12:04 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

>> I've attached the DSN patch w.r.t. the latest Gnus source in CVS,
>> including documentation. How might I go about adding a control to
>> quickly switch the option on or off at composition time, as Simon
>> Josefsson suggested?
>
> I guess the solution is to write some commands for each of the boolean
> variables.  For the variable foo, it could be the command toggle-foo,

This is actually  not more than a  header in the mail, and  I had seen
somewhere in  the changelog of Gnus  that a function  inserting it had
already been introduced a few month ago.

If you  want this permanent, add  this header like  any other (X-Face,
...) with posting-styles, gnus-pers, or any other. 

Please, do not make something that will post DSN to mailing lists :-(.

-- 
Matthieu



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

* Re: DSN [PATCH]
  2002-04-24 12:04         ` Matthieu Moy
@ 2002-04-24 12:35           ` Joseph Barillari
  2002-04-24 15:57             ` Simon Josefsson
  2002-04-24 13:26           ` Simon Josefsson
  2002-04-24 15:18           ` Kai Großjohann
  2 siblings, 1 reply; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 12:35 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

>>>>> "MM" == Matthieu Moy <Matthieu.Moy@imag.fr> writes:
    >>  I guess the solution is to write some commands for each of the
    >> boolean variables.  For the variable foo, it could be the
    >> command toggle-foo,

    MM> This is actually not more than a header in the mail, and I had
    MM> seen somewhere in the changelog of Gnus that a function
    MM> inserting it had already been introduced a few month ago.

What was it called? I grepped ChangeLog for "Return-Receipt-To" and
"DSN" and couldn't find it.

    MM> If you want this permanent, add this header like any other
    MM> (X-Face, ...) with posting-styles, gnus-pers, or any other.

Should I add the header as an internal note? That is to say,
something that Gnus will strip out before it sends the message? (As
with the <\# part type ...> tags that Gnus inserts when files are attached?

    MM> Please, do not make something that will post DSN to mailing
    MM> lists :-(.

I believe the MTAs are responsible for making sure the DSN-requester
doesn't get flooded with messages. The Exim FAQ cited the ambiguities
in the DSN-related RFCs on this matter as their reason for not
including it. [0] 

As empirical `proof,' I have not, to my knowledge, received a flood of
receipts by posting to a mailing list with DSN enabled -- yet.

[0] <http://exim.directnet.ru/exim-html-4.00/doc/html/FAQ_6.html>

--Joe

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
  2002-04-24 12:04         ` Matthieu Moy
  2002-04-24 12:35           ` Joseph Barillari
@ 2002-04-24 13:26           ` Simon Josefsson
  2002-04-24 13:43             ` Joseph Barillari
  2002-04-24 15:18           ` Kai Großjohann
  2 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-24 13:26 UTC (permalink / raw)
  Cc: ding

On Wed, 24 Apr 2002, Matthieu Moy wrote:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> 
> >> I've attached the DSN patch w.r.t. the latest Gnus source in CVS,
> >> including documentation. How might I go about adding a control to
> >> quickly switch the option on or off at composition time, as Simon
> >> Josefsson suggested?
> >
> > I guess the solution is to write some commands for each of the boolean
> > variables.  For the variable foo, it could be the command toggle-foo,
> 
> This is actually  not more than a  header in the mail, and  I had seen
> somewhere in  the changelog of Gnus  that a function  inserting it had
> already been introduced a few month ago.

That was Disposition-Notification-To, I think, and it is not the same as 
DSN.  DSN works at the MTA level (but need MUA cooperation to read 
notifications).  DNT is MUA only.  Unless I remember incorrectly.

> Please, do not make something that will post DSN to mailing lists :-(.

I think everyone agress with this.  However, Gnus should be able to
support DSN/DNT if the user wants to enable it for a certain message (or 
for all outgoing messages).  But it should not be the default.




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

* Re: DSN [PATCH]
  2002-04-24 13:26           ` Simon Josefsson
@ 2002-04-24 13:43             ` Joseph Barillari
  0 siblings, 0 replies; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 13:43 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:

    >> Please, do not make something that will post DSN to mailing
    >> lists :-(.

    SJ> I think everyone agress with this.  However, Gnus should be
    SJ> able to support DSN/DNT if the user wants to enable it for a
    SJ> certain message (or for all outgoing messages).  But it should
    SJ> not be the default.

That's what mutt does. The option is off by default, but can be
enabled by editing .muttrc. From `man muttrc`:

       dsn_notify
              Type: string
              Default: ""

              Note:  you  should  not  enable this unless you are
              using Sendmail 8.8.x or greater.

              This variable sets the request for  when  notifica­
              tion  is  returned.  The string consists of a comma
              separated list (no spaces!) of one or more  of  the
              following:  never,  to  never request notification,
              failure, to request  notification  on  transmission
              failure,  delay,  to be notified of message delays,
              success, to be notified of successful transmission.

              Example: set dsn_notify="failure,delay"

       dsn_return
              Type: string
              Default: ""

              Note:  you  should  not  enable this unless you are
              using Sendmail 8.8.x or greater.

              This variable controls how much of your message  is
              returned  in DSN messages.  It may be set to either
              hdrs to return just the message header, or full  to
              return the full message.

              Example: set dsn_return=hdrs

--Joe

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
  2002-04-24 12:04         ` Matthieu Moy
  2002-04-24 12:35           ` Joseph Barillari
  2002-04-24 13:26           ` Simon Josefsson
@ 2002-04-24 15:18           ` Kai Großjohann
  2002-04-24 16:17             ` Joseph Barillari
  2 siblings, 1 reply; 19+ messages in thread
From: Kai Großjohann @ 2002-04-24 15:18 UTC (permalink / raw)


Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>>> I've attached the DSN patch w.r.t. the latest Gnus source in CVS,
>>> including documentation. How might I go about adding a control to
>>> quickly switch the option on or off at composition time, as Simon
>>> Josefsson suggested?
>>
>> I guess the solution is to write some commands for each of the boolean
>> variables.  For the variable foo, it could be the command toggle-foo,
>
> This is actually  not more than a  header in the mail, and  I had seen
> somewhere in  the changelog of Gnus  that a function  inserting it had
> already been introduced a few month ago.

Hm.  The code I saw invoked sendmail with various options, depending
on some Emacs variables.  No message headers appeared to be involved.

If it is possible to speficy that I want DSN by including a header in
the outgoing message, then surely Gnus should use that, rather than
kludging in the DSN command line arguments when invoking sendmail.
Right?

kai
-- 
Silence is foo!



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

* Re: DSN [PATCH]
  2002-04-24 12:35           ` Joseph Barillari
@ 2002-04-24 15:57             ` Simon Josefsson
       [not found]               ` <m38z7dawqy.fsf@washer.barillari.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-24 15:57 UTC (permalink / raw)
  Cc: Matthieu Moy

Joseph Barillari <jbarilla@princeton.edu> writes:

> What was it called? I grepped ChangeLog for "Return-Receipt-To" and
> "DSN" and couldn't find it.

Disposition-Notification-To or MDN or DNT or RFC 2298.

>     MM> If you want this permanent, add this header like any other
>     MM> (X-Face, ...) with posting-styles, gnus-pers, or any other.
>
> Should I add the header as an internal note? That is to say,
> something that Gnus will strip out before it sends the message? (As
> with the <\# part type ...> tags that Gnus inserts when files are attached?

Couldn't you simply set the (buffer local) variable
message-sendmail-use-dns-success in the message buffer for that mail?




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

* Re: DSN [PATCH]
  2002-04-24 15:18           ` Kai Großjohann
@ 2002-04-24 16:17             ` Joseph Barillari
  0 siblings, 0 replies; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 16:17 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]

>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:
    >>  This is actually not more than a header in the mail, and I had
    >> seen somewhere in the changelog of Gnus that a function
    >> inserting it had already been introduced a few month ago.

    KG> Hm.  The code I saw invoked sendmail with various options,
    KG> depending on some Emacs variables.  No message headers
    KG> appeared to be involved.

    KG> If it is possible to speficy that I want DSN by including a
    KG> header in the outgoing message, then surely Gnus should use
    KG> that, rather than kludging in the DSN command line arguments
    KG> when invoking sendmail.  Right?

Matthieu Moy pointed me to the following entry in the changelog:
2002-01-05  Simon Josefsson  <jas@extundo.com>
            (snip)
        (message-insert-disposition-notification-to): New function.

According to the manual, this is:
*Disposition Notifications - RFC 2298*
     Message Mode is able to request notifications from the receiver.
     (and)
`C-c M-n'
     Insert a request for a disposition notification.
     (`message-insert-disposition-notification-to').  This means that
     if the recipient support RFC 2298 she might send you a
     notification that she received the message.


Disposition-Notification-To, according to RFC 2298, is implemented by
inserting a standard RFC822 header into the message. It is therefore
the responsibility of the MUA.

Conversely, according to [0], DSN can be requested from sendmail
either in a commandline argument or in the SMTP conversation. I don't
think it can be activated by inserting a header -- DSN is invoked at
the mail transport level, not by the message content.

--Joe

[0] http://www.sendmail.org/~ca/email/sm8.8.new.html

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
       [not found]               ` <m38z7dawqy.fsf@washer.barillari.org>
@ 2002-04-24 17:50                 ` Simon Josefsson
  2002-04-24 19:50                   ` Joseph Barillari
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-24 17:50 UTC (permalink / raw)
  Cc: Matthieu Moy, ding

Joseph Barillari <jbarilla@princeton.edu> writes:

>     SJ> Couldn't you simply set the (buffer local) variable
>     SJ> message-sendmail-use-dns-success in the message buffer for
>     SJ> that mail?
>
> Will a buffer-local variable be visible to message.el when it invokes
> sendmail?

Yup.  People are setting `sendmail-program',
`mail-specify-envelope-from' etc in message buffers for sendmail.el to
pick them up.

Come to think of it, it might make more sense to implement the DSN
support as a sendmail.el specific thing, as it really is.

What do you think of this patch instead?  The additional Gnus support
can consit of message.el commands to set the `mail-use-dsn' variable
buffer locally.

(Is there a better Custom :type for this?  There really should be.
The point is that you want the user to be able to chose any subset of
three elements.)

--- sendmail.el.~1.252.~	Wed Mar  6 19:42:59 2002
+++ sendmail.el	Wed Apr 24 19:47:12 2002
@@ -301,6 +301,15 @@
   :type '(choice (const t) (const nil) (const query) (const mime))
   :group 'sendmail)
 
+(defcustom mail-use-dsn nil
+  "*Ask MTA for notification of failed, delayed or successful delivery.
+Note that only some MTAs (currently only recent versions of Sendmail)
+support Delivery Status Notification."
+  :group 'sendmail
+  :type '(repeat (radio (const :tag "Failure" failure)
+			 (const :tag "Delay" delay)
+			 (const :tag "Success" success))))
+
 ;; Note: could use /usr/ucb/mail instead of sendmail;
 ;; options -t, and -v if not interactive.
 (defvar mail-mailer-swallows-blank-line
@@ -991,6 +1000,9 @@
 ;;;			      (or resend-to-addresses
 				  '("-t")
 ;;;				  )
+				  (if mail-use-dsn
+				      (list "-N" (mapconcat 'symbol-name
+							    mail-use-dsn ",")))
 			      )
 		      )
 		     (exit-value (apply 'call-process-region args)))




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

* Re: DSN [PATCH]
  2002-04-24 17:50                 ` Simon Josefsson
@ 2002-04-24 19:50                   ` Joseph Barillari
  2002-04-24 20:28                     ` Simon Josefsson
  0 siblings, 1 reply; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 19:50 UTC (permalink / raw)
  Cc: Matthieu Moy, ding

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:

    SJ> What do you think of this patch instead?  The additional Gnus
    SJ> support can consit of message.el commands to set the
    SJ> `mail-use-dsn' variable buffer locally.

    SJ> (Is there a better Custom :type for this?  There really should
    SJ> be.  The point is that you want the user to be able to chose
    SJ> any subset of three elements.)

I like it: it's much cleaner. What is the relationship between
message.el and sendmail.el? I patched message.el because I thought
that program dispatched the messages to the MTA. Can Gnus be
configured to have sendmail.el perform this function? --Joe

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
  2002-04-24 19:50                   ` Joseph Barillari
@ 2002-04-24 20:28                     ` Simon Josefsson
  2002-04-24 20:40                       ` Joseph Barillari
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-24 20:28 UTC (permalink / raw)
  Cc: Matthieu Moy, ding

Joseph Barillari <jbarilla@princeton.edu> writes:

>>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:
>
>     SJ> What do you think of this patch instead?  The additional Gnus
>     SJ> support can consit of message.el commands to set the
>     SJ> `mail-use-dsn' variable buffer locally.
>
>     SJ> (Is there a better Custom :type for this?  There really should
>     SJ> be.  The point is that you want the user to be able to chose
>     SJ> any subset of three elements.)
>
> I like it: it's much cleaner.

I'll send it to the emacs people.

> What is the relationship between message.el and sendmail.el? I
> patched message.el because I thought that program dispatched the
> messages to the MTA. Can Gnus be configured to have sendmail.el
> perform this function? --Joe

Message uses sendmail, smtpmail, feedmail, qmail etc to send mail.
Message could have key bindings that binds the mail-use-dsn to
something within the current buffer.  OTOH I think it is rather
unclean as it only applies to one method for sending mail.  So maybe
it is better to only have the sendmail.el variable?  And use M-x
set-variable.  Or using posting styles.  Or hooks.  Sendmail.el could
provide functions for setting the variable, but it is such a simple
function so maybe the variable is sufficient.




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

* Re: DSN [PATCH]
  2002-04-24 20:28                     ` Simon Josefsson
@ 2002-04-24 20:40                       ` Joseph Barillari
  2002-04-24 20:52                         ` Simon Josefsson
  0 siblings, 1 reply; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 20:40 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:
    >> What is the relationship between message.el and sendmail.el? I
    >> patched message.el because I thought that program dispatched
    >> the messages to the MTA. Can Gnus be configured to have
    >> sendmail.el perform this function? --Joe

    SJ> Message uses sendmail, smtpmail, feedmail, qmail etc to send
    SJ> mail.  Message could have key bindings that binds the
    SJ> mail-use-dsn to something within the current buffer.  OTOH I
    SJ> think it is rather unclean as it only applies to one method
    SJ> for sending mail.  So maybe it is better to only have the
    SJ> sendmail.el variable?  And use M-x set-variable.  Or using
    SJ> posting styles.  Or hooks.  Sendmail.el could provide
    SJ> functions for setting the variable, but it is such a simple
    SJ> function so maybe the variable is sufficient.

I take it that Gnus replicates the functions of sendmail.el in
messsage.el. That being so, shouldn't this patch be applied to
message.el? Gnus uses `message-send-mail-with-sendmail' in message.el,
rather than `sendmail-send-it' in sendmail.el to actually dispatch the
messages, right?

--Joe

[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

* Re: DSN [PATCH]
  2002-04-24 20:40                       ` Joseph Barillari
@ 2002-04-24 20:52                         ` Simon Josefsson
  2002-04-24 21:07                           ` Joseph Barillari
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2002-04-24 20:52 UTC (permalink / raw)
  Cc: ding, Matthieu.Moy

Joseph Barillari <jbarilla@princeton.edu> writes:

> I take it that Gnus replicates the functions of sendmail.el in
> messsage.el. That being so, shouldn't this patch be applied to
> message.el? Gnus uses `message-send-mail-with-sendmail' in message.el,
> rather than `sendmail-send-it' in sendmail.el to actually dispatch the
> messages, right?

Argh, you're right.  Why is this code being duplicated?  sendmail.el
does some other stuff as well.  Hm.  Ah.  Message was perhaps intended
to replace Mail, so it copied the code.  However, Mail is still
around, so the code ended up being duplicated.  Sigh.  IMHO it would
be better if either message called the code in sendmail.el, or if
message replaced sendmail stuff.




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

* Re: DSN [PATCH]
  2002-04-24 20:52                         ` Simon Josefsson
@ 2002-04-24 21:07                           ` Joseph Barillari
  0 siblings, 0 replies; 19+ messages in thread
From: Joseph Barillari @ 2002-04-24 21:07 UTC (permalink / raw)
  Cc: ding, Matthieu.Moy

[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]

>>>>> "SJ" == Simon Josefsson <jas@extundo.com> writes:

    SJ> Joseph Barillari <jbarilla@princeton.edu> writes:
    >> I take it that Gnus replicates the functions of sendmail.el in
    >> messsage.el. That being so, shouldn't this patch be applied to
    >> message.el? Gnus uses `message-send-mail-with-sendmail' in
    >> message.el, rather than `sendmail-send-it' in sendmail.el to
    >> actually dispatch the messages, right?

    SJ> Argh, you're right.  Why is this code being duplicated?
    SJ> sendmail.el does some other stuff as well.  Hm.  Ah.  Message
    SJ> was perhaps intended to replace Mail, so it copied the code.
    SJ> However, Mail is still around, so the code ended up being
    SJ> duplicated.  Sigh.  IMHO it would be better if either message
    SJ> called the code in sendmail.el, or if message replaced
    SJ> sendmail stuff.

The code in sendmail.el is responsible for the bare-bones `M-x mail'
command, correct? Then it's certainly reasonable that the code
overlaps. Gnus simply implements a superset of the features of
sendmail.el in message.el. Because Gnus talks to sendmail with
message.el, I think this patch should probably go in message.el.

Regarding the possibility of eliminating duplication, speaking as a
complete outsider to the Gnus/Emacs projects, I think they perform
non-overlapping functions. Sendmail.el implements a bare-bones mail
command, not a general-purpose mail-processing library. It could
conceivably be stripped down even further to simply call the
mail-processing functions in Gnus, but that would require that anyone
who wanted to use the (previously standalone) sendmail.el would have
to install all of Gnus (although it now comes as standard equipment
with Emacs 21, some heathens may delete it).

--Joe


[-- Attachment #2: Type: application/pgp-signature, Size: 268 bytes --]

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

end of thread, other threads:[~2002-04-24 21:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-21 11:07 DSN Joseph Barillari
2002-04-21 13:16 ` DSN Simon Josefsson
2002-04-21 14:10   ` DSN Joseph Barillari
2002-04-23 20:28     ` DSN [PATCH] Joseph Barillari
2002-04-24 11:31       ` Kai Großjohann
2002-04-24 12:04         ` Matthieu Moy
2002-04-24 12:35           ` Joseph Barillari
2002-04-24 15:57             ` Simon Josefsson
     [not found]               ` <m38z7dawqy.fsf@washer.barillari.org>
2002-04-24 17:50                 ` Simon Josefsson
2002-04-24 19:50                   ` Joseph Barillari
2002-04-24 20:28                     ` Simon Josefsson
2002-04-24 20:40                       ` Joseph Barillari
2002-04-24 20:52                         ` Simon Josefsson
2002-04-24 21:07                           ` Joseph Barillari
2002-04-24 13:26           ` Simon Josefsson
2002-04-24 13:43             ` Joseph Barillari
2002-04-24 15:18           ` Kai Großjohann
2002-04-24 16:17             ` Joseph Barillari
2002-04-24  9:21 ` DSN Matthieu Moy

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).