Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-06 Thread Stephen J. Turnbull
Aanand Shekhar Roy writes:

 Banned word plug-in, which was also then added to the wiki page of idea
 lists)

   As you know, I'm not a fan of this one.
  
  This feature as a plug-in is desired by many list admins. So that
  they can maintain a decency on the list and avoid usage of certain
  unwanted words.  I personally talked to some people about this as
  plugin and the response was enthusiastic.

I don't think you read what I wrote.  If not, DO IT NOW.  If you did,
DO IT AGAIN.

  For eg. 1) If I run a list that takes feedback from customers about
  services of my company provides , then I wouldn't want
  abuses or indecent reviews since the list is public and might hurt
  anyone's sentiments.
  2) My list discusses on social causes and some anti social elements use
  racial slurs and strong views against a particular group, I might want to
  avoid this from the list.

I'm insulted that you think I'm such a slut that I don't understand
the motivation for this idea.  I'm pretty much decided that I will be
unlikely to be willing to mentor you, and I doubt you're doing
yourself any favors with the other potential mentors.  You have *more
than enough* time to change my mind, but your attitude so far isn't
encouraging.

A quick hint: I'm not trying to tell you that requiring politically
correct speech is stupid.  What I'm trying to tell you is that banning
the seven words you can never say on television[1] is neither
trivial nor sufficient.

IMO a trivial implementation will suck, a better implementation (eg,
the generic regexp-based one I described) probably will be less than
useful to many (IMHO, most) potential users, and a *good*
implementation probably cannot be done by a mailing list, period.  If
you think you know better than that, be my guest, but you'd better
address the practical problems of designing a nice *implementation*,
not insist on the desirability of the *concept*, or you will have
trouble attracting a mentor.

  I wish to combine it with other plug-ins that I am going to propose so
  that together they can make a summer sized  project.

As I already told you, AFAIK that's risky.  GSoC is about *one*
summer-sized idea, not about enough ideas to keep me writing
trivial programs for the whole summer.  I will ask Carol when I get
back from this business trip, but if I were you I'd start looking for
*one* project you're not quite sure you'll be able to finish by August
1 if you start *right* now.  That's about the right size IMO.  Note: I
do not speak for the Mailman project, and I definitely don't speak for
Google on this.  But the clock is ticking and you deserve an answer so
you can get to work, and that's my answer for now.  I'll get back to
you later after I've asked Carol.  If you get a better answer from
somebody else, go with that.


Footnotes: 
[1]  http://en.wikipedia.org/wiki/Seven_dirty_words

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-06 Thread Aanand Shekhar Roy

I am extremely sorry for behaving stupidly. I in no means meant to insult
you. You are far senior in all terms and I am ashamed to have dis-honoured
you unwillingly. I got a bit excited over that without thinking
rationally. I'll try my best not repeat such an illogical action in
future. I'll work for a better proposal for gsoc.
Sorry again.

Regards
Aanand


___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-06 Thread Aanand Shekhar Roy
   Banned word plug-in, which was also then added to the wiki page of idea
   lists)
 As you know, I'm not a fan of this one.

This feature as a plug-in is desired by many list admins. So that they can
maintain a decency on the list and avoid usage of certain unwanted words.
I personally talked to some people about this as plugin and the response
was enthusiastic.
For eg. 1) If I run a list that takes feedback from customers about
services of my company provides , then I wouldn't want
abuses or indecent reviews since the list is public and might hurt
anyone's sentiments.
2) My list discusses on social causes and some anti social elements use
racial slurs and strong views against a particular group, I might want to
avoid this from the list.

I seek your reviews on this idea.

   and then if the time allows I will work on others like Timed
   Vacation, since I am willing to contribute to mailman even after
   Gsoc .

 This one I like, actually, except that the probable code size is
 small.  It's obviously useful, it will be obvious to users how to use
 it, it's obviously quite self-contained.  It's a winning feature.


I wish to combine it with other plug-ins that I am going to propose so
that together they can make a summer sized  project.

   Auto moderation system for limiting posts on a particular thread

I am trying to work around the approach that can be used to build such a
system. I will get back to you after I get something substantial on it.

Regards
Aanand


___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-05 Thread Stephen J. Turnbull
Aanand Shekhar Roy writes:

  Suppose I have posted my confidential information on mailing list,
  and the list setting is neither accept nor discard any mails
  having confidential information.

I think you really should give up on this idea as stated.  This
function really should be implemented in the user agent, as a plug-in
with a large dictionary of user-contributed criteria, as Spamassassin
does for spam.  Such a plug-in could also be used in the enterprise in
the MTA.  But a list knows too little about confidential, it knows
too little about individual concerns for privacy, to do a good job.
The only thing going for a list is that lists often are relatively
public and so relatively high potential for leaks.  But it's quite
easy for an MUA to figure out which destinations are lists (most lists
nowadays sport RFC 2369 header fields), so that takes care of the
list.

The MUA also can be intelligent about things like corporate contact
addresses in the automatically added footer.  More important, the
author of the mail controls the rules (see disadvantage 2.d below).

What to do instead:

You can generalize to allow Mailman to filter on regular expressions
in the body (this should be easy to do simply, but watch out for MIME
structure and very large messages).  That has been requested in the
past.  I believe the reason we don't do that already is that
applications like Spamassassin and ClamAV do the job of filtering for
malicious mail *much* better than we can (because they already have
those libraries of criteria), and there aren't other good use cases.

I'm not sure this is big enough to be a GSoC project (Mark or Barry
would have better judgment), but it's much more likely to be useful
and could be applied to your desired application.

  So I had to ask which one approach is better?

Both seem pretty bad to me.

  1.Including a command like accept_confidential at start of message or
  subject.

This has three disadvantages.

a. Users are notoriously poor at using the commands, and not very good
   at spelling them correctly.

b. If you reject the mail and *don't* provide the original text, the
   user has to reconstruct the mail from memory if they haven't saved
   it.  (This may not be such a problem with modern MUAs, but the ones
   I use don't keep file copies of sent mail automatically.)

c. If you reject the mail and *do* provide the original text, you are
   providing a spam vector.  (Spammer sends mail *from* the victim's
   address and includes confidential information but deliberately
   omits the command.)

  2.Sending the mail, getting an auto-reply from reply-bot like  your mail
  contains confidential info. reply with confirm   .

This has four disadvantages.

a. Most users are unlikely to care about the phone numbers etc in
   their mail.  False positive rate will be high, and the please
   confirm spams similarly annoying.

b. If you reject the mail and *don't* provide the original text, the
   user has to reconstruct the mail from memory if they haven't saved
   it.  True, the list has the mail and will resend it, but the user
   needs to be able to figure out *why* the mail was held, and that
   may not be at all obvious without the original text.

c. If you reject the mail and *do* provide the original text, you are
   providing a spam vector.  (Spammer sends mail *from* the victim's
   address and includes confidential information.)

d. Since the author doesn't control the rule set, it may be
   *impossible* for her to construct a mail that will convey the
   desired information and still pass the filter.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-05 Thread Stephen J. Turnbull
Aanand Shekhar Roy writes:

  Banned word plug-in, which was also then added to the wiki page of idea
  lists)

As you know, I'm not a fan of this one.

  and then if the time allows I will work on others like Timed
  Vacation, since I am willing to contribute to mailman even after
  Gsoc .

This one I like, actually, except that the probable code size is
small.  It's obviously useful, it will be obvious to users how to use
it, it's obviously quite self-contained.  It's a winning feature.

  Is that ok or do i increase or decrease the no. ?

I'm going to need to ask Carol about number.  As I understand it, GSoC
is supposed to be one summer-sized project to give the interns a
taste of what it's like to work on a project that can't be done in a
single all-night sprint.  It also has the benefit of being a lot more
interesting for the mentors.

That is, if you write 5 bite-sized plugins, most of your code will be
API and testing boilerplate, repeated 5 times.

  Though it depends more on the complexity of my idea but since every
  setting we make in mailman needs to be reflected to web UI too so I
  guess it will be big enough for Gsoc.

If the Postorius folks are doing their job that's not a big deal,
*much* smaller than writing documentation, let alone tests.

  Since following up this idea wouldn't be as great. Can you guide on
  Auto moderation system for limiting posts on a particular thread
  posted by a user Like first 5 post will reach immediately, later 5
  will be after 1 hour delay and so on.

As a project it has quite a bit of flavor.  There are some interesting
issues having to do with the impact on message queues, and whether it
could present an opportunity for DOS attacks on the server (note that
even if you don't fill the disk, you could end up with a lot of
messages queued for delivery all at once sometime next week).

It might be interesting to think about alternative triggers for
delivery, such as having a don't-post-before attribute in msg_data,
and instead of running the queue at a specific time, just wait until
the next time the queue would normally be run, and if the current time
is greater than don't-post-before, post.

Note that there's no guarantee that messages will be delivered at a
given time in any case.  You can only ensure a minimum delay, but if
an MX goes down in the meantime, a 1 hour delay could turn into days.


___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-04 Thread Aanand Shekhar Roy
Hi,
I have a doubt regarding auto-responding
Suppose I have posted my confidential information on mailing list, and the
list setting is neither accept nor discard any mails having
confidential information.Whether it should be posted or not depends on the
user .So I had to ask which one approach is better?
1.Including a command like accept_confidential at start of message or
subject.
or
2.Sending the mail, getting an auto-reply from reply-bot like  your mail
contains confidential info. reply with confirm   .

Regards
Aanand



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-03 Thread Aanand Shekhar Roy
Thanks Steve for guiding me through. I am working on your advise.

 Aanand Shekhar Roy writes:

   I was wondering if this approach for creating the plug-in would work:
   When the plugin is installed, its .config file will check if required
   interfaces are present in the local machine and find and install the
 code
   of plug-in at required place in local machine. A new Rule gets added(by
   .config file) in src/mailman/rules that uses IRule interface which
 checks
   our requirements(i.e. confidential information check, banned words
 etc).
   This rule will be added in src/mailman/chain. The rule is checked when
   chain runs and takes the action set corresponding to the rule. We make
 a
   module implementing IHandler that modifies the text before forwarding
 it
   in the pipeline in which the whole process is running.

 I think you're getting way ahead of yourself.

 The normal installation process is for the site administrator or the
 host administrator to just copy the plugin module into the
 installation, pip any supporting modules from PyPI, and add the
 Handler or Rule to the appropriate pipeline or chain by editing the
 site config or (for list-local features) the list config.  I don't see
 a need for .configs that check interfaces and install code.  Why
 do you think you need such things?

 Since all of the features you've mentioned so far are mutators, I
 don't really see a need for Rules.  Implement the checks in the
 Handler.  Either you'll need to duplicate those checks anyway to find
 the places that need changing, or you'll need to invent a rather
 complex protocol to tell the Handler that does the modification what
 to do.

 Yes, the Handler will implement IHandler.



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-02 Thread Stephen J. Turnbull
Aanand Shekhar Roy writes:

  I was wondering if this approach for creating the plug-in would work:
  When the plugin is installed, its .config file will check if required
  interfaces are present in the local machine and find and install the code
  of plug-in at required place in local machine. A new Rule gets added(by
  .config file) in src/mailman/rules that uses IRule interface which checks
  our requirements(i.e. confidential information check, banned words etc).
  This rule will be added in src/mailman/chain. The rule is checked when
  chain runs and takes the action set corresponding to the rule. We make a
  module implementing IHandler that modifies the text before forwarding it
  in the pipeline in which the whole process is running.

I think you're getting way ahead of yourself.

The normal installation process is for the site administrator or the
host administrator to just copy the plugin module into the
installation, pip any supporting modules from PyPI, and add the
Handler or Rule to the appropriate pipeline or chain by editing the
site config or (for list-local features) the list config.  I don't see
a need for .configs that check interfaces and install code.  Why
do you think you need such things?

Since all of the features you've mentioned so far are mutators, I
don't really see a need for Rules.  Implement the checks in the
Handler.  Either you'll need to duplicate those checks anyway to find
the places that need changing, or you'll need to invent a rather
complex protocol to tell the Handler that does the modification what
to do.

Yes, the Handler will implement IHandler.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-02 Thread Aanand Shekhar Roy
Hi,
I was wondering if this approach for creating the plug-in would work:
When the plugin is installed, its .config file will check if required
interfaces are present in the local machine and find and install the code
of plug-in at required place in local machine. A new Rule gets added(by
.config file) in src/mailman/rules that uses IRule interface which checks
our requirements(i.e. confidential information check, banned words etc).
This rule will be added in src/mailman/chain. The rule is checked when
chain runs and takes the action set corresponding to the rule. We make a
module implementing IHandler that modifies the text before forwarding it
in the pipeline in which the whole process is running.

 Aanand Shekhar Roy writes:

   I was seeking was how to integrate it with the existing src of
   mailman in a user's computer.

 You don't integrate [a plugin] with source.  The point of what is
 conventionally meant by plugin is that you can add it to an existing
 installation, and it will just work.

 In Mailman, enabling a handler is done by adding the handler module
 (either as Python source, which will be automatically compiled, or as
 a precompiled .pyc) to the handlers directory in the installation.
 Any packages imported by the plugin can be placed anywhere on the
 PYTHON_PATH.

 To actually configure the plugin for use, you install it in the
 appropriate place in a pipeline or chain.  The defaults are kept in
 pipelines.py and chains.py.  I suppose that you can also add them in
 config/mailman.cfg, but I'm not sure of the syntax (I haven't tried to
 do this and don't see any documentation or examples in the obvious
 places).  It should also be possible to add handlers to pipelines for
 individual lists, I guess.



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-01 Thread Stephen J. Turnbull
Aanand Shekhar Roy writes:

  I was seeking was how to integrate it with the existing src of
  mailman in a user's computer.

You don't integrate [a plugin] with source.  The point of what is
conventionally meant by plugin is that you can add it to an existing
installation, and it will just work.

In Mailman, enabling a handler is done by adding the handler module
(either as Python source, which will be automatically compiled, or as
a precompiled .pyc) to the handlers directory in the installation.
Any packages imported by the plugin can be placed anywhere on the
PYTHON_PATH.

To actually configure the plugin for use, you install it in the
appropriate place in a pipeline or chain.  The defaults are kept in
pipelines.py and chains.py.  I suppose that you can also add them in
config/mailman.cfg, but I'm not sure of the syntax (I haven't tried to
do this and don't see any documentation or examples in the obvious
places).  It should also be possible to add handlers to pipelines for
individual lists, I guess.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Query regarding plugin integration with mailman3

2015-03-01 Thread Aanand Shekhar Roy

I am a bit under confusion here, I thought Chain handlers and rules were
to be used to create the modules that implement the plug-ins (which i had
mentioned in my previous mail, subject:Approach for plugin ideas), what
I was seeking was how to integrate it with the existing src of mailman in
a user's computer. I was wondering how the modules will get connected to
mailman src after they are downloaded and installed.
Which is by making a config file and setup.py file.
Am i missing something here

 See

 src/Mailman/mailman/src/mailman/core/chains.py
 src/Mailman/mailman/src/mailman/core/pipelines.py

 [@Barry This stuff seems kinda underdocumented, at least in this module?]

 This is not the way to create a plugin for a Python program.  The
 chains and pipelines code show the right way to do that: create a
 simple module that Python can import given its name, and then have
 that module do any further loading of code necessary for the plugin
 implementation.

 The question that remains is whether a chain (which is used to check
 whether a message should be distributed at all) or a pipeline handler
 (which manipulates messages) is sufficient for the plugins you
 envision.  I don't see why they would not be -- they are quite general
 mechanisms -- but there may be edge cases I haven't thought of.

 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/2013165%40iiitdmj.ac.in

 Security Policy: http://wiki.list.org/x/QIA9



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9