Re: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied

2020-10-23 Thread Richard Hector
Hi, I'm seeing the same, but I think it's every time the lda is called 
to deliver mail to a mailbox. Postfix runs it as vmail:vmail.


My socket is owned by root:dovecot (on Debian buster).

Should I add vmail to the dovecot group to enable it to write? Or is 
changing the socket to 0666 safer?


I'm also a little confused, because according to
https://doc.dovecot.org/configuration_manual/stats/ no statistics are 
logged by default, and I have no mentions of 'metric' anywhere in my 
config, so why is the write even attempted? (dovecot 2.3.4)


Cheers,
Richard

On 24/10/20 4:46 am, Aki Tuomi wrote:

Hi!

You can ignore it, or you can change the socket permissions to 0666.

service stats {
unix_listener stats-writer {
   mode = 0666
}
}

Aki



On 23/10/2020 17:52 mj  wrote:

 
Hi,


Nobody?

It happens so rarely, and the system appears to be running fine 
otherwise, should I just ignore it?


Still makes me wonder way it would happen at all..?

MJ

On 10/22/20 12:53 PM, mj wrote:
> Hi,
> 
> We are getting very occasional messags from dovecot:
> 
>> net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied
> 
> Over the last week, the message appeared five times. (on a mail server 
> with over 100 users, to that's basically almost never)
> 
> doveconf -n below
> 
>> # 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf

>> # Pigeonhole version 0.5.4 ()
>> # OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.6 xfs
> 
> snip...
> 
>> service stats {

>>   unix_listener stats-reader {
>>     group = vmail
>>     mode = 0660
>>     user = vmail
>>   }
>>   unix_listener stats-writer {
>>     group = vmail
>>     mode = 0660
>>     user = vmail
>>   }
>> }
> 
> and the on-disk permissions are:
> 
>> root@dovecot:~# ls -l /var/run/dovecot/*stat*

>> srw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats
>> prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-mail
>> prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-user
>> srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-reader
>> srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-writer
> 
> We're not sure what makes the Permission denied error happen...
> 
> Anyone with an idea?
> 
> MJ






Re: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied

2020-10-23 Thread Aki Tuomi
Hi!

You can ignore it, or you can change the socket permissions to 0666.

service stats {
   unix_listener stats-writer {
  mode = 0666
   }
}

Aki


> On 23/10/2020 17:52 mj  wrote:
> 
>  
> Hi,
> 
> Nobody?
> 
> It happens so rarely, and the system appears to be running fine 
> otherwise, should I just ignore it?
> 
> Still makes me wonder way it would happen at all..?
> 
> MJ
> 
> On 10/22/20 12:53 PM, mj wrote:
> > Hi,
> > 
> > We are getting very occasional messags from dovecot:
> > 
> >> net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied
> > 
> > Over the last week, the message appeared five times. (on a mail server 
> > with over 100 users, to that's basically almost never)
> > 
> > doveconf -n below
> > 
> >> # 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
> >> # Pigeonhole version 0.5.4 ()
> >> # OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.6 xfs
> > 
> > snip...
> > 
> >> service stats {
> >>   unix_listener stats-reader {
> >>     group = vmail
> >>     mode = 0660
> >>     user = vmail
> >>   }
> >>   unix_listener stats-writer {
> >>     group = vmail
> >>     mode = 0660
> >>     user = vmail
> >>   }
> >> }
> > 
> > and the on-disk permissions are:
> > 
> >> root@dovecot:~# ls -l /var/run/dovecot/*stat*
> >> srw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats
> >> prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-mail
> >> prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-user
> >> srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-reader
> >> srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-writer
> > 
> > We're not sure what makes the Permission denied error happen...
> > 
> > Anyone with an idea?
> > 
> > MJ


Re: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied

2020-10-23 Thread mj

Hi,

Nobody?

It happens so rarely, and the system appears to be running fine 
otherwise, should I just ignore it?


Still makes me wonder way it would happen at all..?

MJ

On 10/22/20 12:53 PM, mj wrote:

Hi,

We are getting very occasional messags from dovecot:


net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied


Over the last week, the message appeared five times. (on a mail server 
with over 100 users, to that's basically almost never)


doveconf -n below


# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.6 xfs


snip...


service stats {
  unix_listener stats-reader {
    group = vmail
    mode = 0660
    user = vmail
  }
  unix_listener stats-writer {
    group = vmail
    mode = 0660
    user = vmail
  }
}


and the on-disk permissions are:


root@dovecot:~# ls -l /var/run/dovecot/*stat*
srw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats
prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-mail
prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-user
srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-reader
srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-writer


We're not sure what makes the Permission denied error happen...

Anyone with an idea?

MJ


net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied

2020-10-22 Thread mj

Hi,

We are getting very occasional messags from dovecot:


net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied


Over the last week, the message appeared five times. (on a mail server 
with over 100 users, to that's basically almost never)


doveconf -n below


# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.6 xfs


snip...


service stats {
  unix_listener stats-reader {
group = vmail
mode = 0660
user = vmail
  }
  unix_listener stats-writer {
group = vmail
mode = 0660
user = vmail
  }
}


and the on-disk permissions are:


root@dovecot:~# ls -l /var/run/dovecot/*stat*
srw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats
prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-mail
prw--- 1 root  root  0 Oct  6 00:25 /var/run/dovecot/old-stats-user
srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-reader
srw-rw 1 vmail vmail 0 Oct  6 00:25 /var/run/dovecot/stats-writer


We're not sure what makes the Permission denied error happen...

Anyone with an idea?

MJ


Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot



> On 10 Apr 2019, at 11:50, Aki Tuomi via dovecot  wrote:
> 
> 
>> On 10 April 2019 20:48 @lbutlr via dovecot  wrote:
>> 
>> 
>> On 10 Apr 2019, at 10:43, @lbutlr via dovecot  wrote:
>>> lso, the failed message strongly implies that the email was not delivered, 
>>> since it happens on the delivery log line and there is not indication in 
>>> the log that delivery succeeded. However, the message is delivered. It 
>>> might be worth changing the message or still logging the actual message 
>>> delivery?
>> 
>> One last thing:
>> 
>>  does not mention that stats is now 
>> required. I ignored the entire block on that page on stats because I'd never 
>> used it.
>> 
> 
> I guess it's that 'statistics' is kinda built-in now. So it's not like a 
> plugin anymore. But I get your point, maybe we should clarify this better.

Since it requires a config change, it seems something should be there.

And it looks like the necessary block could be auto-generated based on looking 
at 10-master.conf?


-- 
IT'S POTATO, NOT POTATOE Bart chalkboard Ep. 7F01




Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Aki Tuomi via dovecot


> On 10 April 2019 20:48 @lbutlr via dovecot  wrote:
> 
>  
> On 10 Apr 2019, at 10:43, @lbutlr via dovecot  wrote:
> > lso, the failed message strongly implies that the email was not delivered, 
> > since it happens on the delivery log line and there is not indication in 
> > the log that delivery succeeded. However, the message is delivered. It 
> > might be worth changing the message or still logging the actual message 
> > delivery?
> 
> One last thing:
> 
>  does not mention that stats is now 
> required. I ignored the entire block on that page on stats because I'd never 
> used it.
> 

I guess it's that 'statistics' is kinda built-in now. So it's not like a plugin 
anymore. But I get your point, maybe we should clarify this better.

Aki


Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot
On 10 Apr 2019, at 10:43, @lbutlr via dovecot  wrote:
> lso, the failed message strongly implies that the email was not delivered, 
> since it happens on the delivery log line and there is not indication in the 
> log that delivery succeeded. However, the message is delivered. It might be 
> worth changing the message or still logging the actual message delivery?

One last thing:

 does not mention that stats is now 
required. I ignored the entire block on that page on stats because I'd never 
used it.


-- 
'Nothing works against magic. Except stronger magic. And then the only
thing that beats stronger magic is even stronger magic. And the next
thing you know...' 'Phooey?' --Sourcery






Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot
On 10 Apr 2019, at 10:55, Remo Mattei via dovecot  wrote:
> This is what fixed mine 
> 
> service stats {
> # unix_listener stats-reader {
> # group =
> # mode = 0666
> # user =
> #   }
>   unix_listener stats-writer {
> group = dovecot
> mode = 0666
> user =
>   }
>  }

Setting permissions to 666 never seems like a great idea.


-- 
But I been sane a long while now, and change is good.




Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Remo Mattei via dovecot
This is what fixed mine 

 service stats {
# unix_listener stats-reader {
# group =
# mode = 0666
# user =
#   }
   unix_listener stats-writer {
 group = dovecot
 mode = 0666
 user =
   }
  }


> On Apr 10, 2019, at 09:43, @lbutlr via dovecot  wrote:
> 
> On 10 Apr 2019, at 09:06, @lbutlr via dovecot  wrote:
>> Should I add
>> 
>> service stats {
>> unix_listener stats-writer {
>> user = dovecot
>> }
>> unix_listener stats-reader {
>> user = dovecot
>> }
>> }
>> 
>> to my dovecot.conf file?
> 
> I did this and it appears to have fixed the issue.
> 
> Also, the failed message strongly implies that the email was not delivered, 
> since it happens on the delivery log line and there is not indication in the 
> log that delivery succeeded. However, the message is delivered. It might be 
> worth changing the message or still logging the actual message delivery?
> 
> 
> -- 
> I WILL NOT CARVE GODS Bart chalkboard Ep. 8F11
> 
> 



Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Odhiambo Washington via dovecot
On Wed, 10 Apr 2019 at 19:44, @lbutlr via dovecot 
wrote:

> On 10 Apr 2019, at 09:06, @lbutlr via dovecot  wrote:
> > Should I add
> >
> > service stats {
> >  unix_listener stats-writer {
> >  user = dovecot
> >  }
> >  unix_listener stats-reader {
> >  user = dovecot
> >  }
> > }
> >
> > to my dovecot.conf file?
>
> I did this and it appears to have fixed the issue.
>
> Also, the failed message strongly implies that the email was not
> delivered, since it happens on the delivery log line and there is not
> indication in the log that delivery succeeded. However, the message is
> delivered. It might be worth changing the message or still logging the
> actual message delivery?
>
>
I use dovecot-lda for deliveries and would see entries in both Exim (MTA)
and Dovecot log files.

-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)


Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot
On 10 Apr 2019, at 09:06, @lbutlr via dovecot  wrote:
> Should I add
> 
> service stats {
>  unix_listener stats-writer {
>  user = dovecot
>  }
>  unix_listener stats-reader {
>  user = dovecot
>  }
> }
> 
> to my dovecot.conf file?

I did this and it appears to have fixed the issue.

Also, the failed message strongly implies that the email was not delivered, 
since it happens on the delivery log line and there is not indication in the 
log that delivery succeeded. However, the message is delivered. It might be 
worth changing the message or still logging the actual message delivery?


-- 
I WILL NOT CARVE GODS Bart chalkboard Ep. 8F11




Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Odhiambo Washington via dovecot
On Wed, 10 Apr 2019 at 18:06, @lbutlr via dovecot 
wrote:

>
>
> > On 10 Apr 2019, at 08:57, Odhiambo Washington via dovecot <
> dovecot@dovecot.org> wrote:
> >
> >
> >
> > On Wed, 10 Apr 2019 at 17:50, @lbutlr via dovecot 
> wrote:
> > On 10 Apr 2019, at 08:36, @lbutlr via dovecot 
> wrote:
> > > net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission
> den))
> >
> > One other detail:
> >
> > /var/run/dovecot/stats-writer:
> > 0 srw-rw  1 root dovecot 0 Apr 10 08:47 stats-writer
> >
> >
> > Edit your 10-master.conf and make sure that the user specified in the
> details below matches the dovecot user:
> >
> >
> > service stats {
> >   unix_listener stats-writer {
> >   user = mailnull
> >   }
> >   unix_listener stats-reader {
> >   user = mailnull
> >   }
>
> Sorry, i am confused. There is no similar clock in 10-master.conf
>
> In fact,. the string "stats" does not appear in that file at all. The
> commented line
>
> #default_internal_user = dovecot
>
> is in that file, and that is the dovecot user (as seen in the permissions
> above).
>
> Should I add
>
> service stats {
>   unix_listener stats-writer {
>   user = dovecot
>   }
>   unix_listener stats-reader {
>   user = dovecot
>   }
> }
>
> to my dovecot.conf file?
>
>
Add the two blocks to 10-master.conf, before the last "}"

My dovecot runs as user mailnull. YMMV.




-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)


Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot



> On 10 Apr 2019, at 08:57, Odhiambo Washington via dovecot 
>  wrote:
> 
> 
> 
> On Wed, 10 Apr 2019 at 17:50, @lbutlr via dovecot  wrote:
> On 10 Apr 2019, at 08:36, @lbutlr via dovecot  wrote:
> > net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission den))
> 
> One other detail:
> 
> /var/run/dovecot/stats-writer:
> 0 srw-rw  1 root dovecot 0 Apr 10 08:47 stats-writer
> 
> 
> Edit your 10-master.conf and make sure that the user specified in the details 
> below matches the dovecot user:
> 
> 
> service stats {
>   unix_listener stats-writer {
>   user = mailnull
>   }
>   unix_listener stats-reader {
>   user = mailnull
>   }

Sorry, i am confused. There is no similar clock in 10-master.conf

In fact,. the string "stats" does not appear in that file at all. The commented 
line

#default_internal_user = dovecot 

is in that file, and that is the dovecot user (as seen in the permissions 
above).

Should I add

service stats {
  unix_listener stats-writer {
  user = dovecot
  }
  unix_listener stats-reader {
  user = dovecot
  }
}

to my dovecot.conf file?


-- 
I want a party where all the women wear new dresses and all the men
drink beer. -- Jason Gaes






Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Odhiambo Washington via dovecot
On Wed, 10 Apr 2019 at 17:50, @lbutlr via dovecot 
wrote:

> On 10 Apr 2019, at 08:36, @lbutlr via dovecot  wrote:
> > net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission den))
>
> One other detail:
>
> /var/run/dovecot/stats-writer:
> 0 srw-rw  1 root dovecot 0 Apr 10 08:47 stats-writer
>
>
Edit your 10-master.conf and make sure that the user specified in the
details below matches the dovecot user:


service stats {
  unix_listener stats-writer {
  user = mailnull
  }
  unix_listener stats-reader {
  user = mailnull
  }


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)


Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread Aki Tuomi via dovecot


 
 
  
   
  
  
   
On 10 April 2019 17:49 @lbutlr via dovecot <
dovecot@dovecot.org> wrote:
   
   

   
   

   
   
On 10 Apr 2019, at 08:36, @lbutlr via dovecot <
dovecot@dovecot.org> wrote:
   
   

 net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission den))

   
   
One other detail:
   
   

   
   
/var/run/dovecot/stats-writer:
   
   
0 srw-rw 1 root dovecot 0 Apr 10 08:47 stats-writer
   
   

   
   

   
   
--
   
   
"Back off, man. I'm a scientist."
   
  
  
   
  
  
   New stats is no longer optional, and has no relation to old stats. You can maybe temporarily allow writing to that socket for all.
  
  
   ---
Aki Tuomi
   
 



Re: /var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot
On 10 Apr 2019, at 08:36, @lbutlr via dovecot  wrote:
> net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission den))

One other detail:

/var/run/dovecot/stats-writer:
0 srw-rw  1 root dovecot 0 Apr 10 08:47 stats-writer


-- 
"Back off, man. I'm a scientist."




/var/run/dovecot/stats-writer) failed: Permission denied

2019-04-10 Thread @lbutlr via dovecot
I am getting this error in logs 

net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission den))

and I looked around the google results and it seems to be related to using 
service stats, which I am not using.

# doveconf -n | grep stat
# doveconf -n | head -3
# 2.3.5.1 (7ec6d0ade): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.5 (2483b085)
# OS: FreeBSD 11.2-RELEASE-p4 i386  

Postfix is 3.4-20190106 (the newest version in ports)


-- 
Over 3,500 gay marriages and, what, no hellfire? I was promise hellfire.
And riots. What gives? -- Mark Morford





Re: stats-writer failed: Permission denied

2018-02-08 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 7 Feb 2018, Jakobus Schürz wrote:

Since i compile my own dovecot (not using dovecot from debian), i get this 
error on each startup dovecot with systemd


Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: Permission 
denied
Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: Permission 
denied



I can change the owner and/or permissions of the file, than it works till the 
next reboot.


How can i set this correctly in my configs?


check out something like:

service stats {
  fifo_listener stats-mail {
user = vmail
mode = 0600
  }
}

https://wiki2.dovecot.org/Services#unix_listeners_and_fifo_listeners

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWnwNqcQnQQNheMxiAQLyVwf8DBEV27Nz5VXG3ENcjkkTblDS1/7dkTHc
ZWbBY9VfRMp8VzjCCFHRNcHiPB26Y9qeXlVjOnDkBJXtl+XvmH+2Stg+LALp5Elh
mS4GZNbu2ydYz4w35DbDY1+3Yg29LTp6kzLbn6s9wWLci0CiJCxbHuHvXKhBPMNE
VGTBoGRhh+VOLJmN5lduVPHz0BDMUzeB74I3vWLNrYgIlXG7+vezEMPG4SgiX0b7
pggzrUEcQPPGnFDGDzuGtK7XWVJUoYEnJ81BYBplf/p6dB9ExqlOLl9c8jmeglwb
JsBI2UNp2BSANggKG0oCRfbkAUgeCPpIIejGnhNFGKujBNdz1lYDNA==
=49Ge
-END PGP SIGNATURE-

stats-writer failed: Permission denied

2018-02-07 Thread Jakobus Schürz

Hi there!

Since i compile my own dovecot (not using dovecot from debian), i get 
this error on each startup dovecot with systemd


Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: 
Permission denied
Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: 
Permission denied



I can change the owner and/or permissions of the file, than it works 
till the next reboot.


How can i set this correctly in my configs?

Some googling didn't give me results for this error.


jakob