Re: [Dovecot] Virtual user and post-login 2.0.13
You are right! It works now! > From: t...@iki.fi > To: pelle2...@hotmail.com > Date: Mon, 29 Aug 2011 06:20:54 +0300 > CC: dovecot@dovecot.org > Subject: Re: [Dovecot] Virtual user and post-login 2.0.13 > > On Sat, 2011-08-27 at 16:54 +0200, Pelle Svensson wrote: > > dovecot-postlogin.sh(executed as root) > > = > > #!/bin/sh > > > > date >>/home/fetchmail/script.log > > > > kill -s 10 `cat /home/fetchmail/.fetchmail.pid | head -n 1` > > >>/home/fetchmail/script.log > > > > exit 0 > > exec "$@", not exit 0 as http://wiki2.dovecot.org/PostLoginScripting > shows. > >
Re: [Dovecot] Virtual user and post-login 2.0.13
On Sat, 2011-08-27 at 16:54 +0200, Pelle Svensson wrote: > dovecot-postlogin.sh(executed as root) > = > #!/bin/sh > > date >>/home/fetchmail/script.log > > kill -s 10 `cat /home/fetchmail/.fetchmail.pid | head -n 1` > >>/home/fetchmail/script.log > > exit 0 exec "$@", not exit 0 as http://wiki2.dovecot.org/PostLoginScripting shows.
Re: [Dovecot] Virtual user and post-login 2.0.13
Request: A7 SELECT {20+} 49 8.025564192.168.1. 192.168.1. IMAP Response: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 50 8.025591 192.168.1. 192.168.1. TCP 54240 > imap [ACK] Seq=218 Ack=3168 Win=14592 Len=0 TSV=18243154 TSER=191031529 51 8.025718192.168.1. 192.168.1. IMAP Request: A8 UID FETCH 1:4 (FLAGS) 52 8.026519192.168.1. 192.168.1. IMAP Response: * 1 FETCH (UID 1 FLAGS (\Seen)) 53 8.026654192.168.1. 192.168.1. IMAP Request: A9 STATUS {20+} dovecot-info.log === Aug 27 16:34:45 master: Info: Dovecot v2.0.13 starting up (core dumps disabled) Aug 27 16:34:48 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth Aug 27 16:34:48 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so Aug 27 16:34:48 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so Aug 27 16:34:48 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so Aug 27 16:34:48 auth: Debug: passwd-file /etc/dovecot/users: Read 3 users Aug 27 16:34:48 auth: Debug: auth client connected (pid=9352) Aug 27 16:34:49 auth: Debug: client in: AUTH1PLAIN service=imaplip=192.168.1. rip=192.168.1.lport=143rport=54240 resp=AHBtcEBicmVkYmFuZC5uZXQAQWc4MkltYXA= Aug 27 16:34:49 auth: Debug: passwd-file(,192.168.1.): lookup: user= file=/etc/dovecot/users Aug 27 16:34:49 auth: Debug: auth(,192.168.1.): allow_nets: Matching for network 192.168.1.0/24 Aug 27 16:34:49 auth: Debug: client out: OK1user= Aug 27 16:34:49 auth: Debug: master in: REQUEST299971379393521 595e05b06e4f241795732866abb9cf89 Aug 27 16:34:49 auth: Debug: passwd-file(,192.168.1.): lookup: user= file=/etc/dovecot/users Aug 27 16:34:49 auth: Debug: master out: USER2999713793uid=500 gid=500home=/home/fetchmail mail=maildir:/home/fetchmail/mailroot/ Aug 27 16:34:49 imap-login: Info: Login: user=<>, method=PLAIN, rip=192.168.1., lip=192.168.1., mpid=9354 Aug 27 16:34:49 imap: Debug: Added userdb setting: mail=maildir:/home/fetchmail/mailroot/ Aug 27 16:34:49 imap(): Debug: Effective uid=500, gid=500, home=/home/fetchmail Aug 27 16:34:49 imap(): Debug: maildir++: root=/home/fetchmail/mailroot/, index=, control=, inbox=/home/fetchmail/mailroot/ > Date: Fri, 26 Aug 2011 13:41:18 -0500 > From: will...@datahelper.com > CC: dovecot@dovecot.org > Subject: Re: [Dovecot] Virtual user and post-login 2.0.13 > > Did you try installing from source after applying the patch? As in: > > This is your problem.. It's a bug in v2.0.13. You could patch with > http://hg.dovecot.org/dovecot-2.0/rev/a2d57b43ccb2 or change config > socket's permissions. I'll hopefully release v2.0.14 in not too distant > future. > -- Timo > > That got it working for me. Plus this: > service imap { > executable = imap imap-postlogin > } > > service imap-postlogin { > executable = script-login /usr/local/bin/set_postpop > unix_listener imap-postlogin { > } > } > > The script seems to run as root so I set ownership to the proper user in > the script. > > _ > Mark Willcox > Data Helper, Inc. > > > On 8/25/2011 10:47 AM, Pelle Svensson wrote: > > Hi > > > > I tried several variants of suggestions but I can't get it working > > > > dovecot-info.log: > > === > > Aug 25 17:37:48 imap-login: Info: Login: user=, method=PLAIN, > > rip=192.168.1.xx, lip=192.168.1.xx, mpid=11264 > > Aug 25 17:37:48 imap(vuser): Info: Post-login script denied access to user > > vuser > > > > dovecot.log > > > > Aug 25 17:31:28 imap-postlogin: Error: script-login: Error: user > > p...@bredband.net: Error reading configuration: > > net_connect_unix(/var/run/dovecot/config) failed: Permission denied > > Aug 25 17:31:28 imap-postlogin: Error: script-login: Fatal: Internal error > > occurred. Refer to server log for more information. > > Aug 25 17:31:28 log: Error: service(imap-postlogin): child 11082 returned > > error 89 (Fatal failure) > > > > dovecot.conf > > > > protocols = imap pop3 > > base_dir = /var/run/dovecot/ > > > > log_path = /var/log/dovecot.log > > info_log_path = /var/log/dovecot-info.log > > > > ssl = no # v1.2+, for older versions use: ssl_disable = yes > > disable_plaintext_auth = no > > > > mail_location = maildir:/home/fetchmail/mailroot/dummy > > > > pop3_uidl_format = %08Xu%08Xv > > > > > > !include conf.d/*.conf > > !include_try local.conf > > > > mail_ui
Re: [Dovecot] Virtual user and post-login 2.0.13
Did you try installing from source after applying the patch? As in: This is your problem.. It's a bug in v2.0.13. You could patch with http://hg.dovecot.org/dovecot-2.0/rev/a2d57b43ccb2 or change config socket's permissions. I'll hopefully release v2.0.14 in not too distant future. -- Timo That got it working for me. Plus this: service imap { executable = imap imap-postlogin } service imap-postlogin { executable = script-login /usr/local/bin/set_postpop unix_listener imap-postlogin { } } The script seems to run as root so I set ownership to the proper user in the script. _ Mark Willcox Data Helper, Inc. On 8/25/2011 10:47 AM, Pelle Svensson wrote: > Hi > > I tried several variants of suggestions but I can't get it working > > dovecot-info.log: > === > Aug 25 17:37:48 imap-login: Info: Login: user=, method=PLAIN, > rip=192.168.1.xx, lip=192.168.1.xx, mpid=11264 > Aug 25 17:37:48 imap(vuser): Info: Post-login script denied access to user > vuser > > dovecot.log > > Aug 25 17:31:28 imap-postlogin: Error: script-login: Error: user > p...@bredband.net: Error reading configuration: > net_connect_unix(/var/run/dovecot/config) failed: Permission denied > Aug 25 17:31:28 imap-postlogin: Error: script-login: Fatal: Internal error > occurred. Refer to server log for more information. > Aug 25 17:31:28 log: Error: service(imap-postlogin): child 11082 returned > error 89 (Fatal failure) > > dovecot.conf > > protocols = imap pop3 > base_dir = /var/run/dovecot/ > > log_path = /var/log/dovecot.log > info_log_path = /var/log/dovecot-info.log > > ssl = no # v1.2+, for older versions use: ssl_disable = yes > disable_plaintext_auth = no > > mail_location = maildir:/home/fetchmail/mailroot/dummy > > pop3_uidl_format = %08Xu%08Xv > > > !include conf.d/*.conf > !include_try local.conf > > mail_uid=500 > mail_gid=500 > > auth_verbose = yes > auth_debug=yes > auth_debug_passwords=yes > mail_debug=yes > > # Optional tried with this!!! > service config { > unix_listener config { > group = dovecot > mode = 0660 > } > } > > service imap { > # tell imap to do post-login lookup using a socket called "imap-postlogin" > executable = imap imap-postlogin > # Optional tried with this!!! > > user=dovecot > } > > # The service name below doesn't actually matter. > service imap-postlogin { > # all post-login scripts are executed via script-login binary > executable = script-login /home/fetchmail/dovecot-postlogin.sh > > # the script process runs as the user specified here (v2.0.14+): > # Optional tried with this!!! > > # user=dovecot > # user = $default_internal_user > # this UNIX socket listener must use the same name as given to imap > executable > # Optional tried with this!!! > > #unix_listener imap-postlogin { > #} > } > > > users > > vuser:{PLAIN}pass:500:500::/home/fetchmail::userdb_mail=maildir:/home/fetchmail/mailroot/vuser-root > allow_nets=192.168.1.0/24 > > ls -l /home/fetchmail/dovecot-postlogin.sh > -rwxrwxrwx. 1 dovecot root108 Aug 25 17:08 dovecot-postlogin.sh > > Any suggestions are very welcome!! > > /Thanks > > >
[Dovecot] Virtual user and post-login 2.0.13
Hi I tried several variants of suggestions but I can't get it working dovecot-info.log: === Aug 25 17:37:48 imap-login: Info: Login: user=, method=PLAIN, rip=192.168.1.xx, lip=192.168.1.xx, mpid=11264 Aug 25 17:37:48 imap(vuser): Info: Post-login script denied access to user vuser dovecot.log Aug 25 17:31:28 imap-postlogin: Error: script-login: Error: user p...@bredband.net: Error reading configuration: net_connect_unix(/var/run/dovecot/config) failed: Permission denied Aug 25 17:31:28 imap-postlogin: Error: script-login: Fatal: Internal error occurred. Refer to server log for more information. Aug 25 17:31:28 log: Error: service(imap-postlogin): child 11082 returned error 89 (Fatal failure) dovecot.conf protocols = imap pop3 base_dir = /var/run/dovecot/ log_path = /var/log/dovecot.log info_log_path = /var/log/dovecot-info.log ssl = no # v1.2+, for older versions use: ssl_disable = yes disable_plaintext_auth = no mail_location = maildir:/home/fetchmail/mailroot/dummy pop3_uidl_format = %08Xu%08Xv !include conf.d/*.conf !include_try local.conf mail_uid=500 mail_gid=500 auth_verbose = yes auth_debug=yes auth_debug_passwords=yes mail_debug=yes # Optional tried with this!!! service config { unix_listener config { group = dovecot mode = 0660 } } service imap { # tell imap to do post-login lookup using a socket called "imap-postlogin" executable = imap imap-postlogin # Optional tried with this!!! user=dovecot } # The service name below doesn't actually matter. service imap-postlogin { # all post-login scripts are executed via script-login binary executable = script-login /home/fetchmail/dovecot-postlogin.sh # the script process runs as the user specified here (v2.0.14+): # Optional tried with this!!! # user=dovecot # user = $default_internal_user # this UNIX socket listener must use the same name as given to imap executable # Optional tried with this!!! #unix_listener imap-postlogin { #} } users vuser:{PLAIN}pass:500:500::/home/fetchmail::userdb_mail=maildir:/home/fetchmail/mailroot/vuser-root allow_nets=192.168.1.0/24 ls -l /home/fetchmail/dovecot-postlogin.sh -rwxrwxrwx. 1 dovecot root108 Aug 25 17:08 dovecot-postlogin.sh Any suggestions are very welcome!! /Thanks