I am trying to implement a last login script, however I seem to be having lots of issues. We started with sqlite but we were having locking issues, so we moved to postgresql which seems to have alleviated database specific issues, but now people are complaining about randomly not being able to log in. I don't see any real errors in the logs (dovecot or postgresql) to explain their complaints though, all I am really getting is "Connection closed" here is the log line of a failed attempt (with debug output): http://pastebin.com/5RFgVa8V and here is what we are running as the 'mail executable': http://pastebin.com/L0ibyqSQ Any help would be greatly appreciated, thanks. Munroe Sollog Digirati Consulting sollog at digiraticonsulting.com (610) 332-7234 x805