Re: [Dovecot] Dovecor 1.2 : Command output: Fatal: Unknown argument: flags=DRhu Usage: deliver [-c ] [-a ] [-d ] [-p ] [-f ] [-m ] [-n]

2011-01-18 Thread J4
Ignore this plea for help.  The problem has been solved. It was a typo
in the configuration.
Regards,j

On 01/18/2011 04:38 PM, J4 wrote:
> Hi there,
>
> I changed postfix to pass email to spamassassin, and then deliver to
> dovecot LDA.  It fails to deliver. 
>
> The current entry in master.cf now reads:
> dovecot   unix  -   n   n   -   -   pipe
> flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
> ${recipient}
>
> smtp  inet  n   -   -   -   -   smtpd
>   -o content_filter=spamassassin
>
> spamassassin unix - n   n   -   -   pipe
>   user=nobody argv=/usr/bin/spamc -f -e
>   /usr/sbin/sendmail -oi -f ${sender} ${recipient}
>
> This is the same as I had to afore I factored in spamassassin.
>
> The error message is this:-
> Jan 18 16:30:44 logout postfix/pipe[28952]: 56AE58230A:
> to=, relay=dovecot, delay=0.01, delays=0/0/0/0.01,
> dsn=5.3.0, status=bounced (command line usage error. Command output:
> Fatal: Unknown argument: flags=DRhu Usage: deliver [-c ]
> [-a ] [-d ] [-p ][-f  sender>] [-m ] [-n] [-s] [-e] [-k] )
>
> Does anyone know which options I should have added to dovecot deliver?
>
>
>
>


[Dovecot] Dovecor 1.2 : Command output: Fatal: Unknown argument: flags=DRhu Usage: deliver [-c ] [-a ] [-d ] [-p ] [-f ] [-m ] [-n] [-s]

2011-01-18 Thread J4
Hi there,

I changed postfix to pass email to spamassassin, and then deliver to
dovecot LDA.  It fails to deliver. 

The current entry in master.cf now reads:
dovecot   unix  -   n   n   -   -   pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d
${recipient}

smtp  inet  n   -   -   -   -   smtpd
  -o content_filter=spamassassin

spamassassin unix - n   n   -   -   pipe
  user=nobody argv=/usr/bin/spamc -f -e
  /usr/sbin/sendmail -oi -f ${sender} ${recipient}

This is the same as I had to afore I factored in spamassassin.

The error message is this:-
Jan 18 16:30:44 logout postfix/pipe[28952]: 56AE58230A:
to=, relay=dovecot, delay=0.01, delays=0/0/0/0.01,
dsn=5.3.0, status=bounced (command line usage error. Command output:
Fatal: Unknown argument: flags=DRhu Usage: deliver [-c ]
[-a ] [-d ] [-p ][-f ] [-m ] [-n] [-s] [-e] [-k] )

Does anyone know which options I should have added to dovecot deliver?





Re: [Dovecot] Dovecot Sieve

2011-01-18 Thread J4
On 01/18/2011 01:35 PM, Robert Schetterer wrote:
> Am 18.01.2011 13:21, schrieb J4:
>>
>> On 01/18/2011 01:16 PM, J4 wrote:
>>> On 01/18/2011 12:55 PM, Robert Schetterer wrote:
>>>> Am 18.01.2011 12:48, schrieb J4:
>>>> [SNIP]
>>> Hi,
>>>
>>> Ok, then I'll post here.   
>>>
>>> I asked because it is only now, after three weeks of trying to
>>> understand Sieve and how to filter spam out, that I realised that one
>>> needs a separate programme to enable Sieve in Dovecot.  I had thought
>>> that it was included in Dovecot ,abd one only had to enable a plugin
>>> reference in the dovecot.conf.   Because another programme has to be
>>> installed, I had thought that it was not part of Dovecot proper, and
>>> would need to be addressed to another list.  I know that I shall run
>>> into Sieve related config problems, but did not want to burden this list
>>> with these.
> i dont know how to use sieve to filter spam ( thought it must exec a
> external prog for that like spamc etc), some people use dspam plugin to
> filter spam with dovecot, i only use sieve to filter allready marked
> spam into
> users spam folders, i use spamass-milter with postfix smtp level, there
> are several ways you can do spam filtering, and on what level, so there
> is amavis too etc
>
>>> However, I compiled Dovecot Sieve and installed it into the default of
>>> /usr/local, and it looks like I have a second installation of Dovecot
>>> :(  I downloaded Sieve from wget
>>> http://dovecot.org/releases/1.2/dovecot-1.2.16.tar.gz.  Looks like the
>>> install guide I found that said to install Sieve had a typo' and the URL
>>> was for the whole of Dovecot.
> better use the recent stable branch 2.09
>
>>> i) Does anyone know where I can download Dovecot Sieve from?  
>>> ii) Is there a way of removing all the files I installed from the
>>> previous 'make instal'l I did?   I tried a 'make uninstall', but this
>>> did not remove everything.
>>>
>>> I know this looks compleatly braindead to anyone else reading this
>>> list...  myself included ... buts too late ( in both cases ).
>> Question ii) has been solved ( I think ) :
>> cd /usr/local; find | grep dovecot > /tmp/a; for i in `cat /tmp/a` ; do
>> rm -r $i;done
>> Seems to have worked!
> hm why arent you using distro packs
> if unsure where files are copied i.e do make install again
> at the last few lines apaering you should see where they got copied
> (for sure there are better ways to uninstall, i didnt thought of yet)
>
Hi Robert,

I used the Debian for Doevcot 1.2, but I did not think that it included
Dovecot Sieve.  Hence I am trying to find it.

I did read that the postfix master.cf entry for dovecot had to be
modified by adding the -a option.  My current one has:
dovecot-spamass   unix  -   n   n   -   -   pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u ${recipient} -e
/usr/lib/dovecot/deliver -d ${recipient}

This is so that it uses spamc to add some Headers to it - I would like
Sieve to read these and then take an action.

I added the -a option:-  ( from http://wiki.dovecot.org/LDA/Sieve )
dovecot-spamass   unix  -   n   n   -   -   pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u ${recipient} -e
/usr/lib/dovecot/deliver -a -d ${recipient}
and it broke it:

, status=bounced (command line usage error. Command output: Fatal:
Unknown argument: t...@test.info Usage: deliver [-c ] [-a
] [-d ] [-p ][-f ] [-m ] [-n] [-s] [-e] [-k] )

Obviously, I had to add the -a with a value such as recipient, yet I
already have $recipient with the -d option.  Would it work if I added :
/usr/lib/dovecot/deliver -a ${recipient}  -d ${recipient}
?

Regards.




Re: [Dovecot] Dovecot Sieve

2011-01-18 Thread J4


On 01/18/2011 01:16 PM, J4 wrote:
> On 01/18/2011 12:55 PM, Robert Schetterer wrote:
>> Am 18.01.2011 12:48, schrieb J4:
>> [SNIP]
> Hi,
>
> Ok, then I'll post here.   
>
> I asked because it is only now, after three weeks of trying to
> understand Sieve and how to filter spam out, that I realised that one
> needs a separate programme to enable Sieve in Dovecot.  I had thought
> that it was included in Dovecot ,abd one only had to enable a plugin
> reference in the dovecot.conf.   Because another programme has to be
> installed, I had thought that it was not part of Dovecot proper, and
> would need to be addressed to another list.  I know that I shall run
> into Sieve related config problems, but did not want to burden this list
> with these.
>
> However, I compiled Dovecot Sieve and installed it into the default of
> /usr/local, and it looks like I have a second installation of Dovecot
> :(  I downloaded Sieve from wget
> http://dovecot.org/releases/1.2/dovecot-1.2.16.tar.gz.  Looks like the
> install guide I found that said to install Sieve had a typo' and the URL
> was for the whole of Dovecot.
>
> i) Does anyone know where I can download Dovecot Sieve from?  
> ii) Is there a way of removing all the files I installed from the
> previous 'make instal'l I did?   I tried a 'make uninstall', but this
> did not remove everything.
>
> I know this looks compleatly braindead to anyone else reading this
> list...  myself included ... buts too late ( in both cases ).
Question ii) has been solved ( I think ) :
cd /usr/local; find | grep dovecot > /tmp/a; for i in `cat /tmp/a` ; do
rm -r $i;done
Seems to have worked!


Re: [Dovecot] Dovecot Sieve

2011-01-18 Thread J4
On 01/18/2011 12:55 PM, Robert Schetterer wrote:
> Am 18.01.2011 12:48, schrieb J4:
>> Hi,
>>
>> I am looking for the Dovecot Sieve mailing list. Is there one?
>>
>> Regards,
>> j
>>
>  no, why should there be one ?
> sieve is a standard, i believe cyrus had been the first apear with it
> there is enough info here and on the web about it
>
Hi,

Ok, then I'll post here.   

I asked because it is only now, after three weeks of trying to
understand Sieve and how to filter spam out, that I realised that one
needs a separate programme to enable Sieve in Dovecot.  I had thought
that it was included in Dovecot ,abd one only had to enable a plugin
reference in the dovecot.conf.   Because another programme has to be
installed, I had thought that it was not part of Dovecot proper, and
would need to be addressed to another list.  I know that I shall run
into Sieve related config problems, but did not want to burden this list
with these.

However, I compiled Dovecot Sieve and installed it into the default of
/usr/local, and it looks like I have a second installation of Dovecot
:(  I downloaded Sieve from wget
http://dovecot.org/releases/1.2/dovecot-1.2.16.tar.gz.  Looks like the
install guide I found that said to install Sieve had a typo' and the URL
was for the whole of Dovecot.

i) Does anyone know where I can download Dovecot Sieve from?  
ii) Is there a way of removing all the files I installed from the
previous 'make instal'l I did?   I tried a 'make uninstall', but this
did not remove everything.

I know this looks compleatly braindead to anyone else reading this
list...  myself included ... buts too late ( in both cases ).


[Dovecot] Dovecot Sieve

2011-01-18 Thread J4
Hi,

I am looking for the Dovecot Sieve mailing list. Is there one?

Regards,
j


Re: [Dovecot] dovecot lda and quota plugin with mysql

2011-01-17 Thread J4
On 01/17/2011 11:53 AM, J4 wrote:
> On 01/16/2011 08:42 PM, Timo Sirainen wrote:
>> On Thu, 2011-01-13 at 17:22 +0100, J4 wrote:
>>
>>> I have postfix delivering to dovecot lda (via spamassinassin).  I
>>> have configured the quota plugin, but it does not seem to respect the
>>> details in the quota table in mysql.  The query I have used looks
>>> correct to me, and the user can connect to the database.
>> ..
>>> # Relevant portions of dovecot -n:
>> This output doesn't show a quota_rule. If you don't have any, everyone
>> has unlimited quota.
>>
>>> mysql> select * from quota;
>>> +-+---+--+
>>> | username| bytes | messages |
>>> +-+---+--+
>>> | r...@test.info   | 19524 |   18 |
>>> | b...@test.info |  9420 |6 |
>>> | t...@klunky.co.uk  |  4662 |4 |
>>> | b...@test.info| 19284 |   13 |
>>> | b...@test.info  | 173906172 | 5702 |
>>> | postmas...@test.info | 10587 |9 |
>>> | b...@test.info  |  3695 |2 |
>>> +-+---+--+
>>> 7 rows in set (0.00 sec)
>> Looks like it's counting the quota, so I guess you're just missing the
>> limits.
> Hi Timo,
>   Many thanks for getting back to me. This has led me to look more into
> the mailbox and quota tables.
>
> I think the limits are inserted into the mailbox table,
> mysql> select * from mailbox;
> ++++-+--++--+-+-++
> | username   | password   | name
>   | maildir | quota|
> local_part | domain   | created | modified
>   | active |
> ++++-+--++--+-+-++
> | t...@test.info| $1$1x | Fred TEST
>   | test.info/test/| 1024 | test | test.info |
> 2011-01-07 17:47:25 | 2011-01-07 17:47:25 |  1 |
>
> ++++-+--++--+-+-++
>
> ... while the actual usage is inserted into the quota table (as shown in
> the original Email). I think that Dovecot should read the limits from
> mailbox.quota and retrieve the usage from the quota.bytes and
> quota.messages.
>
> Somehow, I have to tell Dovecot to use these values in mailbox.quota.  I
> think that I have to add a reference to the file in the dovecot.conf,
> and add an entry into the appropriate sql.conf file.
>
> Regards, J.
>
I updated the /etc/dovecot/dovecot-sql.conf file to include this modifed
query, that I hoped would check the quota, but this failed.  I think
dovecot simply ignored this.  I wonder if the alias quota_rule makes any
sence to Dovecot as I only see : quota = dict:user::proxy::quotadict 
defined in the dovecot.conf and not quota_rule.


# cat /etc/dovecot/dovecot-sql.conf
password_query = SELECT username as user, password FROM mailbox WHERE
email='%u';
user_query = SELECT 5000 AS uid, 5000 AS gid,'/home/vmail/%d/%n' as
home, concat('*:storage= ', quota) AS quota_rule FROM mailbox WHERE user
= '%n';




[Dovecot] dovecot lda and quota plugin with mysql

2011-01-13 Thread J4
Dear all,

I have postfix delivering to dovecot lda (via spamassinassin).  I
have configured the quota plugin, but it does not seem to respect the
details in the quota table in mysql.  The query I have used looks
correct to me, and the user can connect to the database.

I wonder if someone might put me straight on the misconfiguration. 

Best wishes, j.

# Relevant portions of dovecot -n:
mail_plugins: quota imap_quota

lda:
  log_path:
  auth_socket_path: /var/run/dovecot/auth-master
  postmaster_address: postmas...@test.info
  mail_plugins: sieve quota

plugin:
  quota: dict:user::proxy::quotadict
dict:
  quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


# cat /etc/dovecot/dovecot-dict-quota.conf
connect = host=localhost dbname=fred user=fred password=freddy
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages
}

# mysql table
mysql> select * from quota;
+-+---+--+
| username| bytes | messages |
+-+---+--+
| r...@test.info   | 19524 |   18 |
| b...@test.info |  9420 |6 |
| t...@klunky.co.uk  |  4662 |4 |
| b...@test.info| 19284 |   13 |
| b...@test.info  | 173906172 | 5702 |
| postmas...@test.info | 10587 |9 |
| b...@test.info  |  3695 |2 |
+-+---+--+
7 rows in set (0.00 sec)




[Dovecot] mail quota dovecot 1.2.15-3

2011-01-12 Thread J4
Dear all,

I am attempting to enforce quota with Dovecot 1.2.15-3 using LDA for
deliver.  I use smtp-source (postfix) to deliver large messages but the
quota is never noticed.  The webmail interface is Roundcube, and the
admin is performed using Postfixadmin.  I have not looked into the
postfix portion for quota, yet.  Is there something that I have missed
from the configuration?  (The contents of relevant the mysql tables are
included)

Best wishes,
J.


# 1.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-cgmemcap-smack x86_64 Debian squeeze/sid ext4
log_timestamp: %Y-%m-%d %H:%M:%S
ssl_listen: *:993
ssl: required
ssl_cert_file: /etc/ssl/certs/smtpd.crt
ssl_key_file: /etc/ssl/private/smtpd.key
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
first_valid_uid: 106
mail_privileged_group: mail
mail_location: maildir:/var/vmail/%d/%u/
maildir_very_dirty_syncs: yes
mbox_write_locks: fcntl dotlock
mail_plugins: quota imap_quota
lda:
  log_path:
  auth_socket_path: /var/run/dovecot/auth-master
  postmaster_address: postmas...@test.info
  mail_plugins: sieve quota
auth default:
  mechanisms: plain login
  passdb:
driver: pam
  passdb:
driver: sql
args: /etc/dovecot/dovecot-mysql.conf
  userdb:
driver: passwd
  userdb:
driver: static
args: uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes
  userdb:
driver: sql
args: /etc/dovecot/dovecot-mysql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail
plugin:
  quota: dict:user::proxy::quotadict
dict:
  quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf



 select * from mailbox;
+--++--+---+--++--+-+-++
| username | password   |
name | maildir   | quota| local_part |
domain   | created | modified| active |
+--++--+---+--++--+-+-++
| 1...@test.info   | $1$abc111kdddjkfsdhfjksdhfj. |  TEST   |
test.info/11/   |  1024000 | 11  | test.info | 2011-01-07 14:19:03 |
2011-01-12 11:34:32 |  1 |
+--++--+---+--++--+-+-++

select * from quota;
+-+---+--+
| username| bytes | messages |
+-+---+--+
| 1...@test.info  | 173879747 | 5689 |

quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
## dovecot-dict-quota.conf
connect = host=localhost dbname=mail user=mail password=fred
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages
}




Re: [Dovecot] dovecot v1.2.15 - Unknown dict module: quota - Fatal: Quota root storage=200000 proxy init [postfix, dovecot LDA, postfixadmin, mysql]

2011-01-05 Thread J4
On 01/05/2011 02:26 PM, J4 wrote:
> On 01/05/2011 01:36 PM, Timo Sirainen wrote:
>> On Tue, 2011-01-04 at 21:07 +0100, JKL wrote:
>>> plugin:
>>>   quota: dict:storage=20 proxy::quota
>>>   quota: dict:storage=20 proxy::quota:w
>>> dict:
>>>   quota: mysql:/etc/dovecot/dovecot-dict-quota.conf
>> Are you sure you want to use dict quota? Maildir++ quota would be
>> simpler.
>>
>> Anyway, the plugin { quota } lines are wrong (and there should be only
>> one of them). Use:
>>
>> plugin {
>>   quota = dict:user::proxy::quota
>> }
>>
> Hi Timo,
>
> Many thanks for getting back to me.
>
> *** quota
> Thank-you.  The error has now gone, and it generated a new one:D
>
> Dictionary URI is missing ':': quota
>
> I am quite happy to use Maildir++ quota, so long as it'll work with
> postfixadmin. 
The postfixadmin DOVECOT.txt guide instructs me to add these:-

dovecot.conf:
dict {
   quota = mysql:/etc/dovecot/dovecot-dict-quota.conf
}

The dovecot-dict-quota.conf file contains:
driver = mysql
connect = host=localhost dbname= user=x password=x
default_pass_scheme = MD5-CRYPT
table = quota
select_field = current
where_field = path
username_field = username

It also instructs me to add this into the dovecot.conf, but adding it
causes dovecot to fatal.
## IMAP quota
protocol imap {
  quota = dict:storage=20 proxy::quota
}




>
> ***  Regarding an upgrade to dovecot 2:
> I shall upgrade to v2 when I have the current set-up working. It should
> be easier to convert a working doveconf.conf file than a broken one.
>
> I read on the dovecot wiki  [ http://wiki.dovecot.org/PrebuiltBinaries
> ]  that I could add this for v2.0:-
> deb http://xi.rename-it.nl/debian/ testing-auto/dovecot-2.0 main
> Since this is meant to be a production server, I changed the testing to
> stable:
> deb http://xi.rename-it.nl/debian/ stable-auto/dovecot-2.0 main
> If the above is correct, then to upgrade should I:
> 1. backup my dovecot files
> 2. apt-get remove dovecot-imapd dovecot-common
> 3. apt-get -t stable-auto install dovecot-imapd dovecot-common  (I won't
> use POP)
> 4. convert dovecot.conf :  doveconf -n -c dovecot-1.conf > dovecot-2.conf
>


Re: [Dovecot] dovecot v1.2.15 - Unknown dict module: quota - Fatal: Quota root storage=200000 proxy init [postfix, dovecot LDA, postfixadmin, mysql]

2011-01-05 Thread J4
On 01/05/2011 01:36 PM, Timo Sirainen wrote:
> On Tue, 2011-01-04 at 21:07 +0100, JKL wrote:
>> plugin:
>>   quota: dict:storage=20 proxy::quota
>>   quota: dict:storage=20 proxy::quota:w
>> dict:
>>   quota: mysql:/etc/dovecot/dovecot-dict-quota.conf
> Are you sure you want to use dict quota? Maildir++ quota would be
> simpler.
>
> Anyway, the plugin { quota } lines are wrong (and there should be only
> one of them). Use:
>
> plugin {
>   quota = dict:user::proxy::quota
> }
>
Hi Timo,

Many thanks for getting back to me.

*** quota
Thank-you.  The error has now gone, and it generated a new one:D

Dictionary URI is missing ':': quota

I am quite happy to use Maildir++ quota, so long as it'll work with
postfixadmin. 


***  Regarding an upgrade to dovecot 2:
I shall upgrade to v2 when I have the current set-up working. It should
be easier to convert a working doveconf.conf file than a broken one.

I read on the dovecot wiki  [ http://wiki.dovecot.org/PrebuiltBinaries
]  that I could add this for v2.0:-
deb http://xi.rename-it.nl/debian/ testing-auto/dovecot-2.0 main
Since this is meant to be a production server, I changed the testing to
stable:
deb http://xi.rename-it.nl/debian/ stable-auto/dovecot-2.0 main
If the above is correct, then to upgrade should I:
1. backup my dovecot files
2. apt-get remove dovecot-imapd dovecot-common
3. apt-get -t stable-auto install dovecot-imapd dovecot-common  (I won't
use POP)
4. convert dovecot.conf :  doveconf -n -c dovecot-1.conf > dovecot-2.conf