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: 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
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
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
>


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: %d ignored from auth-passwdfile.conf.ext configuration file

2020-04-13 Thread Andrei Petru Mura
I retried with right user in thunderbird and it's working.
Thanks.

On Mon, Apr 13, 2020 at 1:20 PM Andrei Petru Mura 
wrote:

> I tried to log in as test@some_domain. From thunderbird client. Although,
> I get this logged after before mentioned log:
> imap-login: Disconnected (auth failed, 2 attempts in 14 secs):
> user=, method=PLAIN, rip=some.ip.addr.here, lip=another.ip.addr.here,
> TLS, session=
>
> On Mon, Apr 13, 2020 at 1:16 PM Ivo <
> c.e4ed1a035298f9021dcfbca4d511c...@ultra.hr> wrote:
>
>> Did you try to log in as user "test" or "test@some_domain" ?
>> Is seems to me that you did not use full username (Error:
>> passwd-file(test,).
>> ( %d domain domain part in user@domain, empty if user with no domain )
>>
>>
>> On 13.4.2020. 11:05, Andrei Petru Mura wrote:
>> > I try to configure dovecot with virtual users. I put my users file in
>> > folder /etc/dovecot/my_domain_name/users.
>> > My auth-passwdfile.conf.ext file looks like this:
>> > passdb {
>> >   driver = passwd-file
>> >   args = username_format=%n /etc/dovecot/%d/users
>> > }
>> >
>> > When I try to log in, I get this:
>> > dovecot: auth: Error:
>> > passwd-file(test,some.ip.addr.here,):
>> > stat(/etc/dovecot//users) failed: No such file or directory
>> >
>> > As you can see, %d isn't interpreted. Why is this happening? Any hints?
>> >
>> > Thanks,
>> > Mura Andrei
>>
>>


%d ignored from auth-passwdfile.conf.ext configuration file

2020-04-13 Thread Andrei Petru Mura
I try to configure dovecot with virtual users. I put my users file in
folder /etc/dovecot/my_domain_name/users.
My auth-passwdfile.conf.ext file looks like this:
passdb {
  driver = passwd-file
  args = username_format=%n /etc/dovecot/%d/users
}

When I try to log in, I get this:
dovecot: auth: Error:
passwd-file(test,some.ip.addr.here,):
stat(/etc/dovecot//users) failed: No such file or directory

As you can see, %d isn't interpreted. Why is this happening? Any hints?

Thanks,
Mura Andrei


Re: Missing permissions

2020-04-13 Thread Andrei Petru Mura
Hi Aki,

You did a great job. God bless you! :)
I think it will work now. I'll come with feedback if that's the case after
applying this on my server. I just want to mention one little thing bellow
(which possibly has some importance).
In my system, instead of /home/mail/domain/test/Maildir, I have
*/some_other_custom_dir/mail/my_domain_name/test/Maildir/*. From
*dovecot_selinux*'s man page I can see that *mail_home_rw_t *directories
are:
/root/Maildir(/.*)?
/root/.esmtp_queue(/.*)?
/home/[^/]+/.maildir(/.*)?
/home/[^/]+/Maildir(/.*)?
/home/[^/]+/.esmtp_queue(/.*)?
which anyway, seems to me, doesn't match the initial directory path which I
provided (it's the first time when I knowledgeably interact with SELinux).
I think this shouldn't impact the documented issue, but if you think it
does, I wanted to inform you.

Thanks and have a nice day,
Mura Andrei

On Sun, Apr 12, 2020 at 10:52 PM Aki Tuomi 
wrote:

>
> > On 11/04/2020 15:57 Aki Tuomi  wrote:
> >
> >
> >
> >
> > > On 11/04/2020 15:47 Alex JOST < jost+li...@dimejo.at> wrote:
> > >
> > >
> > >
> > >
> > > Am 11.04.2020 um 13:00 schrieb Andrei Petru Mura:
> > > > Hi,
> > > >
> > > >
> > > > After configuring systemd unit with ReadWritePaths=/home/mail, I get
> the
> > > > following error logs in audit:
> > > > type=AVC msg=audit(1586604621.637:6736): avc: denied { write } for
> > > > pid=12750 comm="imap" name="Maildir" dev="dm-3" ino=438370738
> > > > scontext=system_u:system_r:dovecot_t:s0
> > > > tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir
> permissive=0
> > > > type=SYSCALL msg=audit(1586604621.637:6736): arch=c03e syscall=83
> > > > success=no exit=-13 a0=55b493a7f338 a1=1ed a2=
> a3=fcd8
> > > > items=0 ppid=12735 pid=12750 auid=4294967295 uid=1005 gid=1005
> euid=1005
> > > > suid=1005 fsuid=1005 egid=1005 sgid=1005 fsgid=1005 tty=(none)
> > > > ses=4294967295 comm="imap" exe="/usr/libexec/dovecot/imap"
> > > > subj=system_u:system_r:dovecot_t:s0 key=(null)
> > > > type=PROCTITLE msg=audit(1586604621.637:6736):
> proctitle="dovecot/imap"
> > > > type=AVC msg=audit(1586604621.638:6737): avc: denied { write } for
> > > > pid=12750 comm="imap" name="Maildir" dev="dm-3" ino=438370738
> > > > scontext=system_u:system_r:dovecot_t:s0
> > > > tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir
> permissive=0
> > > > type=SYSCALL msg=audit(1586604621.638:6737): arch=c03e syscall=21
> > > > success=no exit=-13 a0=55b493a7f508 a1=2 a2=55b493a7f388 a3=fffe
> > > > items=0 ppid=12735 pid=12750 auid=4294967295 uid=1005 gid=1005
> euid=1005
> > > > suid=1005 fsuid=1005 egid=1005 sgid=1005 fsgid=1005 tty=(none)
> > > > ses=4294967295 comm="imap" exe="/usr/libexec/dovecot/imap"
> > > > subj=system_u:system_r:dovecot_t:s0 key=(null)
> > > > type=PROCTITLE msg=audit(1586604621.638:6737):
> proctitle="dovecot/imap"
> > > >
> > > >
> > > > I have SELinux enabled, on CentOS.
> > > > If I run:
> > > > audit2why < /var/log/audit/audit.log
> > > >
> > > >
> > > > I get:
> > > > type=AVC msg=audit(1586601301.044:6707): avc: denied { write } for
> > > > pid=9930 comm="imap" name="Maildir" dev="dm-3" ino=438370738
> > > > scontext=system_u:system_r:dovecot_t:s0
> > > > tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir
> permissive=0
> > > >
> > > >
> > > > Was caused by:
> > > > Missing type enforcement (TE) allow rule.
> > > >
> > > >
> > > > I think it's important to know that I'm trying to use dovecot with
> virtual
> > > > users. If I try to configure it with PAM authentication using system
> users,
> > > > it works well.
> > > >
> > > >
> > > > Any suggestions on this?
> > > Looks like /home/mail as mail store isn't included in the default
> > > SELinux policy. Did you make sure that the correct SELinux type is set
> > > on the directories?
> > > https://www.unix.com/man-page/centos/8/dovecot_selinux/
> > >
> > >
> > >
> > >
> > > If this isn't enough to get you going you might need to create your own
> > > policy. The following steps should be all that it takes to create your
> > > own policy.
> > >
> > >
> > > Check that grep includes only lines that you want included in your new
> > > policy:
> > > grep dovecot /var/log/audit/audit.log | audit2allow -w
> > >
> > >
> > > Create your new policy for Dovecot and install it:
> > > grep dovecot /var/log/audit/audit.log | audit2allow -M dovecot_custom
> > > semodule -i dovecot_custom.pp
> > >
> > >
> > > --
> > > Alex JOST
> >
> >
> >
> >
> > Or just label the directory with mail_home_rw_t
> >
> >
> > ---
> > Aki Tuomi
> >
>
> I took the time to document suitable approach to this problem. You can
> check it here https://github.com/dovecot/documentation/pull/63/files
>
> Aki
>


Re: Missing permissions

2020-04-11 Thread Andrei Petru Mura
Hi,

After configuring systemd unit with ReadWritePaths=/home/mail, I get the
following error logs in audit:
type=AVC msg=audit(1586604621.637:6736): avc:  denied  { write } for
 pid=12750 comm="imap" name="Maildir" dev="dm-3" ino=438370738
scontext=system_u:system_r:dovecot_t:s0
tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir permissive=0
type=SYSCALL msg=audit(1586604621.637:6736): arch=c03e syscall=83
success=no exit=-13 a0=55b493a7f338 a1=1ed a2= a3=fcd8
items=0 ppid=12735 pid=12750 auid=4294967295 uid=1005 gid=1005 euid=1005
suid=1005 fsuid=1005 egid=1005 sgid=1005 fsgid=1005 tty=(none)
ses=4294967295 comm="imap" exe="/usr/libexec/dovecot/imap"
subj=system_u:system_r:dovecot_t:s0 key=(null)
type=PROCTITLE msg=audit(1586604621.637:6736): proctitle="dovecot/imap"
type=AVC msg=audit(1586604621.638:6737): avc:  denied  { write } for
 pid=12750 comm="imap" name="Maildir" dev="dm-3" ino=438370738
scontext=system_u:system_r:dovecot_t:s0
tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir permissive=0
type=SYSCALL msg=audit(1586604621.638:6737): arch=c03e syscall=21
success=no exit=-13 a0=55b493a7f508 a1=2 a2=55b493a7f388 a3=fffe
items=0 ppid=12735 pid=12750 auid=4294967295 uid=1005 gid=1005 euid=1005
suid=1005 fsuid=1005 egid=1005 sgid=1005 fsgid=1005 tty=(none)
ses=4294967295 comm="imap" exe="/usr/libexec/dovecot/imap"
subj=system_u:system_r:dovecot_t:s0 key=(null)
type=PROCTITLE msg=audit(1586604621.638:6737): proctitle="dovecot/imap"

I have SELinux enabled, on CentOS.
If I run:
audit2why < /var/log/audit/audit.log

I get:
type=AVC msg=audit(1586601301.044:6707): avc:  denied  { write } for
 pid=9930 comm="imap" name="Maildir" dev="dm-3" ino=438370738
scontext=system_u:system_r:dovecot_t:s0
tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir permissive=0

Was caused by:
Missing type enforcement (TE) allow rule.

I think it's important to know that I'm trying to use dovecot with virtual
users. If I try to configure it with PAM authentication using system users,
it works well.

Any suggestions on this?

Mura Andrei

On Sat, Apr 11, 2020 at 10:02 AM Andrei Petru Mura 
wrote:

> I think I found here what I'm interested in:
> https://doc.dovecot.org/admin_manual/system_users_used_by_dovecot/.
>
> On Sat, Apr 11, 2020 at 9:52 AM Andrei Petru Mura 
> wrote:
>
>> Hi Aki,
>>
>> Thanks. I was especially interested in documentation related to dovecot
>> and it's users permissions, the way in which dovecot uses users. Till now I
>> found only spread information on different articles from dovecot's website.
>>
>> Thanks,
>> Mura Andrei
>>
>> On Sat, Apr 11, 2020 at 9:49 AM Aki Tuomi 
>> wrote:
>>
>>> Hi,
>>>
>>>
>>> https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
>>>
>>> although we probably need to add some words into doc.dovecot.org under
>>> known issues.
>>>
>>> Aki
>>>
>>> > On 11/04/2020 09:24 Andrei Petru Mura  wrote:
>>> >
>>> >
>>> > Hi Aki,
>>> >
>>> > Any documentation on this topic?
>>> >
>>> > Mura Andrei
>>> >
>>> >
>>> > On Mon, Apr 6, 2020 at 5:27 PM Aki Tuomi 
>>> wrote:
>>> > > This is probably caused by systemd (or selinux or both).
>>> > >
>>> > >  With systemd, you need to add
>>> > >
>>> > >  ReadWritePaths=/home/mail
>>> > >
>>> > >  to the systemd unit.
>>> > >
>>> > >  Then you can check /var/log/audit/audit.log for any selinux
>>> specific problems. If you are using Centos/Redhat.
>>> > >
>>> > >  Aki
>>> > >
>>> > >  > On 06/04/2020 17:01 Andrei Petru Mura 
>>> wrote:
>>> > >  >
>>> > >  >
>>> > >  > Hi,
>>> > >  >
>>> > >  > Dovecot version 2.2.36
>>> > >  > In log files I get this error:
>>> > >  > dovecot: imap(test): Namespace '':
>>> mkdir(/home/mail/domain/test/Maildir) failed: Permission denied
>>> (euid=1005(vmail) egid=1005(vmail) missing +w perm: /home/mail/domain, UNIX
>>> perms appear ok (ACL/MAC wrong?))
>>> > >  >
>>> > >  > My authentication configuration is this:
>>> > >  > passdb {
>>> > >  > driver = passwd-file
>>> > >  > args = username_format=%n /etc/dovecot/users
>>> > >  > }
>>> > >  >
>>> > >  > userdb {
>>> > >  > driver = static
>>> > >  > args = uid=vmail gid=vmail home=/home/mail/domain/%n
>>> username_format=%n /etc/dovecot/users
>>> > >  >
>>> > >  > }
>>> > >  >
>>> > >  > /home/mail/domain/test directory is owned by vmail user.
>>> > >  > How to fix this?
>>> > >  >
>>> > >  > Mura Andrei
>>> > >
>>>
>>


Re: Missing permissions

2020-04-11 Thread Andrei Petru Mura
I think I found here what I'm interested in:
https://doc.dovecot.org/admin_manual/system_users_used_by_dovecot/.

On Sat, Apr 11, 2020 at 9:52 AM Andrei Petru Mura 
wrote:

> Hi Aki,
>
> Thanks. I was especially interested in documentation related to dovecot
> and it's users permissions, the way in which dovecot uses users. Till now I
> found only spread information on different articles from dovecot's website.
>
> Thanks,
> Mura Andrei
>
> On Sat, Apr 11, 2020 at 9:49 AM Aki Tuomi 
> wrote:
>
>> Hi,
>>
>>
>> https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
>>
>> although we probably need to add some words into doc.dovecot.org under
>> known issues.
>>
>> Aki
>>
>> > On 11/04/2020 09:24 Andrei Petru Mura  wrote:
>> >
>> >
>> > Hi Aki,
>> >
>> > Any documentation on this topic?
>> >
>> > Mura Andrei
>> >
>> >
>> > On Mon, Apr 6, 2020 at 5:27 PM Aki Tuomi 
>> wrote:
>> > > This is probably caused by systemd (or selinux or both).
>> > >
>> > >  With systemd, you need to add
>> > >
>> > >  ReadWritePaths=/home/mail
>> > >
>> > >  to the systemd unit.
>> > >
>> > >  Then you can check /var/log/audit/audit.log for any selinux specific
>> problems. If you are using Centos/Redhat.
>> > >
>> > >  Aki
>> > >
>> > >  > On 06/04/2020 17:01 Andrei Petru Mura  wrote:
>> > >  >
>> > >  >
>> > >  > Hi,
>> > >  >
>> > >  > Dovecot version 2.2.36
>> > >  > In log files I get this error:
>> > >  > dovecot: imap(test): Namespace '':
>> mkdir(/home/mail/domain/test/Maildir) failed: Permission denied
>> (euid=1005(vmail) egid=1005(vmail) missing +w perm: /home/mail/domain, UNIX
>> perms appear ok (ACL/MAC wrong?))
>> > >  >
>> > >  > My authentication configuration is this:
>> > >  > passdb {
>> > >  > driver = passwd-file
>> > >  > args = username_format=%n /etc/dovecot/users
>> > >  > }
>> > >  >
>> > >  > userdb {
>> > >  > driver = static
>> > >  > args = uid=vmail gid=vmail home=/home/mail/domain/%n
>> username_format=%n /etc/dovecot/users
>> > >  >
>> > >  > }
>> > >  >
>> > >  > /home/mail/domain/test directory is owned by vmail user.
>> > >  > How to fix this?
>> > >  >
>> > >  > Mura Andrei
>> > >
>>
>


Re: Missing permissions

2020-04-11 Thread Andrei Petru Mura
Hi Aki,

Thanks. I was especially interested in documentation related to dovecot and
it's users permissions, the way in which dovecot uses users. Till now I
found only spread information on different articles from dovecot's website.

Thanks,
Mura Andrei

On Sat, Apr 11, 2020 at 9:49 AM Aki Tuomi 
wrote:

> Hi,
>
>
> https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ReadWritePaths=
>
> although we probably need to add some words into doc.dovecot.org under
> known issues.
>
> Aki
>
> > On 11/04/2020 09:24 Andrei Petru Mura  wrote:
> >
> >
> > Hi Aki,
> >
> > Any documentation on this topic?
> >
> > Mura Andrei
> >
> >
> > On Mon, Apr 6, 2020 at 5:27 PM Aki Tuomi 
> wrote:
> > > This is probably caused by systemd (or selinux or both).
> > >
> > >  With systemd, you need to add
> > >
> > >  ReadWritePaths=/home/mail
> > >
> > >  to the systemd unit.
> > >
> > >  Then you can check /var/log/audit/audit.log for any selinux specific
> problems. If you are using Centos/Redhat.
> > >
> > >  Aki
> > >
> > >  > On 06/04/2020 17:01 Andrei Petru Mura  wrote:
> > >  >
> > >  >
> > >  > Hi,
> > >  >
> > >  > Dovecot version 2.2.36
> > >  > In log files I get this error:
> > >  > dovecot: imap(test): Namespace '':
> mkdir(/home/mail/domain/test/Maildir) failed: Permission denied
> (euid=1005(vmail) egid=1005(vmail) missing +w perm: /home/mail/domain, UNIX
> perms appear ok (ACL/MAC wrong?))
> > >  >
> > >  > My authentication configuration is this:
> > >  > passdb {
> > >  > driver = passwd-file
> > >  > args = username_format=%n /etc/dovecot/users
> > >  > }
> > >  >
> > >  > userdb {
> > >  > driver = static
> > >  > args = uid=vmail gid=vmail home=/home/mail/domain/%n
> username_format=%n /etc/dovecot/users
> > >  >
> > >  > }
> > >  >
> > >  > /home/mail/domain/test directory is owned by vmail user.
> > >  > How to fix this?
> > >  >
> > >  > Mura Andrei
> > >
>


Re: Missing permissions

2020-04-11 Thread Andrei Petru Mura
Hi Aki,

Any documentation on this topic?

Mura Andrei

On Mon, Apr 6, 2020 at 5:27 PM Aki Tuomi  wrote:

> This is probably caused by systemd (or selinux or both).
>
> With systemd, you need to add
>
> ReadWritePaths=/home/mail
>
> to the systemd unit.
>
> Then you can check /var/log/audit/audit.log for any selinux specific
> problems. If you are using Centos/Redhat.
>
> Aki
>
> > On 06/04/2020 17:01 Andrei Petru Mura  wrote:
> >
> >
> > Hi,
> >
> > Dovecot version 2.2.36
> > In log files I get this error:
> > dovecot: imap(test): Namespace '': mkdir(/home/mail/domain/test/Maildir)
> failed: Permission denied (euid=1005(vmail) egid=1005(vmail) missing +w
> perm: /home/mail/domain, UNIX perms appear ok (ACL/MAC wrong?))
> >
> > My authentication configuration is this:
> > passdb {
> >  driver = passwd-file
> >  args = username_format=%n /etc/dovecot/users
> > }
> >
> > userdb {
> >  driver = static
> >  args = uid=vmail gid=vmail home=/home/mail/domain/%n username_format=%n
> /etc/dovecot/users
> >
> > }
> >
> > /home/mail/domain/test directory is owned by vmail user.
> > How to fix this?
> >
> > Mura Andrei
>


Re: Missing permissions

2020-04-11 Thread Andrei Petru Mura
Hi Michael,

I don't have apparmour installed in my system.

Mura Andrei

On Mon, Apr 6, 2020 at 10:11 PM Michael Hirmke  wrote:

> Hi Andrei,
>
> >Hi,
>
> >Dovecot version 2.2.36
> >In log files I get this error:
> >dovecot: imap(test): Namespace '': mkdir(/home/mail/domain/test/Maildir)
> >failed: Permission denied (euid=1005(vmail) egid=1005(vmail) missing +w
> >perm: /home/mail/domain, UNIX perms appear ok (ACL/MAC wrong?))
>
> >My authentication configuration is this:
> >passdb {
> >  driver = passwd-file
> >  args = username_format=%n /etc/dovecot/users
> >}
>
> >userdb {
> >  driver = static
> >  args = uid=vmail gid=vmail home=/home/mail/domain/%n username_format=%n
> >/etc/dovecot/users
>
> >}
>
> >/home/mail/domain/test directory is owned by vmail user.
> >How to fix this?
>
> do you have apparmor up and running?
> If so, you have to modify its config for dovecot.
>
> >Mura Andrei
>
> Bye.
> Michael.
> --
> Michael Hirmke
>


Missing permissions

2020-04-06 Thread Andrei Petru Mura
Hi,

Dovecot version 2.2.36
In log files I get this error:
dovecot: imap(test): Namespace '': mkdir(/home/mail/domain/test/Maildir)
failed: Permission denied (euid=1005(vmail) egid=1005(vmail) missing +w
perm: /home/mail/domain, UNIX perms appear ok (ACL/MAC wrong?))

My authentication configuration is this:
passdb {
  driver = passwd-file
  args = username_format=%n /etc/dovecot/users
}

userdb {
  driver = static
  args = uid=vmail gid=vmail home=/home/mail/domain/%n username_format=%n
/etc/dovecot/users

}

/home/mail/domain/test directory is owned by vmail user.
How to fix this?

Mura Andrei


Re: Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
OK. I fixed it. Thanks for help.

On Sat, Apr 4, 2020 at 2:13 PM Andrei Petru Mura 
wrote:

> Hi Aki,
>
> 
>>
> Do you mean anything via this?
>
>>
>> >
>> > I want to disable accounts for system users. Only virtual users will
>> have accounts (not configured yet). Is this possible?
>> >
>> > Thanks,
>> > Mura Andrei
>>
>> Hi!
>>
>> System users are only enabled if you use pam/passwd/shadow drivers. They
>> are not enabled by default.
>>
> I don't think I'm using this drivers. Do I? (I suppose provided
> configuration should reflect this).
>
> Andrei
>
>>
>> Aki
>>
>


Re: Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
Hi Aki,


>
Do you mean anything via this?

>
> >
> > I want to disable accounts for system users. Only virtual users will
> have accounts (not configured yet). Is this possible?
> >
> > Thanks,
> > Mura Andrei
>
> Hi!
>
> System users are only enabled if you use pam/passwd/shadow drivers. They
> are not enabled by default.
>
I don't think I'm using this drivers. Do I? (I suppose provided
configuration should reflect this).

Andrei

>
> Aki
>


Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
I'm using dovecot 2.2.36 on CentOS 7.7.
My configurations are (dovecot -n):

disable_plaintext_auth = no
first_valid_uid = 1000
mail_location = maildir:~/Maildir
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
ssl = required
ssl_cert =