IMAP ghost login

2020-04-25 Thread Jos Chrispijn
Would it be possible to generate a user list that Dovecot permits to 
fetch mail from?

Thanks, Joz


Re: replication newbie: some beginner questions

2020-04-25 Thread Stefan G. Weichinger
Am 22.04.20 um 10:35 schrieb Stefan G. Weichinger:
> Am 22.04.20 um 09:41 schrieb Stefan G. Weichinger:
> 
>> iterate_query = SELECT username as user FROM mailbox
> 
> Ok, we enabled the 2 users and they synced (after a restart of one
> dovecot, btw).

All users synced.

What if I disable the 2 users now (= inactive in postfixadmin) ?

I assume the 2 dovecots would simply keep the mailboxes "as is" and not
remove anything, correct?

thanks ;-)




Re: error service quota-status

2020-04-25 Thread Admin Beckspaced

Am 24.04.2020 um 21:10 schrieb Markus Winkler:

Hello Becki,

On 24.04.20 20:28, Admin Beckspaced wrote:

trying to setup this quota-status thingy in dovecot

but whenever I try I get this error:

what am I missing here?


as I couldn't find any information regarding 'service dict' in your 
doveconf -n:


Please have a look in your /etc/dovecot/conf.d/10-master.conf (or 
elswhere in your Dovecot configs) and find a config option for service 
dict.


The default is mostly something like this:

service dict {
  # If dict proxy is used, mail processes should have access to its 
socket.
  # For example: mode=0660, group=vmail and global 
mail_access_groups=vmail

  unix_listener dict {
    #mode = 0600
    #user =
    #group =
  }
}

Please change it to:

service dict {
  # If dict proxy is used, mail processes should have access to its 
socket.
  # For example: mode=0660, group=vmail and global 
mail_access_groups=vmail

  unix_listener dict {
    mode = 0660
    user = vmail
    group = vmail
  }
}

restart Dovecot and test if it works.

HTH and kind regards,
Markus


Hi Markus,

super! Thanks a lot for the hint.
after activating the dict service with proper user & group all is 
working fine.


Thanks & have a nice weekend ;)
Greetings
Becki



Creating folders

2020-04-25 Thread Andrei Petru Mura
Hi,

I managed to install dovecot 2.2.36 along postfix, with virtual users. When
I send mails from my thunderbird client a Sent folder is created, which is
mirrored on server by Maildir/cur/.Sent. If I try to create other
directories the same thing happenes, adding to the created folder name .
prefix. For example, created a_folder would be found on server under
Maildir/cur/.b_dir.
If I remove the client from thunderbird (with cached data) and reconfigure
it, this folders are no longer available. How can I make them be available?

Indication for right documentation pages is much appreciated.

Thanks,
Mura Andrei


Re: Creating folders

2020-04-25 Thread Andrei Petru Mura
Rectification: For example, created a_folder would be found on server under
Maildir/cur/.b_dir.
would be:
For example, created a_folder would be found on server under
Maildir/cur/.a_folder.

On Sat, Apr 25, 2020 at 2:45 PM Andrei Petru Mura 
wrote:

> Hi,
>
> I managed to install dovecot 2.2.36 along postfix, with virtual users.
> When I send mails from my thunderbird client a Sent folder is created,
> which is mirrored on server by Maildir/cur/.Sent. If I try to create other
> directories the same thing happenes, adding to the created folder name .
> prefix. For example, created a_folder would be found on server under
> Maildir/cur/.b_dir.
> If I remove the client from thunderbird (with cached data) and reconfigure
> it, this folders are no longer available. How can I make them be available?
>
> Indication for right documentation pages is much appreciated.
>
> Thanks,
> Mura Andrei
>


Re: Creating folders

2020-04-25 Thread MIhai Badici

Maybe you need to subscribe to that folders?

On 4/25/20 3:07 PM, Andrei Petru Mura wrote:
Rectification: For example, created a_folder would be found on server 
under Maildir/cur/.b_dir.

would be:
For example, created a_folder would be found on server under 
Maildir/cur/.a_folder.


On Sat, Apr 25, 2020 at 2:45 PM Andrei Petru Mura > wrote:


Hi,

I managed to install dovecot 2.2.36 along postfix, with virtual
users. When I send mails from my thunderbird client a Sent folder
is created, which is mirrored on server by Maildir/cur/.Sent. If I
try to create other directories the same thing happenes, adding to
the created folder name . prefix. For example, created a_folder
would be found on server under Maildir/cur/.b_dir.
If I remove the client from thunderbird (with cached data) and
reconfigure it, this folders are no longer available. How can I
make them be available?

Indication for right documentation pages is much appreciated.

Thanks,
Mura Andrei



Re: Creating folders

2020-04-25 Thread Andrei Petru Mura
Another weird behavior in my eyes is this:
If I try to create b_folder under inbox directory, on server I get the
directory created like this: Maildir/.INBOX^b_folder.

Mura Andrei

On Sat, Apr 25, 2020 at 3:07 PM Andrei Petru Mura 
wrote:

> Rectification: For example, created a_folder would be found on server
> under Maildir/cur/.b_dir.
> would be:
> For example, created a_folder would be found on server under
> Maildir/cur/.a_folder.
>
> On Sat, Apr 25, 2020 at 2:45 PM Andrei Petru Mura 
> wrote:
>
>> Hi,
>>
>> I managed to install dovecot 2.2.36 along postfix, with virtual users.
>> When I send mails from my thunderbird client a Sent folder is created,
>> which is mirrored on server by Maildir/cur/.Sent. If I try to create other
>> directories the same thing happenes, adding to the created folder name .
>> prefix. For example, created a_folder would be found on server under
>> Maildir/cur/.b_dir.
>> If I remove the client from thunderbird (with cached data) and
>> reconfigure it, this folders are no longer available. How can I make them
>> be available?
>>
>> Indication for right documentation pages is much appreciated.
>>
>> Thanks,
>> Mura Andrei
>>
>


Re: Creating folders

2020-04-25 Thread Andrei Petru Mura
Hi Mihai,

I put auto=subscribed to Sent in 15-mailboxes.conf but get the same
behavior.

Mura Andrei

On Sat, Apr 25, 2020 at 3:21 PM MIhai Badici  wrote:

> Maybe you need to subscribe to that folders?
> On 4/25/20 3:07 PM, Andrei Petru Mura wrote:
>
> Rectification: For example, created a_folder would be found on server
> under Maildir/cur/.b_dir.
> would be:
> For example, created a_folder would be found on server under
> Maildir/cur/.a_folder.
>
> On Sat, Apr 25, 2020 at 2:45 PM Andrei Petru Mura 
> wrote:
>
>> Hi,
>>
>> I managed to install dovecot 2.2.36 along postfix, with virtual users.
>> When I send mails from my thunderbird client a Sent folder is created,
>> which is mirrored on server by Maildir/cur/.Sent. If I try to create other
>> directories the same thing happenes, adding to the created folder name .
>> prefix. For example, created a_folder would be found on server under
>> Maildir/cur/.b_dir.
>> If I remove the client from thunderbird (with cached data) and
>> reconfigure it, this folders are no longer available. How can I make them
>> be available?
>>
>> Indication for right documentation pages is much appreciated.
>>
>> Thanks,
>> Mura Andrei
>>
>


Re: Creating folders

2020-04-25 Thread Andrei Petru Mura
Hi,

I fixed my issue. It was related to Thunderbird.. I just had to uncheck one
of already subscribed folders and the rest appeared. Checking the previous
one made appear the full list.

Mura Andrei

On Sat, Apr 25, 2020 at 3:24 PM Andrei Petru Mura 
wrote:

> Hi Mihai,
>
> I put auto=subscribed to Sent in 15-mailboxes.conf but get the same
> behavior.
>
> Mura Andrei
>
> On Sat, Apr 25, 2020 at 3:21 PM MIhai Badici  wrote:
>
>> Maybe you need to subscribe to that folders?
>> On 4/25/20 3:07 PM, Andrei Petru Mura wrote:
>>
>> Rectification: For example, created a_folder would be found on server
>> under Maildir/cur/.b_dir.
>> would be:
>> For example, created a_folder would be found on server under
>> Maildir/cur/.a_folder.
>>
>> On Sat, Apr 25, 2020 at 2:45 PM Andrei Petru Mura 
>> wrote:
>>
>>> Hi,
>>>
>>> I managed to install dovecot 2.2.36 along postfix, with virtual users.
>>> When I send mails from my thunderbird client a Sent folder is created,
>>> which is mirrored on server by Maildir/cur/.Sent. If I try to create other
>>> directories the same thing happenes, adding to the created folder name .
>>> prefix. For example, created a_folder would be found on server under
>>> Maildir/cur/.b_dir.
>>> If I remove the client from thunderbird (with cached data) and
>>> reconfigure it, this folders are no longer available. How can I make them
>>> be available?
>>>
>>> Indication for right documentation pages is much appreciated.
>>>
>>> Thanks,
>>> Mura Andrei
>>>
>>


Re: problem with a public folder

2020-04-25 Thread Christian Kivalo



On April 25, 2020 2:35:20 AM GMT+02:00, David Mehler  
wrote:
>Hello,
>
>I'm trying to set up a public folder called TestFolder. I'm getting
>this error:
>
>#doveadm acl get -A "Public/TestFolder"
>doveadm(usern...@example.com): Error: Can't open mailbox
>Public/TestFolder: Mailbox doesn't exist: Public/TestFolder
>Username ID Global Rights

Have you enabled debug log and what does it show when you run this command?

># ls -ld /var/vmail/public
>drwx-- 4 vmail vmail 512 Apr 15 23:17 public/
>
># ls -ld public/.TestFolder
>drwx-- 5 vmail vmail 512 Apr 15 23:20 .TestFolder/
>
>My goal is a public namespace under which I have several folders for
>internal communications that users can access, TestFolder being an
>example.
>
>Suggestions welcome.
>Thanks.
>Dave.
>
>#doveconf -n
># 2.3.10 (0da0eff44): /usr/local/etc/dovecot/dovecot.conf
># Pigeonhole version 0.5.10 (bf8ef1c2)
># OS: FreeBSD 12.1-RELEASE-p3 amd64
># Hostname: mail.example.com
>auth_cache_size = 10 M
>auth_default_realm = example.com
>auth_mechanisms = plain login
>auth_realms = example.com
>dict {
>  lastlogin = mysql:/usr/local/etc/dovecot/dovecot-last-login.conf
>}
>first_valid_gid = 2100
>first_valid_uid = 2100
>hostname = mail.example.com
>imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
>tb-lsub-flags
>imap_idle_notify_interval = 1 mins
>last_valid_gid = 2100
>last_valid_uid = 2100
>lda_mailbox_autocreate = yes
>lda_mailbox_autosubscribe = yes
>lda_original_recipient_header = X-Original-To
>listen = xxx.xxx.xxx.xxx
>lmtp_rcpt_check_quota = yes
>log_timestamp = "%Y-%m-%d %H:%M:%S "
>mail_access_groups = vmail
>mail_fsync = never
>mail_gid = vmail
>mail_home = /var/vmail/mailboxes/%d/%n
>mail_location = dbox:~/mail
>mail_plugins = acl fts fts_lucene mail_log notify quota trash virtual
>welcome zlib mail_crypt
>mail_privileged_group = vmail
>mail_server_admin = mailto:postmas...@example.com
>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 index ihave duplicate mime foreverypart
>extracttext spamtest spamtestplus virustest editheader imapflags
>notify imapsieve vnd.dovecot.imapsieve
>namespace {
>location =
>sdbox:/var/vmail/public/:CONTROL=~/mail/public:INDEX=~/mail/public:INDEXPVT=~/mail/public
>  prefix = Public/
>  separator = /
>  subscriptions = yes
>  type = public
>}
>namespace {
>  hidden = no
>  list = yes
>location =
>maildir:/var/vmail/shared/office/.Maildir:CONTROL=~/.Maildir/control/office:INDEX=~/.Maildir/index/office
>  prefix = shared/%%u/
>  separator = /
>  subscriptions = yes
>  type = shared
>}
>namespace inbox {
>  inbox = yes
>  location =
>  mailbox Drafts {
>auto = subscribe
>special_use = \Drafts
>  }
>  mailbox Sent {
>auto = subscribe
>special_use = \Sent
>  }
>  mailbox Spam {
>auto = subscribe
>autoexpunge = 30 days
>special_use = \Junk
>  }
>  mailbox Trash {
>auto = subscribe
>autoexpunge = 30 days
>special_use = \Trash
>  }
>  prefix =
>  separator = /
>  type = private
>}
>passdb {
>  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>  driver = sql
>}
>plugin {
>  acl = vfile:/usr/local/etc/dovecot/global-acls:cache_secs=300
>  acl_anyone = allow
>  fts = lucene
>  fts_autoindex = yes
>  fts_autoindex_exclude = \Junk
>  fts_autoindex_exclude2 = \Trash
>  fts_autoindex_exclude3 = \Spam
>  fts_autoindex_max_recent_msgs = 80
>  fts_index_timeout = 90
>  fts_lucene = whitespace_chars=@. normalize no_snowball
>  imapsieve_mailbox1_before =
>file:/usr/local/lib/dovecot/sieve/report-spam.sieve
>  imapsieve_mailbox1_causes = COPY
>  imapsieve_mailbox1_name = Spam
>imapsieve_mailbox2_before =
>file:/usr/local/lib/dovecot/sieve/report-ham.sieve
>  imapsieve_mailbox2_causes = COPY
>  imapsieve_mailbox2_from = Spam
>  imapsieve_mailbox2_name = *
>  last_login_dict = proxy::lastlogin
>  last_login_key = # hidden, use -P to show it
>  mail_crypt_curve = prime256v1
>  mail_crypt_global_private_key = # hidden, use -P to show it
>  mail_crypt_global_public_key = # hidden, use -P to show it
>  mail_crypt_save_version = 2
>mail_log_events = delete undelete expunge copy mailbox_delete
>mailbox_rename
>  mail_log_fields = uid box msgid size
>  quota = count:User quota
>  quota_exceeded_message = Storage quota for this account has been
>exceeded, please try again later.
>  quota_grace = 10%%
>  quota_rule2 = Trash:ignore
>  quota_status_nouser = DUNNO
>  quota_status_overquota = 552 5.2.2 Mailbox is full
>  quota_status_success = DUNNO
>  quota_vsizes = true
>  quota_warning = storage=100%% quota-exceeded 100 %u
>  quota_warning2 = storage=95%% quota-warning 95 %u
>  quota_warning3 = storage=90%% quota-warning 90 %u
>  quota_warning4 = storage=85%% quota-warning 85 %u
>  quota_warning5 = storage=75%% quota-warning 75 %u
>sieve =
>file:/var/vmail/siev

Re: problem with a public folder

2020-04-25 Thread David Mehler
Hello,

Thanks for all the replies.

I've added a mailbox to the namespace definition for the public
folders. I can do a doveadm acl get -A "Public/general" works but
"Public/TestFolder" does not. Here's my 90-public.conf file:

#cat 90-public.conf
# Public mailboxes
namespace {
  type = public
  separator = /
  prefix = Public/
location = maildir:/var/vmail/public:LAYOUT=fs
subscriptions = yes
list = children
  mailbox general {
 auto = subscribe
  comment = Public Folder for message sharing
   }
  mailbox TestFolder {
 auto = subscribe
  comment = Public Folder
   }
}

With the doveadm acl command something seems off with the user definitions:
#doveadm acl get -A "Public/general"
UsernameID  Global Rights
us...@domain.com  user=us...@domain.com global admin create delete
expunge insert lookup post read write write-deleted write-seen
us...@domain2.comuser=us...@domain.com global admin create delete
expunge insert lookup post read write write-deleted write-seen
us...@domain.com user=us...@domain.com global admin create delete
expunge insert lookup post read write write-deleted write-seen

#doveadm acl get -A "Public/TestFolder"
Username ID Global Rights

Here's my ls output:
#ls -l /var/vmail/public
total 16
drwx--  5 vmail  vmail  512 Apr 25 13:56 TestFolder/
-rw---  1 vmail  vmail0 Apr 25 13:43 dovecot-acl-list
-rw---  1 vmail  vmail8 Apr 25 13:47 dovecot-uidvalidity
-r--r--r--  1 vmail  vmail0 Apr 25 13:47 dovecot-uidvalidity.5ea477b0
-rw---  1 vmail  vmail  804 Apr 25 13:59 dovecot.list.index.log
drwx--  5 vmail  vmail  512 Apr 25 13:47 general/

Thanks.
Dave.

#doveconf -n
# 2.3.10 (0da0eff44): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.10 (bf8ef1c2)
# OS: FreeBSD 12.1-RELEASE-p3 amd64
# Hostname: hostn...@domain.com
auth_cache_size = 10 M
auth_default_realm = domain.com
auth_mechanisms = plain login
auth_realms = domain.com
dict {
  lastlogin = mysql:/usr/local/etc/dovecot/dovecot-last-login.conf
}
first_valid_gid = 2100
first_valid_uid = 2100
hostname = hostname.domain.com
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
imap_idle_notify_interval = 1 mins
last_valid_gid = 2100
last_valid_uid = 2100
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lda_original_recipient_header = X-Original-To
listen = xxx.xxx.xxx.xxx
lmtp_rcpt_check_quota = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_access_groups = vmail
mail_fsync = never
mail_gid = vmail
mail_home = /var/vmail/mailboxes/%d/%n
mail_location = dbox:~/mail
mail_plugins = acl fts fts_lucene mail_log notify quota trash virtual
welcome zlib mail_crypt
mail_privileged_group = vmail
mail_server_admin = mailto:postmas...@domain.com
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 index ihave duplicate mime foreverypart
extracttext spamtest spamtestplus virustest editheader imapflags
notify imapsieve vnd.dovecot.imapsieve
namespace {
  list = children
  location = maildir:/var/vmail/public:LAYOUT=fs
  mailbox TestFolder {
auto = subscribe
comment = Public Folder
  }
  mailbox general {
auto = subscribe
comment = Public Folder for message sharing
  }
  prefix = Public/
  separator = /
  subscriptions = yes
  type = public
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
autoexpunge = 30 days
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
autoexpunge = 30 days
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/usr/local/etc/dovecot/global-acls:cache_secs=300
  fts = lucene
  fts_autoindex = yes
  fts_autoindex_exclude = \Junk
  fts_autoindex_exclude2 = \Trash
  fts_autoindex_exclude3 = \Spam
  fts_autoindex_max_recent_msgs = 80
  fts_index_timeout = 90
  fts_lucene = whitespace_chars=@. normalize no_snowball
  imapsieve_mailbox1_before =
file:/usr/local/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Spam
  imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_name = *
  last_login_dict = proxy::lastlogin
  last_login_key = # hidden, use -P to show it
  mail_crypt_curve = prime256v1
  mail_crypt_global_private_key = # hidden, use -P to show it
  mail_crypt_global_public_key = # hidden, use -P to show it
  mail_crypt_save_version = 2
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_renam