Is the script executable? I'm out of ideas.
Yes, you can set it up exactly the same for IMAP.
Rick
Quoting Mark Willcox <[email protected]>:
Much closer! It seems to run the script, but now I get:
Error: net_connect_unix(/var/run/dovecot/imap-postpop) failed:
Connection refused
I thought it might be because popuser has no logon capability
(/sbin/nologin), but I changed that and connection is still refused.
Can it be my script? It is just:
#!/bin/bash
echo "$USER $IP `host $IP`" > /var/lib/postpop/db/$IP
exec "$@"
The IP-named file is not being created. popuser owns the folder.
Also, when I get this working, can I set up a pop3 equivalent?
_________________
Mark Willcox
Data Helper, Inc.
On 8/24/2011 2:06 PM, Rick Romero wrote:
Quoting Mark Willcox <[email protected]>:
I am running Dovecot 2.0.13 on Fedora 15. I have migrated from a
bincimap installation using checklocalpwd. All email is in folders
owned by a unprivileged user, popuser. The email users are entirely
virtual and have no relationship to actual linux users.
I am trying to implement a Post-login script to register the IP address
that the authentication came from. Dovecot seems to be trying to
execute the script as the email non-user, which does not work. I have
specified that the script should be run as popuser, but it still runs as
[email protected] for instance. Everything up top that point seems to
be happening happily under popuser.
I'd remove the unix_listener directive:
service imap-postpop {
executable = script-login /usr/local/bin/set_postpop
user = popuser
}
The equivalent is working for me.
Rick