Re: [Mailman-Users] Automate Moderator Functions

2016-09-05 Thread Andre de Azevedo Cunha
Mark, 

i solved like this: 

REPLACED THIS: 

#default action (moderate)
#hold_for_approval(mlist, msg, msgdata,
# MessageTooBig(bodylen, mlist.max_message_size)) 

FOR THIS: 

#auto rejecting emails bigger then max_message_size
f_log=open('/var/log/mailman/reject','a')
f_log.write('Message from %s to %s rejected. Size exceed: %s KB\n'%
(sender, listname, bodylen/1024))
f_log.close()
rej2="Our message was rejected because is bigger then list max value (
%s KB ), please reduce the message to bellow of %s KB and try again"%
(bodylen/1024, mlist.max_message_size)
raise Errors.RejectMessage, rej2 

Thanks for your support and availability. 

Regards, 

--- 

Em 05/09/2016 12:57, Mark Sapiro escreveu:

> On 09/05/2016 07:10 AM, Andre de Azevedo Cunha wrote: 
> 
>> Mark,
>> 
>> the important to me is reject emails to the lists bigger then the value set 
>> in 
>> MAX_MESSAGE_SIZE in the list`s config. The default behavior is moderate this 
>> message, what don`t solve me problem. Exist one way to do this?
> 
> I understand what you are trying to do and what you have done should
> work. As I said in my prior reply
> 
> Em 03/09/2016 13:00, Mark Sapiro escreveu:
> 
> On 09/02/2016 01:45 PM, Andre de Azevedo Cunha wrote: 
> The message was rejected, but the sender dont receive any notify about
> that. The mailman vette log too. How can i solve this? 
> 
> Logging for rejected messages was added in 2.1.16. See
> . Prior to that, there
> won't be a vette log entry.
> 
> I don't know why there isn't a notice to the user. Is there anything in
> Mailman's error log?
> 
> As a test, add some nonmember address to the list's
> reject_these_nonmembers and send a post from that address. Does that
> receive a rejection notice?

In order to help further, I need more information. Did you look in
Mailman's error log? Did you do the test suggested above?

Send me off list a copy of your modified Mailman/Handlers/Hold.py module
and I'll look at it to see if there is a problem there.

Also, if you want rejections to be logged in vette, you can apply the
attached patch to Mailman/Queue/IncommingRunner.py.
--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Automate Moderator Functions

2016-09-05 Thread Mark Sapiro
On 09/05/2016 07:10 AM, Andre de Azevedo Cunha wrote:
> Mark,
> 
> 
> the important to me is reject emails to the lists bigger then the value set 
> in 
> MAX_MESSAGE_SIZE in the list`s config. The default behavior is moderate this 
> message, what don`t solve me problem. Exist one way to do this?


I understand what you are trying to do and what you have done should
work. As I said in my prior reply


> Em 03/09/2016 13:00, Mark Sapiro escreveu:
> 
>> On 09/02/2016 01:45 PM, Andre de Azevedo Cunha wrote:
>>>
>>> The message was rejected, but the sender dont receive any notify about
>>> that. The mailman vette log too. How can i solve this?
>>
>>
>> Logging for rejected messages was added in 2.1.16. See
>> . Prior to that, there
>> won't be a vette log entry.
>>
>> I don't know why there isn't a notice to the user. Is there anything in
>> Mailman's error log?
>>
>> As a test, add some nonmember address to the list's
>> reject_these_nonmembers and send a post from that address. Does that
>> receive a rejection notice?


In order to help further, I need more information. Did you look in
Mailman's error log? Did you do the test suggested above?

Send me off list a copy of your modified Mailman/Handlers/Hold.py module
and I'll look at it to see if there is a problem there.

Also, if you want rejections to be logged in vette, you can apply the
attached patch to Mailman/Queue/IncommingRunner.py.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
=== modified file 'Mailman/Queue/IncomingRunner.py'
--- Mailman/Queue/IncomingRunner.py	2005-08-27 01:40:17 +
+++ Mailman/Queue/IncomingRunner.py	2012-10-21 20:32:18 +
@@ -165,6 +165,13 @@
 # longer needs to be queued.
 return 0
 except Errors.RejectMessage, e:
+# Log this.
+syslog('vette', """Message rejected, msgid: %s
+list: %s,
+handler: %s,
+reason: %s""",
+   msg.get('message-id', 'n/a'),
+   mlist.real_name, handler, e.notice())
 mlist.BounceMessage(msg, msgdata, e)
 return 0
 except:

--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Re: [Mailman-Users] Automate Moderator Functions

2016-09-05 Thread Andre de Azevedo Cunha
Mark, 

the important to me is reject emails to the lists bigger then the value
set in MAX_MESSAGE_SIZE in the list`s config. The default behavior is
moderate this message, what don`t solve me problem. Exist one way to do
this?

---

Em 03/09/2016 13:00, Mark Sapiro escreveu:

> On 09/02/2016 01:45 PM, Andre de Azevedo Cunha wrote: 
> 
>> i`m trying to reject messages bigger then MAX_MESSAGE_SIZE.  
>> 
>> I configured my Hold.py was described bellow:
>> 
>> replaced
>> 
>> hold_for_approval(mlist, msg, msgdata,
>> _  
>> MessageTooBig(bodylen,_mlist.max_message_size))
>> 
>> with
>> 
>> rej = MessageTooBig(bodylen, mlist.max_message_size)
>> _ raise Errors.RejectMessage, rej.reason_notice_
>> 
>> The message was rejected, but the sender dont receive any notify about
>> that. The mailman vette log too. How can i solve this?
> 
> Logging for rejected messages was added in 2.1.16. See
> . Prior to that, there
> won't be a vette log entry.
> 
> I don't know why there isn't a notice to the user. Is there anything in
> Mailman's error log?
> 
> As a test, add some nonmember address to the list's
> reject_these_nonmembers and send a post from that address. Does that
> receive a rejection notice?
--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Update mailman MacServer5

2016-09-05 Thread Matthias Schmidt via Mailman-Users
Timothy,

thanks for the tip, but I do not intend to install MacPorts as I had different 
experiences with it in the past.

Besides that, mailman is now running fine now.

The only problem left is that the include of the cgi link of the mailman config 
is not working with the current Apache setup.
I guess it has something to do with the new way Apple handles every website 
hosted on the box through a proxy and I still need to find out how that works - 
will do so tomorrow ;-)

If you don’t mind, you could post your config for your website hosting your 
list.

thanks
Matthias

> Am 05.09.2016 um 02:52 schrieb Timothy Jasionowski :
> 
> I think I may have sent this directly, but...
> 
> Mattias,
> 
> I had good luck installing mailman on El Capitan/Server 5 using MacPorts, as 
> it manages all the dependencies and integrates all the chron jobs and startup 
> stuff, but due to some legacy issues with the MacPorts configuration file, 
> the build appends the .cgi prefix in the URI construction. It, otherwise, 
> works fine. It avoided a lot of the issues you had in configuring it and, 
> more importantly, maintaining it.
> 
> If you want to get rid of the extension, download macports, refresh the build 
> index, then edit the macports mailman build file, replacing:
> 
> configure.args  --with-cgi-ext=.cgi \
> --with-cgi-gid=${cgigroup} \
> 
> with
> 
> configure.args  --with-cgi-gid=${cgigroup} \
> 
> Thanks again to Marius Schamschula for that tip, as it drove me crazy.
> 
> Timothy
> 
> Sent from my iPhone
> 
>> On Sep 4, 2016, at 11:53, Mark Sapiro  wrote:
>> 
>>> On 09/04/2016 01:56 AM, Matthias Schmidt via Mailman-Users wrote:
>>> sorry for being such a pain today _/\_
>>> 
>>> now the webinterface is not coming up.
>>> It looks like the cgi is not executed instead a 404 error is generated
>>> 
>>> my mailman.conf for apache looks like that (it’s basically the same as on 
>>> 10.6, I just changed the path):
>>> 
>>> ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
>> 
>> 
>> This is OK, but ...
>> 
>> 
>>> Alias /pipermail/ "/var/mailman/archives/public/"
>>> 
>>>   Options FollowSymLinks MultiViews Indexes
>>>   AllowOverride None
>>>   Order allow,deny
>>>   Allow from all
>>> 
>>> 
>>> it is included with http.conf
>>> 
>>> for the site I have a redirect:
>>> RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^liste\.dinj\.de.$
>>> RewriteRule ^/(.*) https://%{SERVER_NAME}/mailman/listinfo/dinj  
>>> [L,R=permanent]
>>> and that stuff was working on 10.6
>> 
>> 
>> And all that does is redirect 'http(s)://liste.dinj.de/' to
>> 'https://%{SERVER_NAME}/mailman/listinfo/dinj'
>> 
>> 
>>> the logs say this:
>>> [Sun Sep 04 17:41:42.375938 2016] [:debug] [pid 95364] 
>>> mod_hfs_apple2.c(397): [client 127.0.0.1:59199] mod_hfs_apple: Allowing 
>>> access with matching directory. filename = /WebFolder/dinj/mailman
>>> [Sun Sep 04 17:41:42.375977 2016] [core:info] [pid 95364] [client 
>>> 127.0.0.1:59199] AH00128: File does not exist: 
>>> /WebFolder/dinj/mailman/listinfo/dinj
>> 
>> 
>> So why is Apache looking for /WebFolder/dinj/mailman/listinfo/dinj? Is
>> /WebFolder/dinj the DocumentRoot?
>> 
>> Does this happen with any mailman URL? If you go to
>> 'https://liste.dinj.de/mailman/admin/dinj' do you get a similar 404 or
>> only if you go to' https://liste.dinj.de/'.
>> 
>> Somehow your 'ScriptAlias /mailman/' directive is not effective. In a
>> more or less normal apache configuration it is not sufficient to put
>> mailman.conf in /etc/apache2/conf.d/, you must also have a symlink to it
>> in /etc/apache2/conf-enabled/. I have no idea if this applies to Mac OX
>> X Server, but you need to look at your Include and IncludeOptional
>> directives in the main apache2.conf or whatever it's called to ensure
>> that mailman.conf is directly or indirectly included.
>> 
>> 
>>> /usr/local/mailman/cgi-bin/ has permissions set to 775
>> 
>> 
>> It should be 2775 (drwxrwsr-w) but the important thing is the files
>> therein should be 2755 (-rwxr-sr-x).
>> 
>> --
>> 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
>> https://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: 
>> https://mail.python.org/mailman/options/mailman-users/timothy.d%40jasionow.ski
> --
> Mailman-Users mailing list Mailman-Users@python.org
> https://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: 

Re: [Mailman-Users] Digest formatting--clickable TOC?

2016-09-05 Thread Lucio Chiappetti

On Fri, 2 Sep 2016, Matt Morgan wrote:

The eventual publication looks a lot like a mailman digest, and that's 
what I'm switching it to.


I see that over the weekend there was some discussion about digests, not 
only in this thread !


I understand that mailman can do digests as a series of MIME attachments 
to the TOC email, one for each posting. I don't think that's going to 
work for this crowd, although I'm not sure.


Personally I do use MIME digests (not plain text ones) for almost all the 
lists I'm subscribed to (actually ALL which allow it). But then my MUA 
(Alpine) with some customization (including a formail-based shell script) 
can turn the MIME digests into a temporary mail folder, where I can access 
each posting as a normal e-mail.  And even if I would not have my scripts, 
I could still natively view the attachment index and access the RFC822 
attachment one by one as a normal e-mail.


--

Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

Do not like Firefox >=29 ?  Get Pale Moon !  http://www.palemoon.org
--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org