[Dovecot] Virtual user and post-login 2.0.13
Mark Willcox
willcox at datahelper.com
Fri Aug 26 21:41:18 EEST 2011
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=<vuser>, 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 pmp at 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 root 108 Aug 25 17:08 dovecot-postlogin.sh
>
> Any suggestions are very welcome!!
>
> /Thanks
>
>
>
More information about the dovecot
mailing list