Re: [Dovecot] Dovecot antispam plugin bug: got an empty message

2012-06-10 Thread Petr Bravenec
It looks that I have misconfigured the dovecot plugin:

plugin {

 antispam_dspam_binary = /usr/bin/dspam # should be dspam
#  antispam_dspam_binary = /usr/bin/dspamc # does not work

 antispam_signature = X-DSPAM-Signature
 antispam_signature_missing = move
 antispam_spam_pattern_ignorecase = Junk;Junk.*
 antispam_trash_pattern_ignorecase = Trash;Deleted Items
 antispam_backend = dspam
 antispam_dspam_args = --user;%u;--deliver=;--source=error;--
signature=%%s
 antispam_dspam_spam = --class=spam
 antispam_dspam_notspam = --class=innocent
 
 }

Petr Bravenec

Dne So 9. Ĩervna 2012 22:23:05 Petr Bravenec napsal(a):
 It is few months ago I requested help with combination dovecot - dovecot-
 antispam plugin and dspam.
 
 Now I got into troubles with a lot of spam delivering to users inbox.
 Problem described bellow is now better hidden but stil remains:
 
 When moving a message from INBOX to Junk, dspam got an empty message.
 I made a wrapper about dspamc and there is no input on stdio. The dspam was
 not trained (got an empty message).
 
 Looking to source code of dspam and antispam plugin I suspect the dovecot
 not to sending any content to plugin when moving from inbox to junk.
 
 Petr Bravenec
 
 Dne Wednesday 25 of January 2012 17:19:18 Tom Hendrikx napsal(a):
  On 25-01-12 08:05, Petr Bravenec wrote:
   Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin
   to 2.0_pre20101222. Since the upgrade I'm not able to move messages to
   my Junk folder. In the maillog I have found this message:
   
   dspam[25060]: empty message (no data received)
  
  Gentoo has included the antispam plugin from Johannes historically, but
  added the fork by Eugene to support upgrades to dovecot 2.0. It is not
  really made clear by the gentoo ebuild is that the forked plugin needs a
  slightly different config.
  
  I use the config below with dovecot 2.0.17 and a git checkout for
  dovecot-antispam:
  
  ===8
  plugin {
  
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_spam_pattern_ignorecase = Junk;Junk.*
  antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted
  
  Messages
  
  # Backend specific
  antispam_backend = dspam
  antispam_dspam_binary = /usr/bin/dspamc
  antispam_dspam_args =
  
  --user;%u;--deliver=;--source=error;--signature=%%s
  
  antispam_dspam_spam = --class=spam
  antispam_dspam_notspam = --class=innocent
  #antispam_dspam_result_header = X-DSPAM-Result
  
  }
  
  
  --
  Regards,
  
  Tom


[Dovecot] Dovecot antispam plugin bug: got an empty message

2012-06-09 Thread Petr Bravenec
It is few months ago I requested help with combination dovecot - dovecot-
antispam plugin and dspam.

Now I got into troubles with a lot of spam delivering to users inbox. Problem 
described bellow is now better hidden but stil remains:

When moving a message from INBOX to Junk, dspam got an empty message. 
I made a wrapper about dspamc and there is no input on stdio. The dspam was 
not trained (got an empty message).

Looking to source code of dspam and antispam plugin I suspect the dovecot not 
to sending any content to plugin when moving from inbox to junk.

Petr Bravenec

Dne Wednesday 25 of January 2012 17:19:18 Tom Hendrikx napsal(a):
 On 25-01-12 08:05, Petr Bravenec wrote:
  Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin
  to 2.0_pre20101222. Since the upgrade I'm not able to move messages to
  my Junk folder. In the maillog I have found this message:
  
  dspam[25060]: empty message (no data received)
 
 Gentoo has included the antispam plugin from Johannes historically, but
 added the fork by Eugene to support upgrades to dovecot 2.0. It is not
 really made clear by the gentoo ebuild is that the forked plugin needs a
 slightly different config.
 
 I use the config below with dovecot 2.0.17 and a git checkout for
 dovecot-antispam:
 
 ===8
 plugin {
 antispam_signature = X-DSPAM-Signature
 antispam_signature_missing = move
 antispam_spam_pattern_ignorecase = Junk;Junk.*
 antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted
 Messages
 
 # Backend specific
 antispam_backend = dspam
 antispam_dspam_binary = /usr/bin/dspamc
 antispam_dspam_args =
 --user;%u;--deliver=;--source=error;--signature=%%s
 antispam_dspam_spam = --class=spam
 antispam_dspam_notspam = --class=innocent
 #antispam_dspam_result_header = X-DSPAM-Result
 }
 
 
 --
 Regards,
   Tom


Re: [Dovecot] Dovecot antispam plugint got an empty message

2012-01-25 Thread Petr Bravenec
Thank you, 
I have reconfigured my dovecot on gentoo and it looks now that it worked 
properly.

Regards,
Petr Bravenec

Dne Wednesday 25 of January 2012 17:19:18 Tom Hendrikx napsal(a):
 On 25-01-12 08:05, Petr Bravenec wrote:
  Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin
  to 2.0_pre20101222. Since the upgrade I'm not able to move messages to
  my Junk folder. In the maillog I have found this message:
  
  dspam[25060]: empty message (no data received)
 
 Gentoo has included the antispam plugin from Johannes historically, but
 added the fork by Eugene to support upgrades to dovecot 2.0. It is not
 really made clear by the gentoo ebuild is that the forked plugin needs a
 slightly different config.
 
 I use the config below with dovecot 2.0.17 and a git checkout for
 dovecot-antispam:
 
 ===8
 plugin {
 antispam_signature = X-DSPAM-Signature
 antispam_signature_missing = move
 antispam_spam_pattern_ignorecase = Junk;Junk.*
 antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted
 Messages
 
 # Backend specific
 antispam_backend = dspam
 antispam_dspam_binary = /usr/bin/dspamc
 antispam_dspam_args =
 --user;%u;--deliver=;--source=error;--signature=%%s
 antispam_dspam_spam = --class=spam
 antispam_dspam_notspam = --class=innocent
 #antispam_dspam_result_header = X-DSPAM-Result
 }
 
 
 --
 Regards,
   Tom


[Dovecot] Dovecot antispam plugint got an empty message

2012-01-24 Thread Petr Bravenec
Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin to 
2.0_pre20101222. Since the upgrade I'm not able to move messages to my Junk 
folder. In the maillog I have found this message:

dspam[25060]: empty message (no data received)

Message is copied from my INBOX to Junk folder, but dspam got an empty message 
and sent an error return code. So the moving operation is not successfull and 
the original message in INBOX was not deleted. The dspam was not trained (got 
an empty message).

Looking to source code of dspam and antispam plugin I suspect the dovecot not 
to sending any content to plugin.

Can you help me, please?

Petr Bravenec
# 2.0.16: /etc/dovecot/dovecot.conf
# OS: Linux 3.1.6-gentoo x86_64 Gentoo Base System release 2.0.3 ext4
auth_mechanisms = plain login
base_dir = /var/run/dovecot/
dict {
  acl = pgsql:/etc/dovecot/dovecot-acl.conf
}
disable_plaintext_auth = no
first_valid_gid = 98
first_valid_uid = 98
last_valid_gid = 98
last_valid_uid = 98
listen = *, [::]
mail_location = maildir:/home/dovecot/%u/maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = .
  type = private
}
namespace {
  inbox = no
  list = children
  location = maildir:/home/dovecot/%%n/maildir:INDEX=/home/dovecot/%n/shared/%%n
  prefix = Ostatni.%%n.
  separator = .
  subscriptions = no
  type = shared
}
namespace {
  inbox = no
  list = children
  location = maildir:/home/dovecot/Sdilene/maildir:INDEX=/home/dovecot/%n/public
  prefix = Sdilene.
  separator = .
  subscriptions = no
  type = public
}
passdb {
  args = session=yes
  driver = pam
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  antispam_backend = dspam
  antispam_dspam_args = --user;%u;--source=error
  antispam_dspam_binary = /usr/bin/dspam
  antispam_dspam_notspam = --class=innocent
  antispam_dspam_result_header = X-DSPAM-Result
  antispam_dspam_spam = --class=spam
  antispam_mail_tmpdir = /tmp
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_spam = Junk
  antispam_trash = Trash
  antispam_unsure = 
  sieve = /home/dovecot/%u/sieve.default
  sieve_before = /etc/dovecot/sieve/dspam.sieve
  sieve_dir = /home/dovecot/%u/sieve
}
protocols = imap sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmails
mode = 0660
user = dspam
  }
  unix_listener auth-userdb {
group = vmails
mode = 0660
user = dspam
  }
  user = root
}
service dict {
  unix_listener dict {
group = vmails
mode = 0660
user = dspam
  }
}
ssl_cert = /etc/ssl/mail/imap.bravenec.eu.crt
ssl_key = /etc/ssl/mail/imap.bravenec.eu.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol imap {
  mail_plugins = acl imap_acl antispam
}
protocol lda {
  hostname = imap.bravenec.eu
  mail_plugin_dir = /usr/lib/dovecot
  mail_plugins = sieve acl
  postmaster_address = postmas...@bravenec.eu
}