[Mailman-Users] command line import dupes option

2012-10-19 Thread Dan Young


Is there a way to on/off the dupes option via command line?
Possibly withlist?

Or better yet, when I import a file of users can I set dupes unchecked?
I currently do this via command line with a text file not through web admin.

Thanks,
Dan

--
ProWeb Associates, Inc. 
717-207-7125 ext 101
1-800-892-5136 ext 101
--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] Content Filtering

2012-10-19 Thread Roger Richmond
Hello all.  

 

I'm list administrator for a new UK healthcare mailing list.  I want to add
a disclaimer to all emails as a footer, and have set it up in the non Digest
Options.  I also want the footer to appear in the body of the email, not as
an attachment.

 

If I set  Content Filtering to "Yes"  This works.  The other content
filtering options are:

 

Pass Mime Types-

multipart

multipart/mixed

multipart/alternative

text/plain

image

 

Remove attachments-

exe

bat

cmd

com

pif

scr

vbs

cpl

 

Edit collapse alternatives and Edit convert HTML are both YES.

 

The problem - one of the recipients' messages keeps bouncing with this error
message:

The attached message matched the ukmastocytosissupport_ukmasto.org mailing
list's content filtering rules and was prevented from being forwarded on to
the list membership.  You are receiving the only remaining copy of the
discarded message.

 

Emails bounce when there is no attachment and when the subject and content
are just "Test".

 

If I revert to no content filtering the footer is sent as an attachment.

 

The only difference I can see is that the email address is of the format
 "Christian name"@"Surname".net

 

Any help would be greatly appreciated.

 

Roger 

 

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] Automated Subscription Bots Inundating List Owners With Subscription Requests

2012-10-19 Thread Kalbfleisch, Gary

For the past couple days my Mailman server has been hammered with automated 
subscription requests.  I've always seen a few here and there but nothing like 
this.  Thousands of them, exploiting the web interface and replying to 
confirmation email messages.  Many of our lists were open subscription and so 
some got through.  Not a lot though.  What's most annoying is that list owners 
are being inundated with confirmation request messages, and you cannot delete 
them all at once on the "Tend to pending moderator requests" screen.  You have 
to select "Discard" for each of them individually.  I don't know if this has 
been changed yet.   I am running 2.1.9 because that is the latest version 
available from Redhat as a package.  I had to block access to the web interface 
from off site at our router to stop the deluge of messages.  I have seen this 
starting to occur at some other Mailman sites as well.  Anyone else seeing this 
or have any ideas about how best to handle this?  I have it under con
 trol for now but it is changing the way we use our lists.


-- Gary Kalbfleisch
-- Director of Technology Support Services
-- Shoreline Community College
-- (206) 546-5813
-- (206) 546-6943 Fax


--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Content Filtering

2012-10-19 Thread Mark Sapiro
Roger Richmond wrote:
>
>Pass Mime Types-
>
>multipart
>
>multipart/mixed
>
>multipart/alternative


The above two lines are redundant because you are alreaty accepting all
multipart types with the first line.


>text/plain
>
>image


You are accepting attached images. This means any message with an
attached image will be multipart after content filtering and will
result in the footer being added as an attachment to those messages.


[...]
>Edit collapse alternatives and Edit convert HTML are both YES.
>
> 
>
>The problem - one of the recipients' messages keeps bouncing with this error
>message:
>
>The attached message matched the ukmastocytosissupport_ukmasto.org mailing
>list's content filtering rules and was prevented from being forwarded on to
>the list membership.  You are receiving the only remaining copy of the
>discarded message.


The message being bounced is a text/html message as opposed to a
multipart/alternative message with text/plain and text/html
alternatives. Since you don't accept text/html, the entire message is
filtered out.

You want to add text/html to the pass_mime_types list. Doing so will
accept this message and convert it to text/plain. It won't affect
multipart/alternative messages as they are already being collapsed to
the first (text/plain) part.

Note that if you encounter problems with the conversion of HTML to
plain text, see the FAQ at
.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] command line import dupes option

2012-10-19 Thread Mark Sapiro
Dan Young wrote:
>
>Is there a way to on/off the dupes option via command line?
>Possibly withlist?


See . This withlist
script turns On nodupes for all members of the list. To turn the
setting Off instead, change '1' to '0' in the line

mlist.setMemberOption(member, mm_cfg.DontReceiveDuplicates, 1)

To do only a few members (e.g. 2), change

for member in mlist.getMembers():

to

for member in ['us...@example.com', 'us...@example.com']:


>Or better yet, when I import a file of users can I set dupes unchecked?
>I currently do this via command line with a text file not through web admin.

Uncheck the "Filter out duplicate messages to list members (if
possible)" box in the list admin General Options -> new_member_options
settings before running add_members.

You could also do this via withlist. E.g.

bin/withlist -l LIST
Loading list LIST (locked)
The variable `m' is the LIST MailList instance
>>> from Mailman import mm_cfg
>>> m.new_member_options &= ~mm_cfg.DontReceiveDuplicates
>>> m.Save()
>>>
Unlocking (but not saving) list: gpc-test
Finalizing

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Mail going out to only 1 member - SOLVED

2012-10-19 Thread Mark Sapiro
This has been resolved. The post was from a non-member and
generic_nonmember_action was Reject and the SMTP recipient was the
poster being sent the rejection.

Note that generic_nonmember_action = Reject is a bad idea in general
because it causes backscatter to innocent 3rd parties with spam with
spoofed From: headers.

The fact that these rejects aren't logged is a bug
 and will be fixed.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] Automated Subscription Bots Inundating List Owners With Subscription Requests

2012-10-19 Thread Stephen J. Turnbull
Kalbfleisch, Gary writes:

 > inundated with confirmation request messages, and you cannot delete
 > them all at once on the "Tend to pending moderator requests"
 > screen.  You have to select "Discard" for each of them
 > individually.  I don't know if this has been changed yet.

As far as I can see, these are batchable (you only need to click
"Submit" once -- version 2.1.15, but I doubt this has changed in many
years).

Is your issue that the moderator has to tick each box?  I really don't
think that should change; otherwise you would lose valid subscription
requests when being attacked in this way.

Is the issue that lists get so many requests that it overflows the
screen, and you can only do (say) 20 at once?

 > I had to block access to the web interface from off site at our
 > router to stop the deluge of messages.

I think this is the best way to handle it.

There really ought to be a way for a host to request that a service be
firewalled programmatically, although it would have to be designed
*very* carefully.

 > I have seen this starting to occur at some other Mailman sites as
 > well.  Anyone else seeing this or have any ideas about how best to
 > handle this?  I have it under control for now but it is changing
 > the way we use our lists.

Sadly, I don't see how that can be avoided.  The problem is the SMTP
and HTTP protocols themselves, which have no easily used provision for
authentication or authorization of clients.  (How many students do you
know who walk around with a personal X.509 certificate?)

If you have suggestions for the admin interface, that would be very
helpful.  Even if you don't have a lot of confidence in them, this is
a hard problem that requires wild ideas.



--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Manipulate mailman in / out queue

2012-10-19 Thread Xueshan Feng
Hi Mark,

Thank you so much for taking the time to explain the details of queue
process, the meaning of the  file names  in the queue, and what's the right
way to handle files in the queue (like mv vs. cp).

I have been  managing campus mailing  service for a long time. Once in a
while we got mailbomb and messages would got stuck in queue and took long
time to drain. I have tired moves files, move dirs, with / without restart
service. Sometimes the queue would get processed quickly after my
intervene, sometimes it did not. I also worry about losing messages by
manually messing with the queue files.

It helps a lot if one understands how things work. No more trial and error
next time if I have to handle backlogs! Thank you!

Xueshan

Xueshan

On Tue, Oct 16, 2012 at 9:23 PM, Mark Sapiro  wrote:

> Xueshan Feng wrote:
> >
> >On Mon, Oct 15, 2012 at 9:35 PM, Mark Sapiro  wrote:
> >
> >> This is really more involved than I can explain without a keyboard
> which I
> >> won't have before Tues eve, but there should be only one .bak file or
> one
> >> per slice if the runner is sliced. This is the message currently being
> >> processed. All others are ignored by the current runner (they will be
> >> "recovered" if the runner is restarted).
> >>
> >
> >This helps a lot already. We do have multiple runners.
>
>
> Here are the gory details. All the heavy lifting is done by methods of
> the Switchboard class defined in Mailman/Queue/Switchbord.py.
>
> Any particular runner is specific to a particular queue or slice of a
> queue. The out/ queue is processed by OutgoingRunner. If it isn't
> sliced, it processes the whole queue. If it is sliced, there are N
> slices.
>
> Note: The filename of a queue entry consists of a time stamp, a '+', a
> 40 hex digit hash and the extension (.pck or .bak). A slice consists
> of (1/N)th of the hash space. E.g., if N = 4, slice 0 is all hashes
> with first hex digit = 0, 1, 2 or 3; slice 1 is all hashes with first
> hex digit = 4, 5, 6 or 7; slice 2 is all hashes with first hex digit =
> 8, 9, A or B, and slice 3 is all hashes with first hex digit = C, D, E
> or F.
>
> A particular slice of OutgoingRunner initializes its Switchboard
> instance once at startup or restart. This creates the queue directory
> (qfiles/out/, or whatever queue this runner processes) if necessary,
> sets the upper and lower hash bounds for its slice if sliced and
> normally, recovers all the .bak files in it's slice. Recovery consists
> of incrementing a recovery count in the entry's metadata and renaming
> it from *.bak to *.pck. Thus, immediately after (re)starting a runner,
> there will be no *.bak files in its slice. The counter is to stop
> loops where messages crash the runner. A .bak file will be recovered
> at most 3 times and then moved to qfiles/bad/*.psv.
>
> After initialization, a runner first obtains a list of all the .pck
> files in its slice, sorted by timestamp so the list is FIFO. It then
> processes the list until the list is exhausted, sleeps for a second
> and gets a new list and repeats the process. If the new list is empty,
> it just sleeps a second and tries again until it gets one or more
> entries to process.
>
> Processing consists of renaming the file from *.pck to *.bak,
> unpickling it and processing it. If it crashes in processing, it will
> recover the .bak file upon restart. Thus, there should never be more
> than one .bak file per slice.
>
>
> >> Note that part of the slowness at this point is due to the size of the
> out
> >> directory.
> >
> >
> >I was able to flush the queue today by moving long lasting *.bak out of
> the
> >way, and at the same time stopped Postfix to allow mailman to process its
> >queue. It took about half an hour to process 8000+ messages. If no manual
> >intervene, it may take a few hours.
> >
> >You can address this by stopping Mailman, moving qfiles/out aside,
> starting
> >> Mailman (which should recreate qfiles/out at the first message if not
> >> before) and then moving old entries back a few at a time.
> >>
> >
> >I think I've done that before. So moving back files into the queue in
> >batches, doesn't have to stop mailman?
>
>
> First of all, The actual physical size of the queue directory impacts
> processing. Every time an entry is added to the queue, and every time
> a .pck file is renamed to .bak, the entire physical directory must be
> searched to ensure this isn't a duplicate name. Depending on OS
> settings, cache sizes and the physical directory size, this may
> actually involve multiple disk reads each time. Thus, if the
> qfiles/out/ directory has grown large because 8000+ messages were
> added to the queue when the runner couldn't handle them (and there may
> have been more in the retry/ queue because of SMTP failures), it would
> benefit from shrinking. This is accomplished by moving (mv) or
> renaming the queue directory itself aside, not just its contents and
> then letting the runner recreate it when it starts. Then, if
> necessar