Re: POPAuth and SA 3.3.1?

2010-05-21 Thread Mark Martinec
  It's the same issue as was already resolved for the ClamAV plugin,
  the data structure changed from hash to a list (so that ordering
  of add_header can be maintained).
  
  See:
   https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6254
 
 Ah, thank you. I made this change in POPAuth.pm at line 199:
 
 -- $opts-{permsgstatus}-{main}-{conf}-{headers_ham}-{POPAuth} = 'No';
 -- $opts-{permsgstatus}-{main}-{conf}-{headers_spam}-{POPAuth} = 'No';
 ++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_ham}},
 [POPAuth, 'No'];
 ++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_spam}},
 [POPAuth, 'No'];
 
 and it seems to be working now. If any perl gurus have any tips /
 correction for the above code, please let me know.  :)

Please read the Bug 6254 comments to the end.

The above simple solution only works for one-time invocations
of spamassassassin, e.g. from a command line. When multiple
tasks in the same process are involved (spamd, amavisd),
these headers will accumulate, a proper solution is
for a plugin to add a tag (like POPAUTH), then use add_header
config directive to insert such tag into a mail header section.
See plugins ClamAVPlugin and/or ASN for implementation example.
Such solution is compatible with 3.2 and with 3.3.

  Mark


Re: POPAuth and SA 3.3.1?

2010-05-21 Thread Robert Mangiafico
On Fri, May 21, 2010 at 6:39 AM, Mark Martinec mark.martinec...@ijs.si wrote:
  It's the same issue as was already resolved for the ClamAV plugin,
  the data structure changed from hash to a list (so that ordering
  of add_header can be maintained).
 
  See:
   https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6254

 Ah, thank you. I made this change in POPAuth.pm at line 199:

 -- $opts-{permsgstatus}-{main}-{conf}-{headers_ham}-{POPAuth} = 'No';
 -- $opts-{permsgstatus}-{main}-{conf}-{headers_spam}-{POPAuth} = 'No';
 ++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_ham}},
 [POPAuth, 'No'];
 ++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_spam}},
 [POPAuth, 'No'];

 and it seems to be working now. If any perl gurus have any tips /
 correction for the above code, please let me know.  :)

 Please read the Bug 6254 comments to the end.

 The above simple solution only works for one-time invocations
 of spamassassassin, e.g. from a command line. When multiple
 tasks in the same process are involved (spamd, amavisd),
 these headers will accumulate, a proper solution is
 for a plugin to add a tag (like POPAUTH), then use add_header
 config directive to insert such tag into a mail header section.
 See plugins ClamAVPlugin and/or ASN for implementation example.
 Such solution is compatible with 3.2 and with 3.3.

Thanks Mark. I tried a few code changes, but kept getting blessing
errors, etc... so my perl/SA skills are not up to par. If anyone can
convert the plugin code to the new standard, that would be helpful to
anyone using this plugin.  :)

Rob


Re: POPAuth and SA 3.3.1?

2010-05-20 Thread Per Jessen
Robert Mangiafico wrote:

 On Tue, May 18, 2010 at 2:53 AM, Per Jessen p...@computer.org wrote:

 I googled a bit, and found the following:
 Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
 really perl that is complaining, not spamassassin. I don't use
 popauth myself and I'm not much of a perl programmer, but I would
 think it should be fairly easily fixed.
 
 With SA 3.2.5 the POPAuth plugin worked fine. When we upgraded to
 3.3.1, it stopped working. No perl changes on the server. 

Ah, then it must be something in the data structure in SA that has
changed. 


/Per Jessen, Zürich



Re: POPAuth and SA 3.3.1?

2010-05-20 Thread Per Jessen
Per Jessen wrote:

 Robert Mangiafico wrote:
 
 On Tue, May 18, 2010 at 2:53 AM, Per Jessen p...@computer.org wrote:

 I googled a bit, and found the following:
 Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
 really perl that is complaining, not spamassassin. I don't use
 popauth myself and I'm not much of a perl programmer, but I would
 think it should be fairly easily fixed.
 
 With SA 3.2.5 the POPAuth plugin worked fine. When we upgraded to
 3.3.1, it stopped working. No perl changes on the server.
 
 Ah, then it must be something in the data structure in SA that has
 changed.

Oh, and open a bugreport on this. 


/Per Jessen, Zürich



Re: POPAuth and SA 3.3.1?

2010-05-20 Thread Mark Martinec
On Thursday 20 May 2010 08:46:25 Per Jessen wrote:
 Per Jessen wrote:
  Robert Mangiafico wrote:
  On Tue, May 18, 2010 at 2:53 AM, Per Jessen p...@computer.org wrote:
  I googled a bit, and found the following:
  Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
  really perl that is complaining, not spamassassin. I don't use
  popauth myself and I'm not much of a perl programmer, but I would
  think it should be fairly easily fixed.
  
  With SA 3.2.5 the POPAuth plugin worked fine. When we upgraded to
  3.3.1, it stopped working. No perl changes on the server.
  
  Ah, then it must be something in the data structure in SA that has
  changed.
 
 Oh, and open a bugreport on this.

It's the same issue as was already resolved for the ClamAV plugin,
the data structure changed from hash to a list (so that ordering
of add_header can be maintained).

See:
  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6254

Mark


Re: POPAuth and SA 3.3.1?

2010-05-20 Thread Robert Mangiafico
On Thu, May 20, 2010 at 9:13 AM, Mark Martinec mark.martinec...@ijs.si wrote:
 On Thursday 20 May 2010 08:46:25 Per Jessen wrote:
 Per Jessen wrote:
  Robert Mangiafico wrote:
  On Tue, May 18, 2010 at 2:53 AM, Per Jessen p...@computer.org wrote:
  I googled a bit, and found the following:
  Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
  really perl that is complaining, not spamassassin. I don't use
  popauth myself and I'm not much of a perl programmer, but I would
  think it should be fairly easily fixed.
 
  With SA 3.2.5 the POPAuth plugin worked fine. When we upgraded to
  3.3.1, it stopped working. No perl changes on the server.
 
  Ah, then it must be something in the data structure in SA that has
  changed.

 Oh, and open a bugreport on this.

 It's the same issue as was already resolved for the ClamAV plugin,
 the data structure changed from hash to a list (so that ordering
 of add_header can be maintained).

 See:
  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6254

Ah, thank you. I made this change in POPAuth.pm at line 199:

-- $opts-{permsgstatus}-{main}-{conf}-{headers_ham}-{POPAuth} = 'No';
-- $opts-{permsgstatus}-{main}-{conf}-{headers_spam}-{POPAuth} = 'No';
++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_ham}},
[POPAuth, 'No'];
++ push @{$opts-{permsgstatus}-{main}-{conf}-{headers_spam}},
[POPAuth, 'No'];

and it seems to be working now. If any perl gurus have any tips /
correction for the above code, please let me know.  :)

Rob


Re: POPAuth and SA 3.3.1?

2010-05-19 Thread Robert Mangiafico
On Tue, May 18, 2010 at 2:53 AM, Per Jessen p...@computer.org wrote:
 Robert Mangiafico wrote:

 On Wed, May 12, 2010 at 3:59 PM, Robert Mangiafico
 rm...@lexiconn.com wrote:
 Is SA 3.3.1 no longer compatible with POPAuth? After upgrading, we're
 seeing these errors in the logs:

 spamd[29369]: Pseudo-hashes are deprecated at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.
 spamd[29369]: plugin: eval failed: Can't coerce array into hash at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.

 POPAuth code:
 http://wiki.apache.org/spamassassin/POPAuthPlugin

 Does anyone know if there is a workaround / fix for this plugin with
 SA 3.3.1? I've searched around, but I cannot find a code fix to make
 this behave with the latest version. Thanks.

 I googled a bit, and found the following:
 Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
 really perl that is complaining, not spamassassin. I don't use popauth
 myself and I'm not much of a perl programmer, but I would think it
 should be fairly easily fixed.

With SA 3.2.5 the POPAuth plugin worked fine. When we upgraded to
3.3.1, it stopped working. No perl changes on the server. Hopefully
someone has a workaround for this plugin. Thanks.

Rob


Re: POPAuth and SA 3.3.1?

2010-05-18 Thread Matus UHLAR - fantomas
 On Wed, May 12, 2010 at 3:59 PM, Robert Mangiafico rm...@lexiconn.com wrote:
  Is SA 3.3.1 no longer compatible with POPAuth? After upgrading, we're
  seeing these errors in the logs:
 
  spamd[29369]: Pseudo-hashes are deprecated at
  /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.
  spamd[29369]: plugin: eval failed: Can't coerce array into hash at
  /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.
 
  POPAuth code:
  http://wiki.apache.org/spamassassin/POPAuthPlugin

On 17.05.10 13:00, Robert Mangiafico wrote:
 Does anyone know if there is a workaround / fix for this plugin with
 SA 3.3.1? I've searched around, but I cannot find a code fix to make
 this behave with the latest version. Thanks.

I think it's the best time to move to SMTP authentication. the popauth is
complicated and not enough secure...
-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
WinError #98652: Operation completed successfully.


Re: POPAuth and SA 3.3.1?

2010-05-18 Thread Per Jessen
Robert Mangiafico wrote:

 On Wed, May 12, 2010 at 3:59 PM, Robert Mangiafico
 rm...@lexiconn.com wrote:
 Is SA 3.3.1 no longer compatible with POPAuth? After upgrading, we're
 seeing these errors in the logs:

 spamd[29369]: Pseudo-hashes are deprecated at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.
 spamd[29369]: plugin: eval failed: Can't coerce array into hash at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.

 POPAuth code:
 http://wiki.apache.org/spamassassin/POPAuthPlugin
 
 Does anyone know if there is a workaround / fix for this plugin with
 SA 3.3.1? I've searched around, but I cannot find a code fix to make
 this behave with the latest version. Thanks.

I googled a bit, and found the following: 
Pseudo-hashes have been removed from Perl, afaict as of 5.1.0.  It's
really perl that is complaining, not spamassassin. I don't use popauth
myself and I'm not much of a perl programmer, but I would think it
should be fairly easily fixed. 


/Per Jessen, Zürich



Re: POPAuth and SA 3.3.1?

2010-05-17 Thread Robert Mangiafico
On Wed, May 12, 2010 at 3:59 PM, Robert Mangiafico rm...@lexiconn.com wrote:
 Is SA 3.3.1 no longer compatible with POPAuth? After upgrading, we're
 seeing these errors in the logs:

 spamd[29369]: Pseudo-hashes are deprecated at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.
 spamd[29369]: plugin: eval failed: Can't coerce array into hash at
 /etc/mail/spamassassin/POPAuth.pm line 195, GEN22 line 54.

 POPAuth code:
 http://wiki.apache.org/spamassassin/POPAuthPlugin

Does anyone know if there is a workaround / fix for this plugin with
SA 3.3.1? I've searched around, but I cannot find a code fix to make
this behave with the latest version. Thanks.

Rob