Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-04-07 Thread Simon
On Tue, Apr 1, 2014 at 11:29 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:

>
>
>
>  What's the output of:
>>>
>>> lsof -c dovecot|grep auth-userdb
>>>
>>>  [root@vmail1 ~]# lsof -c dovecot|grep auth-userdb
>> dovecot 3147 root   38u  unix 0x88004fce0680  0t0  24739
>> /var/run/dovecot/auth-userdb
>>
>
> Dovecot is configured to use /var/run/dovecot/auth-userdb whereas your LDA
> uses /usr/local/dovecot/var/run/dovecot/auth-userdb . You do not have
> symlinks to merge both locations, do you?
>
> Check, why the Dovecot LDA is using another config file.


Found it!!! Thank youm thank you, thank you... this was delivery config
in postfix that was using /usr/local/dovecot/var/run/dovecot/auth-userdb.
DUH!

Simon


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-04-01 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 1 Apr 2014, Simon wrote:

On Mon, Mar 31, 2014 at 7:37 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Mon, 31 Mar 2014, Simon wrote:

 On 3/24/2014 7:10 PM, Simon  wrote:



Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb)
failed: Connection refused



What's the output of:

lsof -c dovecot|grep auth-userdb


[root@vmail1 ~]# lsof -c dovecot|grep auth-userdb
dovecot 3147 root   38u  unix 0x88004fce0680  0t0  24739
/var/run/dovecot/auth-userdb


Dovecot is configured to use /var/run/dovecot/auth-userdb whereas your LDA 
uses /usr/local/dovecot/var/run/dovecot/auth-userdb . You do not have 
symlinks to merge both locations, do you?


Check, why the Dovecot LDA is using another config file.

- -- 
Steffen Kaiser

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

iQEVAwUBUzqVIXD1/YhP6VMHAQIX2QgAwGD/QNlVWfCdVUQk1u6WLaWyI5fvea+B
X4snbyMTSg3z8kM0zUW0oooRoiTPNPvHowIiFXauEcoGxIbGbkSLuL8o1m3//WhT
roAIYRvl/LgExqkZYe+rPCXkXiBcwAF4t59i5RYR6V4l80EEEUzo3CXRjGV2hDu6
2Inc6MSIVWluxTQESgEw4HC8Mhb4piyYdnXZfOKpGuxIVfqjNusnfgdKvoOkpe9S
UUw7wWDM8jISJ3PxYVDLqUIZi3iNmFeREUa7ufVhIWdADWqTSVPjOH1pbJh1PshZ
F6GX/4UAqEs0caGqg+s50jGW0Ma79AeJXh7bzsXuidao9tFPe0IveQ==
=EFHa
-END PGP SIGNATURE-


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-31 Thread Simon
On Mon, Mar 31, 2014 at 7:37 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> On Mon, 31 Mar 2014, Simon wrote:
>
>  On 3/24/2014 7:10 PM, Simon  wrote:
>>
>>> Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
>>> connect(/usr/local/dovecot/var/run/dovecot/auth-userdb)
>>> failed: Connection refused
>>>
>>
> What's the output of:
>
> lsof -c dovecot|grep auth-userdb
>
>
[root@vmail1 ~]# lsof -c dovecot|grep auth-userdb
dovecot 3147 root   38u  unix 0x88004fce0680  0t0  24739
/var/run/dovecot/auth-userdb


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 31 Mar 2014, Simon wrote:


On 3/24/2014 7:10 PM, Simon  wrote:

Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb)
failed: Connection refused


What's the output of:

lsof -c dovecot|grep auth-userdb

?

- -- 
Steffen Kaiser

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

iQEVAwUBUzkNDXD1/YhP6VMHAQKS3Af+IIz0Y9Y0aKk72Aj712PXM2QMhN44Vfkd
5ZGIKjPeO525PpfcZzClAqcDL5wt690TM1C/Ii9b2wVKjQDU1miJJbJpbokrLga/
jqTN+1JGbR/dacuT//tyc1nn5ivTnigLgGgbFIJP2kenhyMuHSeKqoOPYT9xd1Ha
z4FLnGOeIdIkgTmS2ue1XPIGTZnmO6WmhPT6TevMTcfFDl0C5CZJEOOv+oh3a5C1
/277Nk/Lj2mk+orHtCWxN3xe4u8ZE4PfMsBhLYefa2++pSKj+7yo/Y/J0t3NFEkp
vVXcCW0B2SnC+lwSmJBFYUECzIsz+tKdN61utMrA/OhIihoN/Zoavg==
=kYuY
-END PGP SIGNATURE-


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-30 Thread Simon
On Thu, Mar 27, 2014 at 5:16 PM, Tom Hendrikx  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> On 26-03-14 12:01, Charles Marcus wrote:
> > On 3/25/2014 4:08 PM, Simon  wrote:
> >> On Wed, Mar 26, 2014 at 12:15 AM, Charles Marcus
> >> wrote:
> >>> On 3/24/2014 7:10 PM, Simon  wrote:
>  Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
>  connect(/usr/local/dovecot/var/run/dovecot/auth-userdb)
>  failed: Connection refused
> >
> >>> So, your SQL userdb is refusing connections from dovecot...
> >>>
> >>> Fix this...
> >
> >> Thanks Charles, I have looked into this and tried to fix
> >> permissions but still have the same issue. I have tried changing
> >> the permissions on the auth-userdb to 0666 (see below) as well as
> >> setting the permissions of /usr/local/dovecot/var/run/dovecot/ to
> >> 777 just for testing.
> >
> > You misunderstood...
> >
> > I didn't say the filesystem permissions were wrong.
> >
> > Your SQL SERVER is refusing the connection.
> >
> > The user (vmail) you are using to connect to the SQL server doesn't
> > have permission to talk to it.
> >
> > This needs to be fixed IN THE SQL SERVER ACCESS PERMISSIONS for
> > the 'vmail' user.
> >
>
> Charles, auth-worker would have logged errors about sql access if that
> was an issue. lda doesn't do sql queries by itself, it sends the
> queries to the auth socket instead, and that fails.
>

I agree here.. Charles im my email i mentioned that i understood you were
talking about SQL permissions, i have tested this and the user can connect
and perform all SQL queries. This is what i did to test this:

[root@vmail1 ~]# su vmail
[vmail@vmail1 root]$ mysql -u DBUSER -pDBPASS -h DBHOST

mysql> use DBNAME;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT
CONCAT('/var/vmail/',CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1)))
AS home, 5000 AS uid, 5000 AS gid, CONCAT('*:storage=',quota) AS quota_rule
FROM mail_users WHERE email='t...@testdomain.co.nz';
++--+--+--+
| home   | uid  | gid  | quota_rule   |
++--+--+--+
| /var/vmail/testdomain.co.nz/test | 5000 | 5000 | *:storage=1000MB |
++--+--+--+
1 row in set (0.02 sec)

mysql> SELECT email as user, password FROM mail_users WHERE email='
t...@testdomain.co.nz';
+-+--+
| user| password |
+-+--+
| t...@testdomain.co.nz | THEPASSWORD |
+-+--+
1 row in set (0.00 sec)

mysql> exit


> The socket is not usable, as was already observed upthread by doing
> tests as root using socat. I'm still opting for
> selinux/apparmor/rsbac/etc issues here.
>

I have disabled selinux completely "SELINUX=disabled"
in /etc/selinux/config :)


> Simon, are you sure you're not missing any logging on that? I'm not
> really experienced in thoose systems, but everytime I run into issues
> with them , they sure fill my logs with all kinds of cryptic stuff ;)


I have checked with this and this is the only logging i can see on the
issue (out of all logs in /var/log/)

Mar 31 11:32:31 vmail1 dovecot: lda: Debug: Loading modules from directory:
/usr/local/dovecot/lib/dovecot
Mar 31 11:32:31 vmail1 dovecot: lda: Debug: Module loaded:
/usr/local/dovecot/lib/dovecot/lib10_quota_plugin.so
Mar 31 11:32:31 vmail1 dovecot: lda: Debug: Module loaded:
/usr/local/dovecot/lib/dovecot/lib90_sieve_plugin.so
Mar 31 11:32:32 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed: Connection
refused
Mar 31 11:32:32 vmail1 dovecot: lda: Fatal: Internal error occurred. Refer
to server log for more information.

Simon


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-26 Thread Tom Hendrikx
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 26-03-14 12:01, Charles Marcus wrote:
> On 3/25/2014 4:08 PM, Simon  wrote:
>> On Wed, Mar 26, 2014 at 12:15 AM, Charles Marcus 
>> wrote:
>>> On 3/24/2014 7:10 PM, Simon  wrote:
 Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup: 
 connect(/usr/local/dovecot/var/run/dovecot/auth-userdb)
 failed: Connection refused
> 
>>> So, your SQL userdb is refusing connections from dovecot...
>>> 
>>> Fix this...
> 
>> Thanks Charles, I have looked into this and tried to fix
>> permissions but still have the same issue. I have tried changing
>> the permissions on the auth-userdb to 0666 (see below) as well as
>> setting the permissions of /usr/local/dovecot/var/run/dovecot/ to
>> 777 just for testing.
> 
> You misunderstood...
> 
> I didn't say the filesystem permissions were wrong.
> 
> Your SQL SERVER is refusing the connection.
> 
> The user (vmail) you are using to connect to the SQL server doesn't
> have permission to talk to it.
> 
> This needs to be fixed IN THE SQL SERVER ACCESS PERMISSIONS for
> the 'vmail' user.
> 

Charles, auth-worker would have logged errors about sql access if that
was an issue. lda doesn't do sql queries by itself, it sends the
queries to the auth socket instead, and that fails.

The socket is not usable, as was already observed upthread by doing
tests as root using socat. I'm still opting for
selinux/apparmor/rsbac/etc issues here.

Simon, are you sure you're not missing any logging on that? I'm not
really experienced in thoose systems, but everytime I run into issues
with them , they sure fill my logs with all kinds of cryptic stuff ;)

Tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTM6YiAAoJEJPfMZ19VO/1+kQQAIacvfL2gQLlVOmavsgM2lBT
N5sJTVdhXPXPJ/xzjH5X+nHZ2Y4G1FBkuMakv1t1ltrbS/KYmEIcaZTeNFlqKeD+
UJtucYi9aaLKzpCAz2ZvlX7ferUz3duvUssp6qWFzwTPPr/Gk+JwtG23C+FxSKac
G/HtJXbC4KJc8dz8tJmY8XyI8mzbnjNzxJ+Xa1Gml/1sdjvv9J/xjwDEPoGfGCb/
XYK35wqshzyOgzmp1kPGvqrTAZYRW3enG7pHvqtq9rMVbyHqoFjVIdOkl8GNxWnj
l6DB9E/2+Z9P7os40jwmb77kL7GgOGDMwWbtiHJAnESbF5aYuXmQhwTBFAfTBbty
AwuqbbXOBMuG9QcV3j5gYA6KccEcX+7ulqMNFJ4vpcVdSl+SrFp06nQMhfwn4jyg
uPvkrqmgrJCfQ6prSoQxHTaC+2J1Cv9ftRwKSwReaRmzCOOCq/muI7ltq++9hY8u
z4dxLUFAXexCx9wf71TOOiTbKeo9iuLZMS+HXZn7vYeQt7y+ziCQWU5ZrSmL73nC
zqv3TR+ap9x5qVQpK7EoGlMOpa4uKGykztCAmaOwR8y5FSnaw9+d3Cfxmy1PkYLI
fLm0VHk4uOMrbps8oLfAYSXX3cgOeoGt9Ixni/Ce+me9Cdsid1wf0dczKYTX5X41
XkFPhM4OPiHq5RBzml0M
=1vTO
-END PGP SIGNATURE-


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-26 Thread Charles Marcus

On 3/25/2014 4:08 PM, Simon  wrote:

On Wed, Mar 26, 2014 at 12:15 AM, Charles Marcus
wrote:

On 3/24/2014 7:10 PM, Simon  wrote:

Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed:
Connection refused



So, your SQL userdb is refusing connections from dovecot...

Fix this...



Thanks Charles, I have looked into this and tried to fix permissions but
still have the same issue. I have tried changing the permissions on the
auth-userdb to 0666 (see below) as well as setting the permissions of
/usr/local/dovecot/var/run/dovecot/ to 777 just for testing.


You misunderstood...

I didn't say the filesystem permissions were wrong.

Your SQL SERVER is refusing the connection.

The user (vmail) you are using to connect to the SQL server doesn't have 
permission to talk to it.


This needs to be fixed IN THE SQL SERVER ACCESS PERMISSIONS for the 
'vmail' user.


--

Best regards,

Charles


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-25 Thread Simon
On Wed, Mar 26, 2014 at 12:15 AM, Charles Marcus
wrote:

> On 3/24/2014 7:10 PM, Simon  wrote:
>
>> Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
>> connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed:
>> Connection
>> refused
>>
>
> So, your SQL userdb is refusing connections from dovecot...
>
> Fix this...


Thanks Charles, I have looked into this and tried to fix permissions but
still have the same issue. I have tried changing the permissions on the
auth-userdb to 0666 (see below) as well as setting the permissions of
/usr/local/dovecot/var/run/dovecot/ to 777 just for testing.. but still get
the same error (also below). I feel im barking up the wrong tree here in
terms of what i need todo to fix the issue... but cant see the wood for the
tress here :) Would i be able to ask you to outline in basic how i go about
fixing this?

service auth {
  unix_listener auth-userdb {
mode = 0667
user = vmail
group = vmail
  }
}

Mar 26 09:01:43 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed: Connection
refused
Mar 26 09:01:43 vmail1 dovecot: lda: Fatal: Internal error occurred. Refer
to server log for more information.

Many thanks!

Simon


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-25 Thread Charles Marcus

On 3/24/2014 7:10 PM, Simon  wrote:

Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed: Connection
refused


So, your SQL userdb is refusing connections from dovecot...

Fix this...

--

Best regards,

Charles


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-24 Thread Simon
On Tue, Mar 25, 2014 at 9:00 AM, Charles Marcus
wrote:


> One more thing... please don't use pastebin... it breaks archives
> (eventually).
>
> Just copy/paste the output directly into the email body (this goes for
> logs too)...


Oh sorry :(

Mar 13 09:50:44 vmail1 postfix/pipe[31090]: 5D4FFA1057: to=<
accou...@thedomainname.com>, relay=dovecot, delay=135007,
delays=135006/0.03/0/1, dsn=4.3.0, status=deferred (temporary failure)
Mar 13 09:55:43 vmail1 postfix/qmgr[1486]: 5220B9FE50: from=<
accou...@thedomainname.com, size=2787, nrcpt=1 (queue active)
Mar 13 09:55:43 vmail1 dovecot: lda: Debug: Loading modules from directory:
/usr/local/dovecot/lib/dovecot
Mar 13 09:55:43 vmail1 dovecot: lda: Debug: Module loaded:
/usr/local/dovecot/lib/dovecot/lib10_quota_plugin.so
Mar 13 09:55:43 vmail1 dovecot: lda: Debug: Module loaded:
/usr/local/dovecot/lib/dovecot/lib90_sieve_plugin.so
Mar 13 09:55:44 vmail1 dovecot: lda: Error: userdb lookup:
connect(/usr/local/dovecot/var/run/dovecot/auth-userdb) failed: Connection
refused
Mar 13 09:55:44 vmail1 dovecot: lda: Fatal: Internal error occurred. Refer
to server log for more information.
Mar 13 09:55:44 vmail1 postfix/pipe[31212]: 5220B9FE50: to=<
accou...@thedomainname.com>, relay=dovecot, delay=136173,
delays=136171/0.03/0/1.1, dsn=4.3.0, status=deferred (temporary failure)

[root@vmail1 vmail]# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.el6.centos.plus.x86_64 x86_64 CentOS release 6.5
(Final) xfs
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login digest-md5 cram-md5
auth_verbose = yes
debug_log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:/var/vmail/%d/%n/Maildir
mbox_write_locks = fcntl
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = maildir:User quota
  quota_rule = *:storage=512M
  quota_rule2 = Trash:storage=+10%%
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=50%% quota-warning 50 %u
}
service auth {
  unix_listener auth-userdb {
group = vmail
mode = 0666
user = vmail
  }
}
service quota-warning {
  executable = script /var/vmail/quota-warning.sh
  unix_listener quota-warning {
user = vmail
  }
  user = dovecot
}
ssl_cert = 
/usr/local/dovecot/etc/dovecot/dovecot.conf
drwxr-xr-x. 2 rootroot 4096 Jul 13  2013 empty
srw-rw-rw-. 1 rootroot0 Jul 18  2013 imap-urlauth
srw---. 1 dovecot root0 Jul 18  2013 imap-urlauth-worker
srw-rw-rw-. 1 rootroot0 Jul 18  2013 indexer
srw---. 1 dovecot root0 Jul 18  2013 indexer-worker
srw---. 1 rootroot0 Jul 18  2013 ipc
srw---. 1 rootroot0 Jul 18  2013 log-errors
drwxr-x---. 2 rootdovenull 4096 Jul 18  2013 login
-rw-r--r--. 1 rootroot   40 Jul 18  2013 mounts
srw---. 1 vmail   root0 Jul 18  2013 quota-warning
srw---. 1 rootroot0 Jul 18  2013 replication-notify
prw---. 1 rootroot0 Jul 18  2013 replication-notify-fifo
srw---. 1 dovecot root0 Jul 18  2013 replicator
srw-rw-rw-. 1 rootroot0 Jul 18  2013 ssl-params
srw---. 1 rootroot0 Jul 18  2013 stats
prw---. 1 rootroot0 Jul 18  2013 stats-mail
drwxr-x---. 2 rootdovenull 4096 Jul 18  2013 token-login


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-24 Thread Charles Marcus

On 3/24/2014 3:55 PM, Simon  wrote:

Some ideas:

1) Show full output of 'doveconf -n'



http://pastebin.com/wsUt0eEF


One more thing... please don't use pastebin... it breaks archives 
(eventually).


Just copy/paste the output directly into the email body (this goes for 
logs too)...


--

Best regards,

Charles


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-24 Thread Simon
On Mon, Mar 24, 2014 at 9:10 PM, Tom Hendrikx  wrote:

>> [root@vmail1 ~]# socat -
> >> UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
> >> 2014/03/16 20:57:05 socat[24404] E connect(3, AF=1
> >> "/usr/local/dovecot/var/run/dovecot/auth-userdb", 48): Connection
> refused
> >>
> >> Seems a bit wierd that I can't connect as root?
> >>
> > Hi All, Ive been googling the crap out of this but still cant seem to
> make
> > it work.. any assistance would be really appreciated thanks! :)
> >
>
> Please don't top-post...
>

Hi There, Sorry about that ;)


>
> Some ideas:
>
> 1) Show full output of 'doveconf -n'
>

http://pastebin.com/wsUt0eEF


> 2) How do permissions of the socket look like? Show full output of 'ls
> -al /usr/local/dovecot/var/run/dovecot/'
>

http://pastebin.com/pCazAVUz


> 3) Do you use SElinux or some other access control system? Any output in
> syslog/kernel logging?


/etc/selinux/config was set to permissive, so i set to disabled. Apart from
the mail.log output in my pastbin above - there is no more logging that i
can find.

Thanks!

Simon


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-24 Thread Tom Hendrikx
On 03/24/2014 04:14 AM, Simon wrote:
> On Sun, Mar 16, 2014 at 9:02 PM, Simon  wrote:
> 
>>
>>
>> On Thursday, March 13, 2014, Steffen Kaiser 
>> wrote:
>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> On Thu, 13 Mar 2014, Simon wrote:
>>>
>>>  Ive taken a look at this and cant quite figure out what is going on
 here. I have tested all the SQL permissions, and also changed the
 unix_listener auth-userdb mode to 0666 (as instructed elsewhere to try and
 solve this issue), but cannot seem to work out what the issue is.

>>>
>>> what happens if you connect to that socket manually, e.g.:
>>>
>>> # sudo -u  socat - UNIX:/usr/local/dovecot/var/
>>> run/dovecot/auth-userdb
>>> VERSION 1   1
>>> SPID1746
>>>
>>> Maybe first try as root, then with the partucular users.
>>>
>>
>> Thanks for the reply! I tried this as root and got the following:
>>
>> [root@vmail1 ~]# socat -
>> UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
>> 2014/03/16 20:57:05 socat[24404] E connect(3, AF=1
>> "/usr/local/dovecot/var/run/dovecot/auth-userdb", 48): Connection refused
>>
>> Seems a bit wierd that I can't connect as root?
>>
> Hi All, Ive been googling the crap out of this but still cant seem to make
> it work.. any assistance would be really appreciated thanks! :)
> 

Please don't top-post...

Some ideas:

1) Show full output of 'doveconf -n'
2) How do permissions of the socket look like? Show full output of 'ls
-al /usr/local/dovecot/var/run/dovecot/'
3) Do you use SElinux or some other access control system? Any output in
syslog/kernel logging?

Tom




signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-24 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 24 Mar 2014, Simon wrote:


Hi All, Ive been googling the crap out of this but still cant seem to make
it work.. any assistance would be really appreciated thanks! :)

On Sun, Mar 16, 2014 at 9:02 PM, Simon  wrote:

On Thursday, March 13, 2014, Steffen Kaiser 
wrote:

On Thu, 13 Mar 2014, Simon wrote:

 Ive taken a look at this and cant quite figure out what is going on

here. I have tested all the SQL permissions, and also changed the
unix_listener auth-userdb mode to 0666 (as instructed elsewhere to try and
solve this issue), but cannot seem to work out what the issue is.



what happens if you connect to that socket manually, e.g.:

# sudo -u  socat - UNIX:/usr/local/dovecot/var/
run/dovecot/auth-userdb
VERSION 1   1
SPID1746

Maybe first try as root, then with the partucular users.



Thanks for the reply! I tried this as root and got the following:

[root@vmail1 ~]# socat -
UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
2014/03/16 20:57:05 socat[24404] E connect(3, AF=1
"/usr/local/dovecot/var/run/dovecot/auth-userdb", 48): Connection refused

Seems a bit wierd that I can't connect as root?


Actually, "Connection refused" is not "Permission denied", I would say 
that:


a) Dovecot is not running,
b) Dovecot is not configured to listen on that socket,
c) Dovecot died when you've connect
d) SELinux, AppArmor, ... prevent access -> but I would expect "Permission 
denied" in that cases, too


Check: lsof -c dovecot|grep auth-userdb
dovecot 12600 root   56u  unix 0x88003f94ed00  0t0  48261 
/var/run/dovecot2.2/auth-userdb

- -- 
Steffen Kaiser

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

iQEVAwUBUy/oAnD1/YhP6VMHAQLEEQf/TopegsHb+TJ/t7LBr9WUmRDCwsLxCI7P
Ctw8FRODVns7pFQZYkdytQ/klKVnxPY8TGXr58FAGJO+vIKAH0h7yCRzhfrIu2cP
rBRTqFXubJ6AuqDnspYQu/hA5tr1O0SSDJKQ5e25kbStMMpSCVaHcMVah/KeZZZC
sWScIt7BYkGRUPkwQOdbAbQZzmHvCCL6T/e71abK/dOgj3Pxw0kNCtQlvsAxLCdi
5eqymWXV4DNwrdrJtt89cGjCFX4jmFHngUpxE3SWRjQgtnJj5vDr3rnb0sEKwiOd
3OX8iTavRpapMIh83sTg32rs4zqrJZHv2nCWjh071coN8eAeTTX0Nw==
=fIM7
-END PGP SIGNATURE-


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-23 Thread Simon
Hi All, Ive been googling the crap out of this but still cant seem to make
it work.. any assistance would be really appreciated thanks! :)

Simon

On Sun, Mar 16, 2014 at 9:02 PM, Simon  wrote:

>
>
> On Thursday, March 13, 2014, Steffen Kaiser 
> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> On Thu, 13 Mar 2014, Simon wrote:
>>
>>  Ive taken a look at this and cant quite figure out what is going on
>>> here. I have tested all the SQL permissions, and also changed the
>>> unix_listener auth-userdb mode to 0666 (as instructed elsewhere to try and
>>> solve this issue), but cannot seem to work out what the issue is.
>>>
>>
>> what happens if you connect to that socket manually, e.g.:
>>
>> # sudo -u  socat - UNIX:/usr/local/dovecot/var/
>> run/dovecot/auth-userdb
>> VERSION 1   1
>> SPID1746
>>
>> Maybe first try as root, then with the partucular users.
>>
>
> Thanks for the reply! I tried this as root and got the following:
>
> [root@vmail1 ~]# socat -
> UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
> 2014/03/16 20:57:05 socat[24404] E connect(3, AF=1
> "/usr/local/dovecot/var/run/dovecot/auth-userdb", 48): Connection refused
>
> Seems a bit wierd that I can't connect as root?
>
> Simon
>


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-16 Thread Simon
On Thursday, March 13, 2014, Steffen Kaiser 
wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Thu, 13 Mar 2014, Simon wrote:
>
>  Ive taken a look at this and cant quite figure out what is going on here.
>> I have tested all the SQL permissions, and also changed the unix_listener
>> auth-userdb mode to 0666 (as instructed elsewhere to try and solve this
>> issue), but cannot seem to work out what the issue is.
>>
>
> what happens if you connect to that socket manually, e.g.:
>
> # sudo -u  socat - UNIX:/usr/local/dovecot/var/
> run/dovecot/auth-userdb
> VERSION 1   1
> SPID1746
>
> Maybe first try as root, then with the partucular users.
>

Thanks for the reply! I tried this as root and got the following:

[root@vmail1 ~]# socat - UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
2014/03/16 20:57:05 socat[24404] E connect(3, AF=1
"/usr/local/dovecot/var/run/dovecot/auth-userdb", 48): Connection refused

Seems a bit wierd that I can't connect as root?

Simon


Re: [Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-13 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 13 Mar 2014, Simon wrote:


Ive taken a look at this and cant quite figure out what is going on here. I 
have tested all the SQL permissions, and also changed the unix_listener 
auth-userdb mode to 0666 (as instructed elsewhere to try and solve this issue), 
but cannot seem to work out what the issue is.


what happens if you connect to that socket manually, e.g.:

# sudo -u  socat - UNIX:/usr/local/dovecot/var/run/dovecot/auth-userdb
VERSION 1   1
SPID1746

Maybe first try as root, then with the partucular users.

- -- 
Steffen Kaiser

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

iQEVAwUBUyFkvnD1/YhP6VMHAQJvbwgA2qSvbTK1VnJqTU4ULEhdv7dwzNBpUncL
NJoqJLZRFcLNfiGo8XlX+8yOFWUX7P/7iXArqqMylJVMFheBDFQyALDPw02TqSs3
RuQEpvDFHXkCnJlHqbrkOtLIoGcrWu7OBf1N1zsxHPloGyOymDAEZD2jZvEwUUVO
p2tK7VOmp9v/V1cczNkt+ANDTvUAdgy9smrtBsJOr6/SmWOWtoOUzGvagJlDOklj
2juIhMpIVfNDEWBmDBIy/52uOZGJ+KGx93JktLnyGLq1mSkV2JSCunrQdduxyBuB
iOfgkpwEEuWs9x2HK5bLm1Wv14i2XJTplMkNEvhcSrM89D1Rctjl1Q==
=HUSS
-END PGP SIGNATURE-


[Dovecot] Connection refused userdb lookup ..dovecot/auth-userdb

2014-03-12 Thread Simon
Hi There,

Ive taken a look at this and cant quite figure out what is going on here. I 
have tested all the SQL permissions, and also changed the unix_listener 
auth-userdb mode to 0666 (as instructed elsewhere to try and solve this issue), 
but cannot seem to work out what the issue is. 

Would someone be able to please point me in the correct direction here?

Output of log + dovecot -n via this link:

http://pastebin.com/wsUt0eEF

# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.el6.centos.plus.x86_64 x86_64 CentOS release 6.5 (Final) 
xfs

Thanks

Simon