
12th April 2007, 11:22
|
|
Junior Member
|
|
Join Date: Nov 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by rojozak
Also, are you absolutely certain you replaced spaces with tabs when copying/pasting the script from this website?
|
Yes, thath's all right
Quote:
|
Originally Posted by rojozak
Once you confirm that you have users in the userdb file, the script should have created the userdb.db file.
|
I had an error in the script: now I write /etc/courier/userdb at the end of the line and it create finally the file (I have ubuntu 6.06 like you so the file is in the same place) but I've not the file userdb.db...
Quote:
|
Originally Posted by rojozak
Then you can confirm that the userdb file is formated correctly by using:
Code:
courierauthtest user@domain.tld
|
Now the new problem: the test return "Authentication Failed!"
Why?
Thx for all!
|

12th April 2007, 14:29
|
|
Junior Member
|
|
Join Date: Oct 2006
Posts: 14
Thanks: 0
Thanked 2 Times in 1 Post
|
|
Look in /etc/courier/ for userdb.db, It should be in there.
Either way, check the final part of your script. It must have the make command to make the userdb.db file from userdb.
Code:
/usr/lib/courier/makeuserdb
Also, if you can't get that part working in your script, you can run makeuserdb from the commandline, to be sure you can create that userdb.db
|

12th April 2007, 14:58
|
|
Junior Member
|
|
Join Date: Nov 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have only userdb userdb.dat userdb.lock
Into the makeuserdb there is no line for creating userdb.db but only this 3 files.
Why?
|

2nd June 2007, 18:29
|
|
Senior Member
|
|
Join Date: May 2007
Location: Johannesburg, South Africa
Posts: 136
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
Hi All,
I have ubuntu 7.04 perfect install + ISPConfig 2.2.13.
I would like to apply this patch. Will it work?
Is there anybody that can take me through it step by step?? I am very new to linux. I see there is code in the post but i don't know what to do with this code....
Please help!!!!!
|

4th June 2007, 23:41
|
|
Member
|
|
Join Date: Jun 2007
Posts: 68
Thanks: 17
Thanked 3 Times in 3 Posts
|
|
Quote:
|
Originally Posted by cotthemh
you can do this very easily with dovecot :
change ispconfig so that it prefixes with [DOMAIN]_
then change the line in the /etc/dovecot.conf file
auth_username_format="%Ld_%Ln"
next of course make sure all you're userid's are lowercase (otherwise just juse ="%Ld_%n") but the first solution avoids any typos in the login.
the nice thing is that squirrelmail works like a breeze,
have fun
|
In the case of multiples domain as to configure the DOMAIN in the ISPConfig?
__________________
Sergio Souza
SoHo - Small Office Service Office
If anything can go wrong, will, and will give wrong in the worst way, in the worst moment and in order to cause the most damage possible. (Murphy's Law)
|

5th June 2007, 10:09
|
|
Senior Member
|
|
Join Date: May 2007
Location: Johannesburg, South Africa
Posts: 136
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
Running this script now, It doesn't put any data to /etc/courier/userdb. No details in this file, means i have to access mail via domain_user.
Please help again
Here are my files
/usr/sbin/usernames
#!/bin/bash
delim="_"
OIFS=$IFS
IFS="
"
rm -rf /etc/courier/userdb
touch /etc/courier/userdb
chmod 600 /etc/courier/userdb
for line in `/usr/sbin/pw2userdb | grep -ir user`
do
full=$( echo $line )
domain=$( echo $line | cut -d"$delim" -f1 )
remain=$( echo $line | cut -d"$delim" -f2,3,4 )
username=$( echo $remain | cut -d' ' -f1 )
remain2=$( echo $remain | cut -d' ' -f2 )
uid=$( echo $remain2 | cut -d'|' -f1 )
gid=$( echo $remain2 | cut -d'|' -f2 )
home=$( echo $remain2 | cut -d'|' -f3 )
shell=$( echo $remain2 | cut -d'|' -f4 )
password=$( echo $remain2 | cut -d'|' -f5)
echo "$username@$domain $uid|$gid|$home|$shell|$password|/var/www/www.$domain/user/${domain}_$username/Maildir" >> /etc/courier/userdb
done
/usr/sbin/makeuserdb
IFS=$OIFS
/usr/sbin/pw2userdb
#! /usr/bin/perl
#
# Convert /etc/passwd and /etc/shadow to userdb format.
#
# $Id: pw2userdb.in,v 1.5 2000/07/19 11:55:15 mrsam Exp $
#
# Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
# distribution information.
use Getopt::Long;
#
# Some undocumented options here (for vchkpw2userdb)
#
die "Invalid options.\n" unless
GetOptions("passwd=s" => \$passwd, "shadow=s" => \$shadow,
"noshadow" => \$noshadow, "nouid" => \$nouid,
"domain=s" => \$domain, "vpopuid" => \$vpopuid );
($dummy, $dummy, $fixed_uid, $fixed_gid)=getpwnam("vpopmail")
if $vpopuid;
$passwd="/etc/passwd" unless $passwd =~ /./;
$shadow="/etc/shadow" unless $shadow =~ /./;
$domain="" unless $domain =~ /./;
$domain="\@$domain" if $domain =~ /./;
open(PASSWD, $passwd) || die "$!\n";
while (<PASSWD>)
{
chop if /\n$/;
next if /^#/;
($acct,$passwd,$uid,$gid,$name,$home,$shell)=split ( /:/ );
($uid,$gid)=($fixed_uid,$fixed_gid) if $vpopuid;
$PASSWORD{$acct}=$passwd if $passwd ne "x";
$UID{$acct}=$uid;
$GID{$acct}=$gid;
$HOME{$acct}=$home;
$SHELL{$acct}=$shell;
$name =~ s/\|/./g; # Just in case
$GECOS{$acct}=$name;
}
close (PASSWD);
if ( -f $shadow && ! $noshadow)
{
open (SHADOW, $shadow) || die "$!\n";
while (<SHADOW>)
{
next if /^#/;
($acct,$passwd,$dummy)=split(/:/);
$PASSWORD{$acct}=$passwd;
}
close (SHADOW);
}
while ( defined ($key=each %UID))
{
print "$key$domain\tuid=$UID{$key}|gid=$GID{$key}|ho me=$ HOME{$key}" .
( $SHELL{$key} =~ /./ ? "|shell=$SHELL{$key}":"") .
( $PASSWORD{$key} =~ /./ ? "|systempw=$PASSWORD{$key}":"") .
( $GECOS{$key} =~ /./ ? "|gecos=$GECOS{$key}":"") .
"\n";
print "$UID{$key}=\t$key\n" unless $nouid;
}
|

25th September 2007, 21:21
|
|
Member
|
|
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 7 Times in 7 Posts
|
|
Hello,
I have a "perfect setup" with Centos 4.5 and the latest stable ISPConfig.
I have upgraded my dovecot to 1.0x so as to be able to use
auth_username_format = %Ld_%Ln
I have also set the [DOMAIN]_ in ISPConfig settings. However when I try to login from Uebimiau, I get the following error:
Sep 25 22:15:48 nemesis dovecot: pop3-login: Disconnected: user=<_domain.gr_info>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
(assume that the username I enter in the webmail is info@domain.gr).
I suppose that the problem is the leading _, however I don't know how it appears there...
Any help?
P.S. If I comment out the auth_username_format line, everything works fine.
|

27th September 2007, 21:37
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,906
Thanks: 693
Thanked 4,196 Times in 3,212 Posts
|
|
If I remeber correctly, the uebimiau package tries to lookup the email address in the database and this fails when you modify the login format. This can not be switched of in the ISPConfig UbeiMiau package, the easiest solution might be to install another webmail program which is not modified to lookup usernames in the ISPConfig database.
|
|
The Following User Says Thank You to till For This Useful Post:
|
erebus (28th September 2007)
|

29th September 2007, 11:59
|
|
Junior Member
|
|
Join Date: Sep 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi!
I think i've managed to get the script for converting the users working. So my userdb file contains this row:
test@server.com uid=10015|gid=10005|home=/var/www/web5/user/server.com_test|shell=/bin/false|systempw=gdfGefd4YUcGFg|/var/www/www.server.com/user/server.com_test/Maildir
But courierauthtest test@server.com password brings:
Trying authdaemon...
Authentication FAILED!
Any ideas?
Thx,
acker
|

3rd October 2007, 17:42
|
|
Junior Member
|
|
Join Date: Jul 2007
Location: Germany, Darmstadt
Posts: 25
Thanks: 5
Thanked 1 Time in 1 Post
|
|
Hello,
I can't get the patch to work 
I think the problem is in the converter-script that creates the userdb for courier.
I little modified the script to get debug messages:
Code:
#!/bin/bash
delim="_"
OIFS=$IFS
IFS="
"
rm -rf /etc/courier/userdb
touch /etc/courier/userdb
chmod 600 /etc/courier/userdb
for line in `pw2userdb | grep -ir user`
do
clear
echo $line
domain=$( echo $line | cut -d"$delim" -f1 )
useruid=$( echo $line | cut -d"$delim" -f2 )
username=$( echo $useruid | cut -d' ' -f1 )
uid=$( echo $useruid | cut -d' ' -f2 )
gid=$( echo $line | cut -d"$delim" -f3 )
home=$( echo $line | cut -d"$delim" -f4 )
shell=$( echo $line | cut -d"$delim" -f6 )
password=$( echo $line | cut -d"$delim" -f7)
#echo "$username@$domain $uid|$gid|${home}_$username|$shell|$password| /var/www/www.$domain/user/${domain}_$username/Maildir" >> /etc/courier/userdb
echo "
useruid: $useruid|
domain: $domain
username: $username
login: $username@$domain
uid: $uid|
gid: $gid|
home: $home
homedir: ${home}_$username|
shell: $shell|
pass: $password|
maildir /var/www/www.$domain/user/${domain}_$username/Maildir"
#/usr/sbin/makeuserdb
done
IFS=$OIFS
And if I run the script with this single return of pw2userdb ...
XXX.org_mar uid=10018|gid=10002|home=/var/www/web2/user/XXX.org_mar|shell=/bin/false|systempw=^iaesnI7fcz/.|gecos=mar
... I got this output.
Code:
XXX.org_mar uid=10018|gid=10002|home=/var/www/web2/user/XXX.org_mar|shell=/bin/false|systempw=^iaesnI7fcz/.|gecos=mar
useruid: mar uid=10018|gid=10002|home=/var/www/web2/user/XX.org|
domain: XX.org
username: mar
login: mar@XX.org
uid: uid=10018|gid=10002|home=/var/www/web2/user/XX.org|
gid: mar|shell=/bin/false|systempw=^iaesnI7fcz/.|gecos=mar|
home:
homedir: _mar|
shell: |
pass: |
maildir /var/www/www.XX.org/user/XX.org_mar/Maildir
Anybody an idea whats going wrong?
Courier-Auth is opening the userdb, but can't find a valid login. I think the email-account was written down by wrong-syntax.
I'am using ISPConfig 2.2.17 with Debian 4.0
greetings! 
melchior
Last edited by Melchior; 3rd October 2007 at 17:45.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 12:17.
|
|
Recent comments
12 hours 24 min ago
12 hours 29 min ago
17 hours 27 min ago
1 day 8 min ago
1 day 57 min ago
1 day 2 hours ago
1 day 6 hours ago
1 day 13 hours ago
1 day 17 hours ago
1 day 18 hours ago