ROOTBASE="/"
#defining local default domain
DFLTDOMAIN="localdomain"
-#defineing the local REALM
+#defining the local REALM
+#Caution! the realm is hardcoded within data-base
+#and USED too to hash the user passwd
+#Changing this value coule be a trouble make
+#(entering again ALL user password)
REALM="mailleur-email"
#------------------------------------------------
#list of listening port to do SMTP protocole
#defining local default domain
DFLTDOMAIN="example.com"
#defineing the local REALM
+#Caution! the realm is hardcoded within data-base
+#and USED too to hash the user passwd
+#Changing this value coule be a trouble make
+#(entering again ALL user password)
REALM="mailleur-email"
#------------------------------------------------
#list of listening port to do SMTP protocole
{4,"mxspace"},
{5,"locked"},
{6,"hash"},
- {7,"realm"},
{0,(char *)0}
};
case 6 : //'email:realm:password' MD5
usr->hash=strdup(locval);
break;
- case 7 : //'realm
- usr->realm=strdup(locval);
- break;
default :
(void) rou_alert(0,"%s field <%d:%s> not implemented (Bug?)",
OPEP,usrfield[i].num,usrfield[i].name);
if (sql_mngusr(contact->sqlptr,sql_select,resp->username,&usr)==true) {
if (usr->hash!=(char *)0)
(void) strncpy(hash,usr->hash,sizeof(hash)-1);
- if (usr->realm!=(char *)0)
- (void) strncpy(usrrealm,usr->realm,sizeof(usrrealm)-1);
usr=sql_freeusr(usr);
}
if (strlen(hash)==0) {
(void) rou_alert(0,"%s delay expired to get remote empty line (network?)",
OPEP);
line=rou_freestr(line); //EMPTY Line!
- if (strcmp(realm,usrrealm)!=0) {
- (void) strncpy(realm,usrrealm,sizeof(realm)-1);
- phase=0;
- }
}
break;
case 9 : { //comparing result.
{
if (usr!=(USRTYP *)0) {
- usr->realm=rou_freestr(usr->realm);
usr->hash=rou_freestr(usr->hash);
usr->passwd=rou_freestr(usr->passwd);
usr->email=rou_freestr(usr->email);
typedef struct {
char *email; //user emails
char *passwd; //user password
- char *realm; //user realm
u_int lock; //account is lock
u_long space; //user space used
u_long mxspace; //user maximun space
email TEXTUNIQUE, //User email
password TEXT //User password
DFLT '!',
- realm TEXT //user realm
- DFLT 'mailleur-email',
hash TEXT, //'email:realm:password' MD5
space INTEGER //space used by user email
DFLT 0,
GRANT SELECT ON emails TO maildove;
//defining the password trigger according database type
+#define REALM 'mailleur-email'
+
#ifdef POSTGRESQL
CREATE FUNCTION updpass()
RETURNS trigger AS $$
BEGIN
- NEW.hash = md5(concat (NEW.email,':',NEW.realm,':',new.password));
+ NEW.hash = md5(concat (NEW.email,':',REALM,':',new.password));
NEW.password = crypt(new.password, gen_salt('md5'));
RETURN NEW;
END