Moodle

Forum: Sending one single email with multiple recipients instead of sending multiple emails with one recipient

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.3
  • Fix Version/s: None
  • Component/s: Forum
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

Bonjour ! Is it possible to send less emails per forum post?

One of my courses counts about 1000 students enrolled.
In its main forum, every day, about 20 messages are posted.
So:

  • for each new post, about 1000 emails are sent in a few seconds to our mail server (with the same content ; only the recipient changes)
  • every day, more than 20,000 emails are sent to our mail server, only for that course
    Consequently:
  • some of theses emails risk to be rejected by our mail server "as spam"
  • that generates a high traffic/storage between our Moodle server and our Mail server.

Here is my suggestion : for every post, we could send one single email with 1000 recipients instead of 1000 emails with one single recipient. So do the List servers.
As RFC 821/2821 says: "When the same message is sent to multiple recipients the SMTP encourages the transmission of only one copy of the data for all the recipients at the same destination host."

Below are the NEW and the OLD SMTP sessions, for a forum with three users subscribed.
SMTP commands would be obviously more concise in NEW) than in OLD):

NEW) One single SMTP 'MAIL FROM' with three recipients:
*********************************************
MAIL FROM:<john.teacher@moodle.edu>
RCPT TO:<student1@moodle.edu>
RCPT TO:<student2@moodle.edu>
RCPT TO:<student3@moodle.edu>
DATA
Date: Thu, 1 Jan 2008 00:00:00 -0700
From: John Teacher <john.teacher@moodle.edu>
To: "Students subscribed to forum News in course Course of John Teacher"
Subject: Happy new year
Hi!
Happy new year!
.
*********************************************

OLD) Three SMTP 'MAIL FROM' with one single recipient for each one:
*********************************************
MAIL FROM:<john.teacher@moodle.edu>
RCPT TO:<student1@moodle.edu>
DATA
Date: Thu, 1 Jan 2008 00:00:00 -0700
From: John Teacher <john.teacher@moodle.edu>
To: Student1 <student1@moodle.edu>
Subject: Happy new year
Hi!
Happy new year!
.

MAIL FROM:<john.teacher@moodle.edu>
RCPT TO:<student2@moodle.edu>
DATA
Date: Thu, 1 Jan 2008 00:00:00 -0700
From: John Teacher <john.teacher@moodle.edu>
To: Student2 <student2@moodle.edu>
Subject: Happy new year
Hi!
Happy new year!
.

MAIL FROM:<john.teacher@moodle.edu>
RCPT TO:<student3@moodle.edu>
DATA
Date: Thu, 1 Jan 2008 00:00:00 -0700
From: John Teacher <john.teacher@moodle.edu>
To: Student3 <student3@moodle.edu>
Subject: Happy new year
Hi!
Happy new year!
.
*********************************************

Note that :

  • we should be able to adjust (by a new Moodle setting) the number of 'RCPT' commands (recipients) per a 'MAIL FROM' command for honouring an eventual SMPTP limit
  • we shouldn't use the RCPT syntax below:
    RCPT TO:<student1@moodle.edu><student2@moodle.edu><student3@moodle.edu>
    because all the recipients could then appear in the mail header "Received" (even if they don't appear in the mail header "To")

Activity

Hide
Chris Fryer added a comment -

I sent these commands directly to port 25 on our SMTP server. The message sent OK, but was immediately canned by MessageLabs as spam:

X-SpamQuarantineInfo: spam detected heuristically
X-SpamQuarantineReason: Yes, hits=50.0 required=7.0 tests=To address is malformed (RFC)

This is a shame. I thought it was a really good idea.

Chris

Show
Chris Fryer added a comment - I sent these commands directly to port 25 on our SMTP server. The message sent OK, but was immediately canned by MessageLabs as spam: X-SpamQuarantineInfo: spam detected heuristically X-SpamQuarantineReason: Yes, hits=50.0 required=7.0 tests=To address is malformed (RFC) This is a shame. I thought it was a really good idea. Chris
Hide
Arnaud saint-Georges added a comment - - edited

Thanks for your input, Chris.
Indeed, the student address is malformed and your anti-spam software checks it out.
I suppose that you kept the line:
To: "Students subscribed to forum News in course Course of John Teacher"
Could you please test with, in addition, a foo but well-formed "To" address? E.g. students@moodle.edu (where "moodle.edu" is of course your domain name), so:
To: "Students subscribed to forum News in course Course of John Teacher" <students@moodle.edu>

Show
Arnaud saint-Georges added a comment - - edited Thanks for your input, Chris. Indeed, the student address is malformed and your anti-spam software checks it out. I suppose that you kept the line: To: "Students subscribed to forum News in course Course of John Teacher" Could you please test with, in addition, a foo but well-formed "To" address? E.g. students@moodle.edu (where "moodle.edu" is of course your domain name), so: To: "Students subscribed to forum News in course Course of John Teacher" <students@moodle.edu>

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated: