Current time: 04-26-2024, 12:00 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Replace courier with dovecot
Author Message
sulio Offline


Posts: 1
Joined: Jul 2009
Reputation: 0
Post: #7
RE: [HowTo] Replace courier with dovecot
Hi,

new to ispcp, not very good in perl, experienced with dovecot setups though.

My notes:

1. The ispcp-dovecot-mngr script does no check if the user exists in the SQL db at all, and exits with temp error in such a case, while I feel it should exit as if the password is wrong.

To fix it, I added this block:

my $sql = "SELECT count(mail_pass) FROM mail_users WHERE mail_pass != '_no_' AND mail_addr='$username'";
my ($rs, $rows) = doSQL($sql);
if ($rs != 0){
syslog('err', 'Can`t execute sql "%s"! during attempt for %s from %s, protocol %s', $sql, $username, $ip, $server);
exit($tempErr);
}
my $line = @$rows[0];
if ( @$line[0] eq 0 ) {
syslog('err', 'User not found! during attempt for %s from %s, protocol %s', $username, $ip, $server);
exit($Err);
}

just before the block where the password is being checked.

2. There is no need of password_query line in the dovecot-sql-xxxx.conf files, as this is used as userdb, so not for any password checks (the query will return wrong password anyways).

Thank you sir, for your efforts to make dovecot an alternative in ispcp.
Really appreciate that!
(This post was last modified: 07-17-2009 05:04 PM by sulio.)
07-17-2009 05:02 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HowTo] Replace courier with dovecot - sulio - 07-17-2009 05:02 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)