Colin Viebrock | 29 Nov 2007 22:08
Picon
Gravatar

Patch for posting=reject

Hi again,

I know most of the development is focusing on the 2.0 branch, but I  
thought I'd submit the following patch I've made to EoC 1.2.6.

I wanted a fourth option for posting, so that posts from list members  
are allow through but posts from anyone else are rejected (instead of  
moderated like posting=auto does).  My Python is pretty limited, but  
this seems to do the trick:

--- eoc.py.BAK  2007-11-29 15:57:14.421420184 -0500
+++ eoc.py      2007-11-29 16:03:54.161243272 -0500
 <at>  <at>  -452,7 +452,7  <at>  <at> 

  class MailingList:

-    posting_opts = ["auto", "free", "moderated"]
+    posting_opts = ["auto", "free", "moderated", "reject"]

      def __init__(self, mlm, name):
          self.mlm = mlm
 <at>  <at>  -963,6 +963,9  <at>  <at> 
                             })
          self.send_info_message([poster], "msg-wait", {})

+    def post_reject(self, poster ):
+        self.send_info_message([poster], "msg-reject", {})
+
      def should_be_moderated(self, posting, poster):
          if posting == "moderated":
(Continue reading)

Johannes Berg | 30 Nov 2007 12:56
Favicon

Re: Patch for posting=reject

Hi,

> I know most of the development is focusing on the 2.0 branch, but I  
> thought I'd submit the following patch I've made to EoC 1.2.6.
> 
> I wanted a fourth option for posting, so that posts from list members  
> are allow through but posts from anyone else are rejected (instead of  
> moderated like posting=auto does).  My Python is pretty limited, but  
> this seems to do the trick:

That's interesting. I have a few tricks to check things during the SMTP
transaction, for example whether the mailing lists exists, so that
rarely never need to *send* bounces (I reject after DATA or so). How
well would this integrate? Could there be a command line option for
this, say
--check-sender-allowed asdf@...

johannes
Jeff Breidenbach | 30 Nov 2007 18:28

Re: Patch for posting=reject

Search for "rude patch" and "EoC" to see what I think is a better
approach. (I'm always afraid of spam with forged senders, and being
an indirect source for generating even more spam)

On Nov 30, 2007 3:56 AM, Johannes Berg <johannes@...> wrote:
> Hi,
>
> > I know most of the development is focusing on the 2.0 branch, but I
> > thought I'd submit the following patch I've made to EoC 1.2.6.
> >
> > I wanted a fourth option for posting, so that posts from list members
> > are allow through but posts from anyone else are rejected (instead of
> > moderated like posting=auto does).  My Python is pretty limited, but
> > this seems to do the trick:
>
> That's interesting. I have a few tricks to check things during the SMTP
> transaction, for example whether the mailing lists exists, so that
> rarely never need to *send* bounces (I reject after DATA or so). How
> well would this integrate? Could there be a command line option for
> this, say
> --check-sender-allowed asdf@...
>
>
> johannes
>

--

-- 
To unsubscribe, send mail to eoc-unsubscribe@...

See the Enemies of Carlotta home page at <http://liw.iki.fi/liw/eoc/>
(Continue reading)

Johannes Berg | 3 Dec 2007 11:34
Favicon

Re: Patch for posting=reject


On Fri, 2007-11-30 at 09:28 -0800, Jeff Breidenbach wrote:
> Search for "rude patch" and "EoC" to see what I think is a better
> approach. (I'm always afraid of spam with forged senders, and being
> an indirect source for generating even more spam)

Well yes, but I think giving a good reject message to the sending SMTP
server is a lot better than silently dropping mail on the floor. YMMV,
and it also depends on the list.

johannes
Colin Viebrock | 30 Nov 2007 20:27
Picon
Gravatar

Re: Patch for posting=reject

I agree that sending a reject message to an unsuspecting victim of  
forged headers is A Bad Thing (tm).  With the patch I have, you can  
just delete the msg-reject template and EoC should simply reject the  
posting without an explanatory message.

As for taking care of all this during the SMTP transaction ... I  
suppose that would be better.  However, you've then got to get the  
list of subscribers in a format that your mailer can read, keep both  
lists synced, or something along those lines.  My patch was a quick  
fix to put in some functionality I thought was common in MLM (and  
which I needed).  If there are better ways to do it in future EoC  
releases ... great!

- Colin

On 30-Nov-07, at 12:28 PM, Jeff Breidenbach wrote:

> Search for "rude patch" and "EoC" to see what I think is a better
> approach. (I'm always afraid of spam with forged senders, and being
> an indirect source for generating even more spam)
>
> On Nov 30, 2007 3:56 AM, Johannes Berg <johannes@...>  
> wrote:
>> Hi,
>>
>>> I know most of the development is focusing on the 2.0 branch, but I
>>> thought I'd submit the following patch I've made to EoC 1.2.6.
>>>
>>> I wanted a fourth option for posting, so that posts from list  
>>> members
(Continue reading)

Johannes Berg | 3 Dec 2007 12:59
Favicon

Re: Patch for posting=reject


> As for taking care of all this during the SMTP transaction ... I  
> suppose that would be better.  However, you've then got to get the  
> list of subscribers in a format that your mailer can read, keep both  
> lists synced, or something along those lines.  My patch was a quick  
> fix to put in some functionality I thought was common in MLM (and  
> which I needed).  If there are better ways to do it in future EoC  
> releases ... great!

Well, what I'd do instead of keeping two lists synced or whatever is to
just ask eoc during the smtp transaction. This is trivial to do with
exim for example, but it'd require a command line option to eoc to
invoke the check it does and return the exit status as appropriate.

johannes
Colin Viebrock | 3 Dec 2007 15:51
Picon
Gravatar

Re: Patch for posting=reject

Show me how to make it trivial for Postfix, and I'd use it!  :)

- Colin

On 3-Dec-07, at 6:59 AM, Johannes Berg wrote:

>
>> As for taking care of all this during the SMTP transaction ... I
>> suppose that would be better.  However, you've then got to get the
>> list of subscribers in a format that your mailer can read, keep both
>> lists synced, or something along those lines.  My patch was a quick
>> fix to put in some functionality I thought was common in MLM (and
>> which I needed).  If there are better ways to do it in future EoC
>> releases ... great!
>
> Well, what I'd do instead of keeping two lists synced or whatever  
> is to
> just ask eoc during the smtp transaction. This is trivial to do with
> exim for example, but it'd require a command line option to eoc to
> invoke the check it does and return the exit status as appropriate.
>
> johannes

--

-- 
To unsubscribe, send mail to eoc-unsubscribe@...

See the Enemies of Carlotta home page at <http://liw.iki.fi/liw/eoc/>

Johannes Berg | 4 Dec 2007 13:34
Favicon

Re: Patch for posting=reject


On Mon, 2007-12-03 at 09:51 -0500, Colin Viebrock wrote:
> Show me how to make it trivial for Postfix, and I'd use it!  :)

Heh. Well, I have no idea whether postfix supports this, but exim can
call out to a binary during the smtp transaction. I have a simple setuid
wrapper for EoC (that only exim can invoke) which it will call to test
for example whether a given mailing list extension address is valid,
rather than hardcoding the valid list of extension addresses in the
configuration.

johannes

Gmane