Re: Doveadm Move Query

2022-12-01 Thread justina colmena ~biz
Sounds like a boss at work. An "admin" doing off-beat SQL-like stuff on 
people's email. I'm a little disconcerted. I don't really use these 
commands myself or see a good use case for them, or the whole 
infrastructure built up on "doveadm" commands.


These are general purpose mailbox utilities. Something that would be much 
less confusing to fork off into a totally separate project independent of 
Dovecot. There is sifting and sorting for spam and porn and scams, but that 
isn't really a "dove(cot) admin" job.


https://wiki.dovecot.org/Tools/Doveadm
https://wiki.dovecot.org/Tools/Doveadm/Move
https://wiki.dovecot.org/Tools/Doveadm/SearchQuery

I have several virtual mailboxes but dovecot knows nothing about them. 
Postfix is configured to deliver mail for my virtual mailboxes, and my 
desktop & mobile email clients are configured with "identities" to respond 
to them.



On Thursday, December 1, 2022 12:25:52 AM AKST, Simon B wrote:

On Tue, 2 Aug 2022 at 12:58, Paul Kudla (SCOM.CA Internet Services
Inc.)  wrote:

ok u...@domain.com needs to exist before any operations can be done on it.

I discovered that dovecot does not consider a virtual mailbox active
until it is returned in the user database

see : doveadm user '*'

both accounts MUST be returned in the list (user@.net & user@.com) ...


Thanks Paul.

I finally got around to looking at this again, and for my own benefit,
and perhaps anyone else in the future, the format that eventually
worked was:

doveadm -Dv move -u u...@destination.com INBOX  user user @source.net
MAILBOX INBOX ALL

However...

the -v option does NOT as the man page indicates produce any kind of
progress counter.

 -v Enables verbosity, including progress counter.

On a medium mailbox (~1000 messages) it took about 3 minutes, with no
indication anything was being done until the prompt returned.  Maybe I
need -D -v and not -Dv?

AND,

it moved all the mails from
/var/spool/mail/virtual/source.net/user/cur but none of the emails
from  /var/spool/mail/virtual/source.net/user/new

And I have not been able to figure how to move those...

Simon






Re: Doveadm Move Query

2022-12-01 Thread Simon B
On Tue, 2 Aug 2022 at 12:58, Paul Kudla (SCOM.CA Internet Services
Inc.)  wrote:
>
>
> ok u...@domain.com needs to exist before any operations can be done on it.
>
> I discovered that dovecot does not consider a virtual mailbox active
> until it is returned in the user database
>
> see : doveadm user '*'
>
> both accounts MUST be returned in the list (user@.net & user@.com)
>
> from there it should work as expected.
>
> i went through this with my django email user interface as the user was
> not being saved in the database until the django model had completing
> saving a new entry, thus when creating the new account i had to put a
> delay check in my create email account that continued to loop until
> django had finished it's processing, very anoying (not dovecot's issue)
> but i think you are facing something similiar?
>
>
> it seems you might be renaming the mbox ?
>
> again both user@.net & user@.com must exist along the way before the
> account(s) can be accessed.
>
> if renaming the mbox is your intention than add the user@.com account
>
> move should now work
>
> then delete the user@.net account.

Thanks Paul.

I finally got around to looking at this again, and for my own benefit,
and perhaps anyone else in the future, the format that eventually
worked was:

doveadm -Dv move -u u...@destination.com INBOX  user user @source.net
MAILBOX INBOX ALL

However...

the -v option does NOT as the man page indicates produce any kind of
progress counter.

 -v Enables verbosity, including progress counter.

On a medium mailbox (~1000 messages) it took about 3 minutes, with no
indication anything was being done until the prompt returned.  Maybe I
need -D -v and not -Dv?

AND,

it moved all the mails from
/var/spool/mail/virtual/source.net/user/cur but none of the emails
from  /var/spool/mail/virtual/source.net/user/new

And I have not been able to figure how to move those...

Simon


Re: Doveadm Move Query

2022-08-02 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



ok u...@domain.com needs to exist before any operations can be done on it.

I discovered that dovecot does not consider a virtual mailbox active 
until it is returned in the user database


see : doveadm user '*'

both accounts MUST be returned in the list (user@.net & user@.com)

from there it should work as expected.

i went through this with my django email user interface as the user was 
not being saved in the database until the django model had completing 
saving a new entry, thus when creating the new account i had to put a 
delay check in my create email account that continued to loop until 
django had finished it's processing, very anoying (not dovecot's issue) 
but i think you are facing something similiar?



it seems you might be renaming the mbox ?

again both user@.net & user@.com must exist along the way before the 
account(s) can be accessed.


if renaming the mbox is your intention than add the user@.com account

move should now work

then delete the user@.net account.





Happy Tuesday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services 
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email p...@scom.ca

On 8/2/2022 6:49 AM, Simon B wrote:
I have a production Dovecot problem and although I searched the mailing 
lists, I could not find an answer and I hope you can give me a quick 
answer/pointer in the right direction.



I have mails for a user (u...@domain.net ) 
under /var/spool/mail/virtual/domain.net/user   
and I want to move ALL the mails to 
/var/spool/mail/virtual/domain.com/user 


If I use

#doveadm -Dv move -u u...@domain.net 
  Maildir:/var/spool/mail/virtual/domain.net/user   Maildir:/var/spool/mail/virtual/domain.com/user  ALL


I get
doveadm(root): Fatal: Unknown argument 
MAILDIR:/var/spool/mail/virtual/domain.com/user 


if I use
#doveadm -Dv move -uu...@domain.net 
 Maildir:/var/spool/mail/virtual/domain.net/user 
 /var/spool/mail/virtual/domain.com/user 
ALL


doveadm(root): Fatal: Unknown argument 
/var/spool/mail/virtual/domain.com/user 


What the hell am I doing wrong!? :)

Thanks.

Simon



--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.


Doveadm Move Query

2022-08-02 Thread Simon B
I have a production Dovecot problem and although I searched the mailing
lists, I could not find an answer and I hope you can give me a quick
answer/pointer in the right direction.


I have mails for a user (u...@domain.net) under /var/spool/mail/virtual/
domain.net/user  and I want to move ALL the mails to
/var/spool/mail/virtual/domain.com/user

If I use

#doveadm -Dv move -u u...@domain.net  Maildir:/var/spool/mail/virtual/
domain.net/user  Maildir:/var/spool/mail/virtual/domain.com/user ALL

I get
doveadm(root): Fatal: Unknown argument MAILDIR:/var/spool/mail/virtual/
domain.com/user

if I use
#doveadm -Dv move -u u...@domain.net  Maildir:/var/spool/mail/virtual/
domain.net/user  /var/spool/mail/virtual/domain.com/user ALL

doveadm(root): Fatal: Unknown argument  /var/spool/mail/virtual/
domain.com/user

What the hell am I doing wrong!? :)

Thanks.

Simon