All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Schmidt <mail_ben_schmidt@yahoo.com.au>
To: mlmmj@mlmmj.org
Subject: Re: [mlmmj] bounces-help and exim
Date: Mon, 15 Feb 2016 23:18:29 +0000	[thread overview]
Message-ID: <56C25CC5.4030004@yahoo.com.au> (raw)
In-Reply-To: <CAPcb_G+ZVfXtgD1UoxzaitRhyYtWN3ToYu0kC2XgWJjjE9Jrww@mail.gmail.com>

>> I'm thinking that perhaps something is messed up with your delimiter,
>> i.e. +bounces-help is being treated like +help (+bounces-help is the
>> address used when + commands fail, like subscription, etc.).
>>
>> Do other + commands work, e.g. subscribing via email?
>
> All others work. Oh, I didn't realise +bounces-help should return what
> +help does?
>
> Or should it?

No, it shouldn't. Mlmmj should process it as a bounced 'help' message
(which could be one from +help or any other 'special' message Mlmmj
sends out, such as a request to confirm a subscription, etc.).

>> Is there anything revealing in "mlmmj-operation.log"? There should be an
>> "XXX requested help" line when help emails are sent out.
>
> Just matching lines saying mailer-daemon requested help, as below:

OK, that's good to know (along with your other diagnostics). It seems
that +help is truly being addressed.

Having looked through Mlmmj's source code and brainstormed, I think the
problem lies with how your mail is sent to your smart host.

Mlmmj sends subscription and unsubscription confirmation requests,
acknowledgements and errors, as well as digests, with a "From:" header
that is the list help address, but with an SMTP envelope-from that is
the bounce address.

It appears your mailer-daemon friend is, however, sending bounce
messages to the "From:" header.

No self-respecting MTA would do that, however.

So, I'm guessing the way your setup works is that you have Exim relaying
Mlmmj's outgoing messages. I suspect that it is saving the message to a
queue, discarding the SMTP envelope-from, and then when it grabs the
message out of the queue to deliver to your smart host, it is using the
"From:" header as the SMTP envelope-from. If that address is
undeliverable for any reason, your mailer-daemon friend sends a bounce
back, unfortunately to the wrong place, due to the substitution of the
"From:" header as the SMTP envelope-from. Mlmmj duly replies with the
help message, which your smart host redirects to their service desk
address.

What Exim should be doing is adding a Return-Path header to record the
SMTP envelope-from when it first accepts and queues the message, then
when it grabs the message from the queue, it should remove the
Return-Path header, but use its content for the SMTP envelope-from. Then
your upstream smart host will be given the correct envelope-from, and
bounces will go to the appropriate bounce address and be handled by
Mlmmj (automatically unsubscribing bouncing addresses, removing
confirmation bookkeeping for invalid addresses, etc.).

There are probably Exim configuration options that can be used to
achieve this. They're possibly off by default so that any user can't
just manipulate the envelope from by putting a Return-Path header in
their messages, potentially bypassing authentication which may
ordinarily be used to set the envelope from. I found these pages which
might help:

- <http://stackoverflow.com/a/7047164/4785823>
- 
<http://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_transports.html>
   (see return_path_add and possibly return_path)
- 
<http://www.exim.org/exim-html-current/doc/html/spec_html/ch-message_processing.html>
   (see point 15)

If you can get that working, I think things should settle down (and,
indeed, improve, because bouncing addresses will be handled, rather than
building up and making you look like a spammer).

That is, of course, assuming all of my guesses are correct about what's
going on here.

> P.S. No updates for this year:
>
> http://mlmmj.org/archive/mlmmj/

Yours was the first truly meaningful message of the year.

:-)

Ben






  parent reply	other threads:[~2016-02-15 23:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 12:44 [mlmmj] bounces-help and exim Gavin Henry
2016-02-15 22:03 ` Ben Schmidt
2016-02-15 22:21 ` Ben Schmidt
2016-02-15 23:18 ` Ben Schmidt [this message]
2016-02-16 21:01 ` Gavin Henry
2016-02-17 19:28 ` Gavin Henry

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=56C25CC5.4030004@yahoo.com.au \
    --to=mail_ben_schmidt@yahoo.com.au \
    --cc=mlmmj@mlmmj.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.