Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Multiple Mailings
Date: Mon, 09 Sep 2019 11:12:20 +0800	[thread overview]
Message-ID: <875zm2qi23.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87d0gamwtn.fsf@bobnewell.net>

Bob Newell <bobnewell@bobnewell.net> writes:

> Aloha everyone,
>
> As many people do, I use the 'alias' feature of BBDB to set up mailing
> lists. I typically expand the list into a BCC: field in my message, and
> put in a generic address as the To: element. This works fine, as
> expected, except that some spam filters don't like mail coming to a
> generic address instead of the recipient's real address.
>
> Well, in Gnus all is possible. So I found some code on the web and
> modified it, so that an expanded mailing list is parsed and individual
> mails get sent to the real address of each recipient. So, say 18 on the
> list, 18 separate email transactions.
>
> Very fine, except Gnus insists on prompting me for Each And Every Copy,
> and that gets very tiresome. I think there could be a change
> made. Looking in message.el, about line 4120 in my version, we have
> this code fragment:
>
> 	(when (and (or (not (memq (car elem)
> 				  message-sent-message-via))
> 		       (message-fetch-field "supersedes")
> 		       (if (or (message-gnksa-enable-p 'multiple-copies)
> 			       (not (eq (car elem) 'news)))
> 			   (y-or-n-p
> 			    (format
> 			     "Already sent message via %s; resend? "
> 			     (car elem)))
> 			 (error "Denied posting -- multiple copies")))
> 		   (setq success (funcall (caddr elem) arg)))
> 	  (setq sent t))))
>
> I thought that by enabling 'multiple-copies in the
> 'message-gnksa-shoot-feet variable, I would avoid prompting. But as the
> code above shows (once I figured out the nestings!) that isn't the
> case. 'multiple-copies only comes into play under certain circumstances,
> and will never prevent prompting.
>
> But shouldn't it? Is there really a reason to force prompting all the
> time? Is that perhaps my use case--- automated single mailings to
> multiple users--- is out of scope? (Or potentially very spammy, but I
> should take responsibility for that.)

Looking at uses of `message-gnksa-enable-p', the behavior of that
function is to make the specified foot-gun *possible*, ie it won't be
denied automatically. But in all call sites (not just 'multiple-copies)
a prompt is still required. In other words the choice is between
automatic denial and prompting, not between prompting and automatic
acceptance.

I don't think we'd want to change that behavior, as it's pretty baked
in, and when you step back and look at it, what you're doing is actually
sending multiple messages, not multiple copies of the same message. I
would just write a little program to compose and send multiple messages,
using `compose-mail':

(dolist (rec (bbdb-do-records))
  (compose-mail (bbdb-dwim-mail rec)
		"Hi there"
		'(("Bcc" . "me@myself.com")))
  ;; If you're using message-mode
  (message-goto-body)
  (insert "Dear so-and-so,")
  (message-send-and-exit))

Untested! But hopefully an okay starting place.

(Obligatory shameless plug: EBDB has `ebdb-mail-each' which does this
for you.)




  reply	other threads:[~2019-09-09  3:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-08 19:07 Bob Newell
2019-09-09  3:12 ` Eric Abrahamsen [this message]
2019-09-09  4:33   ` Bob Newell
2019-09-09  7:48     ` Eric Abrahamsen
     [not found]     ` <87lfuxq57r.fsf@ericabrahamsen.net>
2019-09-09  7:50       ` Eric Abrahamsen
2019-09-09 20:11 ` Peter Münster
2019-09-09 21:30   ` Bob Newell
2019-09-09 21:49     ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zm2qi23.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).