Re: [Dovecot] unknown users

2013-01-09 Thread Timo Sirainen
On 10.1.2013, at 6.53, Firma Averlon  wrote:

> I know that the ldap query does not return the result I expected.
> 
> Question is why.
> Question is why does doevcot look at ldap with the recipients e-Mail
> address. What does dovecot look for?
> Yes, I know, it is a password request. But why look for a password for
> the recipients e-Mail address user?

http://wiki2.dovecot.org/UserDatabase/Static#Deliver



Re: [Dovecot] unknown users

2013-01-09 Thread Firma Averlon
Hi,
I know that the ldap query does not return the result I expected.

Question is why.
Question is why does doevcot look at ldap with the recipients e-Mail
address. What does dovecot look for?
Yes, I know, it is a password request. But why look for a password for
the recipients e-Mail address user?

Since I have static userdb the mailbox to deliver to is defined.
I agree, since the delivery mailbox has "%n" as part of the path, the
"uid" must get looked up somewhere, probably via ldap. But how to
configure this.

+++
# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-35-generic x86_64 Ubuntu 12.04.1 LTS
auth_debug = yes
auth_mechanisms = plain login cram-md5
auth_username_format = %Lu
hostname = mail.av.loc
mail_gid = vmail
mail_location = maildir:~/Maildir
mail_privileged_group = vmail
mail_uid = vmail
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
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0660
user = vmail
  }
}
ssl_cert =  On Mon, Jan 07, 2013 at 08:00:37PM +0100, Averlon wrote:
>> can anyone tell me where these "unknown users" come from.
>> Jan 7 19:43:11 f42252se postfix/pipe[14632]: 9A86C30007C: 
>> to=, relay=spamassassin, delay=2.2, 
>> delays=0.05/0/0/2.1, dsn=2.0.0, status=sent (delivered via 
>> spamassassin service)
>> Jan  7 19:43:11 f42252se postfix/qmgr[14561]: 9A86C30007C: removed
> The original message is successfully delivered to your content 
> filter.
>
>> Jan  7 19:43:11 f42252se dovecot: auth: Debug: master in:
>> USER#0111#011redm...@averlon.loc#011service=lda
>> Jan 7 19:43:11 f42252se dovecot: auth: Debug: 
>> ldap(redm...@averlon.loc): pass search: 
>> base=ou=user,dc=averlon,dc=loc scope=onelevel 
>> filter=(&(objectClass=posixAccount)(uid=redm...@averlon.loc)) 
>> fields=uid,userPassword
> Here's one of your LDAP queries.
>
>> Jan  7 19:43:11 f42252se dovecot: auth: ldap(redm...@averlon.loc):
>> *unknown user*
>> Jan  7 19:43:11 f42252se dovecot: auth: Debug: master out: NOTFOUND#0111
>> Jan  7 19:43:11 f42252se postfix/pipe[14637]: BE0AC30007F:
>> to=, relay=dovecot, delay=0.02, delays=0/0/0/0.01,
>> dsn=5.1.1, status=bounced (user unknown)
> The content filter reinjects via sendmail(1), and the pipe(8) to the 
> Dovecot LDA fails. Your LDAP query is not returning what you expect, 
> or you're not querying for the right thing.
>
>> Jan  7 19:43:11 f42252se postfix/cleanup[14631]: C279030007E:
>> message-id=<20130107184311.c2790300...@mail.av.loc>
>> Jan  7 19:43:11 f42252se postfix/qmgr[14561]: C279030007E: from=<>,
>> size=3182, nrcpt=1 (queue active)
>> Jan  7 19:43:11 f42252se postfix/bounce[14639]: BE0AC30007F: sender
>> non-delivery notification: C279030007E
>> Jan  7 19:43:11 f42252se postfix/qmgr[14561]: BE0AC30007F: removed
>> Jan  7 19:43:11 f42252se dovecot: auth: Debug: master in:
>> USER#0111#011avad...@av.loc#011service=lda
>> Jan  7 19:43:11 f42252se dovecot: auth: Debug: ldap(avad...@av.loc):
>> pass search: base=ou=user,dc=averlon,dc=loc scope=onelevel
>> filter=(&(objectClass=posixAccount)(uid=avad...@av.loc))
>> fields=uid,userPassword
> There's another one of your queries, looking up the sender address 
> for delivery of the bounce.
>
>> Jan  7 19:43:11 f42252se dovecot: auth: ldap(avad...@av.loc): *unknown user*
>> Jan  7 19:43:11 f42252se dovecot: auth: Debug: master out: NOTFOUND#0111
>> Jan  7 19:43:11 f42252se postfix/pipe[14637]: C279030007E:
>> to=, relay=dovecot, delay=0.01, delays=0/0/0/0.01,
>> dsn=5.1.1, status=bounced (user unknown)
>> Jan  7 19:43:11 f42252se postfix/qmgr[14561]: C279030007E: removed
> Same thing happens to the bounce. Being undeliverable, your mail is 
> gone.
>
>> +++
>> Tell me what you need as additional info.
> Turn off verbose logging in Postfix, as Charles pointed out. I guess 
> it's only the TLS logging that you have made verbose.
>
> Review the Dovecot wiki / wiki2 (you didn't say what version you are
> using?) page on LDAP.



smime.p7s
Description: S/MIME Kryptografische Unterschrift


Re: [Dovecot] v2.2.beta1 dsync replication status update

2013-01-09 Thread Timo Sirainen
On 8.1.2013, at 10.47, Timo Sirainen  wrote:

> On Mon, 2013-01-07 at 12:33 +0200, Timo Sirainen wrote:
> 
>> Lots of fixes since 2.2.alpha1, especially related to dsync. Also dsync
>> now supports syncing private message flags when INDEXPVT is used.
> 
> After some more dsync fixes that are available in hg, I'm now using it
> for replicating my company's mails. Seems to be working now, v2.2.rc1
> hopefully not far away. :)

And after some more fixes it really seems to be working now.

> Although still in TODO is for the replication process to use the new
> "quick stateful sync" feature of dsync. It requires keeping track of the
> state string for each user, so needs a bit larger change. Maybe it's
> enough to keep these strings only in memory. (Replication currently does
> a full sync for all users at startup anyway.)

Implemented this also. The state strings are kept only in memory. Much better 
for dsync to use only a few kilobytes of network traffic per change than 
hundreds of kBs. :)



[Dovecot] how to setup different quota for multiple namespaces

2013-01-09 Thread Andreas Oster
Hello all,

I am using dovecot for some time now but always had very basic
configurations. I recently have configured a new, additional namespace
in order to move archived mails (Thunderbird Archives) to another
storage system.

namespace {
  type = private
  separator = .
  prefix = Archives.
  location = maildir:/var/vmail/archive/%Ln/Maildir
  subscriptions = yes
  list = children
  inbox = no
}

This works well but unfortunately I cannot find a solution to either
ignore this new namespace from quota computation or add a separate quota
value for it.

I have integrated user authentication with LDAP and fetch some user
attributes from LDAP entries:

user_attrs =
=home=/var/vmail/%Ln/Maildir,=mail=maildir:/var/vmail/%Ln/Maildir/,otherPager=quota_rule=*:storage=%$

I configured the quota plugin in the following way:

plugin {
quota = maildir:User quota:ns=
quota2 = maildir:Archive quota:ns=Archives.
quota_rule = *:storage=1G
quota_rule2 = ns=Archives.:ignore
}

unfortunately this does not give the desired result. Folders under the
Archives namespace use the same quota as INBOX.


Does anyone have an idea how to fix this ?

Thank you for your kind help

Andreas



Re: [Dovecot] Mark Crispin - RIP

2013-01-09 Thread Dave McGuire
On 01/09/2013 12:22 PM, Robert Moskowitz wrote:
> 'Father' of the IMAP protocol.  Died Dec 28.
> 
> http://en.wikipedia.org/wiki/Mark_Crispin

  :-(

> Had a TOPS-20 in his basement that did a great job of keeping the house
> warm in the cool months (I remember one BAR bof where he extoled the
> benefits of this form of home heating).

  Yup, and I agree with him!  You can turn your electricity/gas/etc into
heat in something boring like a furnace, or in something interesting
like a big computer.  I've yet to turn on my building's main gas feed
this winter, because I'm running a VAX-7000 and a few big PDP-11s in
here.  The DECsystem-2020s are next.  It's good for the soul.

  RIP Mark Crispin.

 -Dave

-- 
Dave McGuire, AK4HZ
New Kensington, PA


Re: [Dovecot] Mark Crispin - RIP

2013-01-09 Thread Danilo Acquaviva
RIP

On Wed, Jan 9, 2013 at 3:22 PM, Robert Moskowitz wrote:

> 'Father' of the IMAP protocol.  Died Dec 28.
>
> http://en.wikipedia.org/wiki/**Mark_Crispin
>
> Had a TOPS-20 in his basement that did a great job of keeping the house
> warm in the cool months (I remember one BAR bof where he extoled the
> benefits of this form of home heating).
>
>
>


[Dovecot] Mark Crispin - RIP

2013-01-09 Thread Robert Moskowitz

'Father' of the IMAP protocol.  Died Dec 28.

http://en.wikipedia.org/wiki/Mark_Crispin

Had a TOPS-20 in his basement that did a great job of keeping the house 
warm in the cool months (I remember one BAR bof where he extoled the 
benefits of this form of home heating).





Re: [Dovecot] Squat FTS plugin not kicking in

2013-01-09 Thread Frerich Raabe

Am 1/8/2013 9:40 PM, schrieb Frerich Raabe:

Hi,

I'm running Dovecot 2.1.12 on FreeBSD. I configured Dovecot to use
the Squat plugin to provide faster full-text searches. The output of
'dovecot -n' is attached to this mail.

However, I just noticed that this plugin doesn't seem to kick in.


[..]


Does anybody have some idea how to get more logging out of
index-worker, or whether there's a flaw in my configuration?


I just noticed the mistake; apparently the "doveconf -n" invocation to 
migrate my Dovecot 1.2.18 setup to Dovecot 2.1.10 wasn't quite complete:


the 'mail_plugins = fts fts_squat' part is not only needed in the 
"protocol imap" section but also on the global level!


--
Frerich Raabe - ra...@froglogic.com
www.froglogic.com - Multi-Platform GUI Testing



Re: [Dovecot] How to get effective user information (was Re: question on "doveadm user" and pass/userdb)

2013-01-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 9 Jan 2013, Timo Sirainen wrote:


Is there a way to get the "effective" information about an user with all 
default values? For instance, I get:

# /usr/local/dovecot-2.1.12/bin/doveadm user  dvtest1
userdb: dvtest1
 home  : /home/dvtest1
 quota_rule: *:bytes=7721225472
 quota_rule2: Trash:bytes=+7745728
# /usr/local/dovecot-2.1.12/bin/doveadm user -m dvtest1
field   value
uid vmail
gid vmail
home/home/dvtest1
mail

dvtest1 has quota_rule and quota_rule2 in LDAP, dvtest2 has not, but defaults are shown. 
Neither of them shows the default mail_location in "user -m", but the default 
uid/gid vmail/vmail. Using IMAP a.s.o. both users work correctly.


v2.2 does it by default:

#  doveadm user tss
field   value
uid 1000
gid 1000
home/home/tss
mailmdbox:~/mdbox
mail_replicassh:foo


Ah, that works.

The doveadm server socket does not provide the "user" command neiter in
Dovecot v2.1 nor v2.2, does it?

Is it only because, doveadm_register_auth_commands() is never called, or 
would the "user" command not work in the doveadm server, but in the 
doveadm program only? I already query the doveadm socket for the quota 
information and it would make the script easier to get the user 
information the same way.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUO2HamoxLS8a3A9mAQLd/gf7B/cqFDUslt1skhvPhTYbh0vUgqNfFRPH
B9dvlKS6o0mH83Jfmoghq74IxCG6zB2dq0lCFQUVpMb+X2HLHVnPAye2AYBYGxji
S+YnWaU8i45ooiXoJyY3C19/o/YENRDC5IjLZgFIBMLbWkSbMPIOgE0Tk2H1r3hv
vf1kr7QSUs5fMPNlWLi99MQcG/yHByU8BC/51nvy52Twc0O+dWKDvqPzyiETKXut
BA3qTtqTyJdpILJ9QFTbfZIxeoB9sqb9fODyWa3NQQeebKyG8wAYnO4hsFtZT6Sg
d/1ZOGgeE73DOvjtTQ1pHSfxp2/evOe5V2q+AKYasIF0iNVF57KenQ==
=7qv2
-END PGP SIGNATURE-


Re: [Dovecot] Migrating mailboxes - SOLVED

2013-01-09 Thread Odhiambo Washington
On Wed, Jan 9, 2013 at 5:36 PM, Eduardo M KALINOWSKI <
edua...@kalinowski.com.br> wrote:

> On Qua, 09 Jan 2013, Odhiambo Washington wrote:
>
>> See the output below
>>
>> [root@mail home]# cd johndoe/
>> [root@mail johndoe]# du -h mail/
>> 32K mail/.imap/Sent
>> 40K mail/.imap/Trash
>> 32K mail/.imap/Drafts
>> 176Kmail/.imap/INBOX
>> 284Kmail/.imap
>> 88M mail/
>>
>
> Clearly most of the data (probably the emails) is not under the .imap
> subdir, which is exactly what you didn't show us. It's probably mbox files.
>
>
Sure! Looking further, I have found the mboxes and I am now able to migrate!

Thanks for being my "third eye".

That version of Dovecot had shocked my senses senseless!!




-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Eduardo M KALINOWSKI

On Qua, 09 Jan 2013, Odhiambo Washington wrote:

See the output below

[root@mail home]# cd johndoe/
[root@mail johndoe]# du -h mail/
32K mail/.imap/Sent
40K mail/.imap/Trash
32K mail/.imap/Drafts
176Kmail/.imap/INBOX
284Kmail/.imap
88M mail/


Clearly most of the data (probably the emails) is not under the .imap  
subdir, which is exactly what you didn't show us. It's probably mbox  
files.


--
"Hello again, Peabody here..."
-- Mister Peabody

Eduardo M KALINOWSKI
edua...@kalinowski.com.br




Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Odhiambo Washington
On Wed, Jan 9, 2013 at 5:29 PM, Gedalya  wrote:

>  On 01/09/2013 09:24 AM, Odhiambo Washington wrote:
>
> So true. However, I will let them run it unless they pay for upgrade.
>
> At this moment in time, I only need to figure out how to migrate the mails
> which were in */home/USER/mail to /home/USER/Maildir/*
>
> Any clues?
>
>  Let's see some more details, what's under there, what format is it in,
> what IMAP server was managing it.
>
>  I have listed everything.

IMAP server == Dovecot 0.9.whatever.I.posted.earlier:-)


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Odhiambo Washington
On Wed, Jan 9, 2013 at 5:29 PM, Reindl Harald wrote:

>
>
> Am 09.01.2013 15:24, schrieb Odhiambo Washington:
> > On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus <
> cmar...@media-brokers.com>wrote:
> >
> >> On 2013-01-09 9:02 AM, Odhiambo Washington  wrote:
> >>
> >>> [root@mail home]# dovecot --version
> >>> 0.99.11
> >>>
> >>
> >> Ummm... seriously?
> >>
> >> Your assignment, should you choose to accept it (or not), is to upgrade
> >> dovecot (and possibly if you have a similarly ancient/unsupported
> version
> >> of it too).
> >>
> >> There is simply no, that is ZERO excuse for continuing to use this
> version
> >> of dovecot...
> >>
> >>
> > So true. However, I will let them run it unless they pay for upgrade.
> >
> > At this moment in time, I only need to figure out how to migrate the
> mails
> > which were in /home/USER/mail to /home/USER/Maildir/
>
> have you an idea how old dovecot 0.9.x is?
> kiss them goodbye so they learn to take more care about data in the future
>

Hehee, I know. I started running Dovecot those those days!!!

Well, I am assisting a friend for now, so I cannot abandon him midway,
especially after fixing the bits for him.

-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Odhiambo Washington
On Wed, Jan 9, 2013 at 5:20 PM, Gedalya  wrote:

> Charles is right, There is little point in migrating mailboxes onto the
> server now, do the upgrade before!
> See if you can get a recent 1.2 version or if possible 2.1.
> More recent versions also have better features to help you with handling
> or converting a foreign mail store, but that is hardly even the central
> point here :-)
>
>
LOL


> As for your old mail system, what software does it use?
>

Software in terms of front-end? I don't know if they use pop, but I
understand they use squirrelmail as frontend.


> Do you have mailboxes with actual mail in them?
>

Yes, a few - like the one I listed for johndoe.


> Your ls output seems to show only indexes.
>

Hmmm.. maybe

See the output below

[root@mail home]# cd johndoe/
[root@mail johndoe]# du -h mail/
32K mail/.imap/Sent
40K mail/.imap/Trash
32K mail/.imap/Drafts
176Kmail/.imap/INBOX
284Kmail/.imap
88M mail/

I wonder what is that 88MB? Just indexes??



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Reindl Harald


Am 09.01.2013 15:24, schrieb Odhiambo Washington:
> On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus 
> wrote:
> 
>> On 2013-01-09 9:02 AM, Odhiambo Washington  wrote:
>>
>>> [root@mail home]# dovecot --version
>>> 0.99.11
>>>
>>
>> Ummm... seriously?
>>
>> Your assignment, should you choose to accept it (or not), is to upgrade
>> dovecot (and possibly if you have a similarly ancient/unsupported version
>> of it too).
>>
>> There is simply no, that is ZERO excuse for continuing to use this version
>> of dovecot...
>>
>>
> So true. However, I will let them run it unless they pay for upgrade.
> 
> At this moment in time, I only need to figure out how to migrate the mails
> which were in /home/USER/mail to /home/USER/Maildir/

have you an idea how old dovecot 0.9.x is?
kiss them goodbye so they learn to take more care about data in the future



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Gedalya

On 01/09/2013 09:24 AM, Odhiambo Washington wrote:

So true. However, I will let them run it unless they pay for upgrade.

At this moment in time, I only need to figure out how to migrate the mails
which were in/home/USER/mail to /home/USER/Maildir/

Any clues?
Let's see some more details, what's under there, what format is it in, 
what IMAP server was managing it.




Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Odhiambo Washington
On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus wrote:

> On 2013-01-09 9:02 AM, Odhiambo Washington  wrote:
>
>> [root@mail home]# dovecot --version
>> 0.99.11
>>
>
> Ummm... seriously?
>
> Your assignment, should you choose to accept it (or not), is to upgrade
> dovecot (and possibly if you have a similarly ancient/unsupported version
> of it too).
>
> There is simply no, that is ZERO excuse for continuing to use this version
> of dovecot...
>
>
So true. However, I will let them run it unless they pay for upgrade.

At this moment in time, I only need to figure out how to migrate the mails
which were in /home/USER/mail to /home/USER/Maildir/

Any clues?



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Gedalya
Charles is right, There is little point in migrating mailboxes onto the 
server now, do the upgrade before!

See if you can get a recent 1.2 version or if possible 2.1.
More recent versions also have better features to help you with handling 
or converting a foreign mail store, but that is hardly even the central 
point here :-)


As for your old mail system, what software does it use?
Do you have mailboxes with actual mail in them?
Your ls output seems to show only indexes.

Gedalya



On 01/09/2013 09:02 AM, Odhiambo Washington wrote:

Hello everyone and Happy 2013!

I have a situation -- the first ever I have come across -- which I don't
understand.

A friend was/is running Postfix and Dovecot - with default configs -
nothing was ever changed :-)

[root@mail home]# dovecot --version
0.99.11






Re: [Dovecot] Migrating mailboxes

2013-01-09 Thread Charles Marcus

On 2013-01-09 9:02 AM, Odhiambo Washington  wrote:

[root@mail home]# dovecot --version
0.99.11


Ummm... seriously?

Your assignment, should you choose to accept it (or not), is to upgrade 
dovecot (and possibly if you have a similarly ancient/unsupported 
version of it too).


There is simply no, that is ZERO excuse for continuing to use this 
version of dovecot...




[Dovecot] Migrating mailboxes

2013-01-09 Thread Odhiambo Washington
Hello everyone and Happy 2013!

I have a situation -- the first ever I have come across -- which I don't
understand.

A friend was/is running Postfix and Dovecot - with default configs -
nothing was ever changed :-)

[root@mail home]# dovecot --version
0.99.11

Anyway, he had a problem with a user mailbox which I wasn't able to
diagnose and fix easily. maillog showed:
Jan  9 16:11:29 mail imap-login: Login: userx [:::127.0.0.1]
Jan  9 16:11:29 mail imap(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))
Jan  9 16:11:29 mail dovecot: child 25217 (imap) killed with signal 6
Jan  9 16:12:03 mail imap-login: Login: userx [:::127.0.0.1]
Jan  9 16:12:03 mail imap(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))
Jan  9 16:12:03 mail dovecot: child 25229 (imap) killed with signal 6
Jan  9 16:13:15 mail pop3-login: Login: userx [:::192.168.0.55]
Jan  9 16:13:15 mail pop3(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))

My aim is not to fix the above.
I have reconfigured both Postfix and Dovecot to use Maildir now and things
are fine (not securitywise, but I don't care about that) for now.
However, I'd like to migrate old mail for some users, but I don't know how
to go about this, given the mailbox format, which I don't understand:
Here is what a typical one looks like:

[root@mail home]# ls -al johndoe/mail/.imap/
total 24
drwx--  6 johndoe users 4096 May 27  2010 .
drwx--  3 johndoe users 4096 May 27  2010 ..
drwx--  2 johndoe users 4096 May 27  2010 Drafts
drwx--  2 johndoe users 4096 Jan  9 15:46 INBOX
drwx--  2 johndoe users 4096 May 27  2010 Sent
drwx--  2 johndoe users 4096 May 27  2010 Trash
[root@mail home]# ls -al johndoe/mail/.imap/INBOX/
total 180
drwx--  2 johndoe users   4096 Jan  9 15:46 .
drwx--  6 johndoe users   4096 May 27  2010 ..
-rw---  1 johndoe users  5 Dec 18  2007 .customflags
-rw---  1 johndoe users  10272 Jan  9 15:46 .imap.index
-rw---  1 johndoe users 132774 Jan  9 11:27 .imap.index.data
-rw---  1 johndoe users   5136 Sep 26  2011 .imap.index.log
-rw---  1 johndoe users   9404 Jan  8 18:44 .imap.index.tree
[root@mail home]# ls -al johndoe/mail/.imap/Sent/
total 36
drwx--  2 johndoe users  4096 May 27  2010 .
drwx--  6 johndoe users  4096 May 27  2010 ..
-rw---  1 johndoe users 5 May 27  2010 .customflags
-rw---  1 johndoe users  1608 May 27  2010 .imap.index
-rw---  1 johndoe users 10264 May 27  2010 .imap.index.data
-rw---  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw---  1 johndoe users  1556 May 27  2010 .imap.index.tree
[root@mail home]# ls -al johndoe/mail/.imap/Drafts/
total 36
drwx--  2 johndoe users  4096 May 27  2010 .
drwx--  6 johndoe users  4096 May 27  2010 ..
-rw---  1 johndoe users 5 May 27  2010 .customflags
-rw---  1 johndoe users  1608 May 27  2010 .imap.index
-rw---  1 johndoe users 10264 May 27  2010 .imap.index.data
-rw---  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw---  1 johndoe users  1556 May 27  2010 .imap.index.tree
[root@mail home]# ls -al johndoe/mail/.imap/Trash/
total 44
drwx--  2 johndoe users  4096 May 27  2010 .
drwx--  6 johndoe users  4096 May 27  2010 ..
-rw---  1 johndoe users 5 May 27  2010 .customflags
-rw---  1 johndoe users  1608 May 27  2010 .imap.index
-rw---  1 johndoe users 17950 May 27  2010 .imap.index.data
-rw---  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw---  1 johndoe users  1556 May 27  2010 .imap.index.tree

How can I migrate these mails into /home/johndoe/Maildir/ ?? They don't
seem like mbox to me so mb2md.pl doesn't seem to apply here..





-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


Re: [Dovecot] Trouble with expire plugin

2013-01-09 Thread Gedalya

On 01/09/2013 02:32 AM, Robert Schetterer wrote:

my daily cron job says:
>>
>>#!/bin/sh
>>doveadm expunge -A mailbox Junk savedbefore 14d
>>doveadm expunge -A mailbox Trash savedbefore 30d
>>doveadm expunge -A mailbox "Trash.*" savedbefore 30d

do verbose logging during cron


Best Regards
MfG Robert Schetterer
No need, I have indeed already gone beyond the "but I made a cron job, 
why isn't it working" point.


mysql> select * from expires;
.
.
.
7 rows in set (0.00 sec)

Complete doveadm output with domain masked:

# doveadm -D search -A mailbox Trash savedbefore 14d
doveadm(root): Debug: Loading modules from directory: 
/usr/lib/dovecot/modules
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib10_quota_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_expire_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_listescape_plugin.so
doveadm(root): Debug: Loading modules from directory: 
/usr/lib/dovecot/modules/doveadm
doveadm(root): Debug: Skipping module doveadm_acl_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined 
symbol: acl_user_module (this is usually intentional, so just ignore 
this message)
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so
doveadm(root): Debug: Skipping module doveadm_zlib_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so: undefined 
symbol: i_stream_create_deflate (this is usually intentional, so just 
ignore this message)
doveadm(root): Debug: Skipping module doveadm_fts_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so: undefined 
symbol: fts_list_backend (this is usually intentional, so just ignore 
this message)

doveadm(root): Debug: expire: Searching only users listed in expire database
doveadm(root): Debug: expire: Stopping iteration on key 
shared/expire/je...@xx.com/Trash (1357165578 > 1356528524)



mysql> select * from expires;
.
.
.
6 rows in set (0.00 sec)

The row being deleted: l...@xxx.com, Junk, 1350397036 (Tue Oct 16 
10:17:16 EDT 2012), all others at this point in time are younger than 14 
days.
So far it has seemed to me that running any search or expunge has the 
sole effect of deleting rows matching the savedbefore criteria, 
regardless of the mailbox criteria.


working with doveadm -o"mail_plugins=." leaving out expire seems to 
work fine.




Re: [Dovecot] [OT] GNUTLS (was: Re: Dovecot SASL Client support?)

2013-01-09 Thread Patrick Ben Koetter
* Aleksandar Lazic :
> 
> Am 09-01-2013 11:36, schrieb Markus Schönhaber:
> >09.01.2013 09:52, Patrick Ben Koetter:
> >
> >>If it is as good as GNUTLS, I'd rather stick with Cyrus SASL.
> >
> >Out of curiosity: what's so bad with GNUTLS?
> 
> +1
> 
> I thought the same, you was faster for the question.

We've been hunting down interoperability problems on Debian/Ubuntu plattforms
ever since Debian switched to GNUTLS. OpenLDAP, Postfix, Dovecot... you name
it. We ended up rebuilding the packages with OpenSSL support.

p@rick

-- 
[*] sys4 AG
 
http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] [OT] GNUTLS (was: Re: Dovecot SASL Client support?)

2013-01-09 Thread Aleksandar Lazic


Am 09-01-2013 11:36, schrieb Markus Schönhaber:

09.01.2013 09:52, Patrick Ben Koetter:


If it is as good as GNUTLS, I'd rather stick with Cyrus SASL.


Out of curiosity: what's so bad with GNUTLS?


+1

I thought the same, you was faster for the question.

BR Aleks


Re: [Dovecot] [OT] GNUTLS

2013-01-09 Thread Reindl Harald


Am 09.01.2013 11:36, schrieb Markus Schönhaber:
> 09.01.2013 09:52, Patrick Ben Koetter:
> 
>> If it is as good as GNUTLS, I'd rather stick with Cyrus SASL.
> 
> Out of curiosity: what's so bad with GNUTLS?

google for "openvas gnutls"



signature.asc
Description: OpenPGP digital signature


[Dovecot] pop3_lock_session and mdbox format

2013-01-09 Thread Ewald Dieterich

Setting "pop3_lock_session = yes" in the configuration has no effect
when I use Dovecot 2.1.13 with the mdbox format. A second POP3 
connection to the same mailbox is still allowed.


Grepping for MAILBOX_FLAG_KEEP_LOCKED in the source code shows that
POP3 session locking only works for the Maildir and mbox formats. Is
it possible to enable it for the mdbox format, as well?

Ewald


[Dovecot] [OT] GNUTLS (was: Re: Dovecot SASL Client support?)

2013-01-09 Thread Markus Schönhaber
09.01.2013 09:52, Patrick Ben Koetter:

> If it is as good as GNUTLS, I'd rather stick with Cyrus SASL.

Out of curiosity: what's so bad with GNUTLS?

-- 
Regards
  mks




Re: [Dovecot] How to get effective user information (was Re: question on "doveadm user" and pass/userdb)

2013-01-09 Thread Timo Sirainen
On 9.1.2013, at 11.30, Steffen Kaiser  wrote:

> Is there a way to get the "effective" information about an user with all 
> default values? For instance, I get:
> 
> # /usr/local/dovecot-2.1.12/bin/doveadm user  dvtest1
> userdb: dvtest1
>  home  : /home/dvtest1
>  quota_rule: *:bytes=7721225472
>  quota_rule2: Trash:bytes=+7745728
> # /usr/local/dovecot-2.1.12/bin/doveadm user -m dvtest1
> field   value
> uid vmail
> gid vmail
> home/home/dvtest1
> mail
> 
> dvtest1 has quota_rule and quota_rule2 in LDAP, dvtest2 has not, but defaults 
> are shown. Neither of them shows the default mail_location in "user -m", but 
> the default uid/gid vmail/vmail. Using IMAP a.s.o. both users work correctly.

v2.2 does it by default:

#  doveadm user tss
field   value
uid 1000
gid 1000
home/home/tss
mailmdbox:~/mdbox
mail_replicassh:foo



[Dovecot] How to get effective user information (was Re: question on "doveadm user" and pass/userdb)

2013-01-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 12 Sep 2012, Gábor Lénárt wrote:

Below, there is a similiar question, with identical prerequisites.

Is there a way to get the "effective" information about an user with all 
default values? For instance, I get:


# /usr/local/dovecot-2.1.12/bin/doveadm user  dvtest1
userdb: dvtest1
  home  : /home/dvtest1
  quota_rule: *:bytes=7721225472
  quota_rule2: Trash:bytes=+7745728
# /usr/local/dovecot-2.1.12/bin/doveadm user  dvtest2
userdb: dvtest2
  home  : /home/dvtest2
  quota_rule: *:bytes=307200
  quota_rule2: Trash:bytes=+30720
# /usr/local/dovecot-2.1.12/bin/doveadm user -m dvtest1
field   value
uid vmail
gid vmail
home/home/dvtest1
mail

dvtest1 has quota_rule and quota_rule2 in LDAP, dvtest2 has not, but 
defaults are shown. Neither of them shows the default mail_location in 
"user -m", but the default uid/gid vmail/vmail. Using IMAP a.s.o. both 
users work correctly.


Is there a "user -m" variant on the userdb socket? Via socket I get:
USER1   dvtest1 home=/home/dvtest1 
quota_rule=*:bytes=7721225472   quota_rule2=Trash:bytes=+7745728


Looking into doveadm-auth.c, the paths of "user" and "user -m" are quite 
different, so I guess not.


===


I'm about getting to know dovecot in details, I am about the command
"doveadm user". The man page shows this example:

userdb: jane
uid   : 8001
gid   : 8001
home  : /home/jane
mail  : sdbox:~/sdbox
plugins   : sieve
quota_rule: *:storage=150M

What I guess that the lack of extra information (which would be needed by
some scripts of mine, eg for getting user's home easily from shell scripts,
as it's hash based, etc) is caused because I don't pass home (and/or other
settings) back from userdb and/or passdb.

However I do have these in global scope:

mail_home = /mailstorage/%Ld/%Ln
(yes, this is not hashed at all at the momement but it will be soon)
mail_location = maildir:~/Maildir
mail_uid = vmail
mail_gid = vmail
(... and also some global quota stuffs configured in plugin section)

Now, I am a bit confused: even with passdb/userdb does not return with user
home or GID/UID, dovecot knows these in case of pop3/imap/lmtp access, since
these information can be "composed" from those settings.

But then, wouldn't it possible so "doveadm user" shows those as well, like
lmtp/pop3/imap can resolve those too?

If I interpret "doveadm user"'s goal wrong (it's just for userdb/passdb
query tool nothing more), is there any tool which works in this config,
displaying extra information (at least user's home), or should I create some
script which just repeats the functionality of dovecot's configured
mail_home resolution?




- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUO04pmoxLS8a3A9mAQKswQf8DWfTg76rmpRUXu9LvlvBDWakZGPYol+N
LM/6Hk2Nms5oXTe+qVB3l0Mr/1JKP0iDQESMHyZqI/ARdUO8siaiqxRT7tkMP0ID
S6omoKcrRB6eAEMPiDM6nKnwx0oPaJkX4dJrwUYTuxQE92li2wvQJoQa4YycwEWI
mRmRbwd6FRzq3fQO/9pKHHxR0hBkt6HWDk14HrxLzGag2oKye2FaqThJ1tTFvV0G
2/Ci9lkWkM4+7qShIz4THmlij39wZfwqzKQkYRcNO21y2jxD4UV4BoqMjRvmvf/V
nRcJv770lWrV2aJ5lpE/uLX8TnrHO4fpvYek5Usucg523faSdLNIRA==
=gwtk
-END PGP SIGNATURE-

Re: [Dovecot] Dovecot SASL Client support?

2013-01-09 Thread Patrick Ben Koetter
* Timo Sirainen :
> Then there's the whole other question of whether that client side SASL code
> could be exported to a separate library, possibly even API compatible with
> Cyrus SASL. I think that's unlikely to happen, especially because the code
> most likely would require libdovecot.so, which isn't really meant to be
> linked against non-Dovecot software. Probably an easier way to get rid of
> Cyrus SASL client code would be to move to GNU SASL.

My two cent:
If it is as good as GNUTLS, I'd rather stick with Cyrus SASL.

p@rick

-- 
[*] sys4 AG
 
http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] Dovecot SASL Client support?

2013-01-09 Thread Timo Sirainen
On 8.1.2013, at 15.40, Charles Marcus  wrote:

> I seem to recall mention of SASL client support either being added, but can't 
> remember for sure. The wiki says nothing about Client support (now, or in the 
> future)...
> 
> http://wiki2.dovecot.org/Sasl
> 
> So - is there support for it now? If not, is it planned for anytime soon?

There are a few uses for client-side SASL in Dovecot:

 * Proxying to IMAP/POP3 backend server
 * imapc/pop3c backends connecting to remote IMAP/POP3 server
 * doveadm connecting to doveadm-server
 * doveadm command to verify/debug that SASL authentication

Dovecot already implements client-side PLAIN SASL mechanism for the first three 
cases. Each one implements it separately, but since that doesn't really matter 
since the code is so simple. I guess at some point that code could be moved to 
a library and other mechanisms implemented for them, although that makes the 
code more complex since other mechanisms can require multiple roundtrips to 
server instead of just one like PLAIN. Also people have been happy enough with 
only PLAIN authentication for these cases for now.

Then there's the whole other question of whether that client side SASL code 
could be exported to a separate library, possibly even API compatible with 
Cyrus SASL. I think that's unlikely to happen, especially because the code most 
likely would require libdovecot.so, which isn't really meant to be linked 
against non-Dovecot software. Probably an easier way to get rid of Cyrus SASL 
client code would be to move to GNU SASL.