Question

I am working on a Mailing-List system combined with an online Forum. Mail Input (Via Postfix forward to Script) works and after receiving an E-Mail the script should process it and send it out.

Processing and everything works, sending too.

I Have a list (list@example.com) that is accessible for few adresses (eg user1@ user2@ user3@example.com and user1@ user2@ user3@otherdomain.com)

If one user sends a mail to the list it is delivered t oa php script, that does the processing (Checking if user has rights, adding some Information to the Message eg. sign out link) and sends the mail out to the list-recipients.

But I want to have a behaviour like this for the from the script Outgoing mail:

  • From is original Sender
  • To in the mail is the Mailing list (list@example.com)[X]
  • Reply To is the mailing list
  • Subject is Modified
  • Body is modified
  • Real To is the receiver of the list.

Here's the problem: [X] So I want to send out a Mail, that just delivers to bcc and not to to, but has a to address.

I am Using swift-mailer in Codeigniter.

If I'll send it to the list itself, I would create a infinite loop, because all mails to the list

Was it helpful?

Solution

The To field indicates a recipient. To not have a To recipient, leave the To field empty.

In order to workaround this and include a To field that will not be a recipient, I believe some lists use a X-BeenThere header:

X-BeenThere: listaddress@domain.org
To: listaddress@domain.org

Then when the list receives the email back — which it will do along with all your BCC "real" recipients — it can simply ignore it because X-BeenThere matches its address. This prevents the loop.

I do not know how standard this is, whether Swift-Mailer supports it and if not how to make it so. I observed this precedent with the gpsd-users list.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top