we copy the default squirrelmail prefs in new accounts. Fixes #1015
This commit is contained in:
parent
e05aece60e
commit
8467cf5473
|
@ -534,11 +534,18 @@ class m_mail {
|
|||
$db->query("INSERT INTO mail_alias (mail,alias) VALUES ('".$mail."_".$dom."','/var/alternc/mail/".$m."/".$mail."_".$dom."/Maildir/');");
|
||||
|
||||
$f=fopen("/var/lib/squirrelmail/data/".$mail."_".$dom.".pref","wb");
|
||||
$g=0; $g=@fopen("/etc/squirrelmail/default_pref","rb");
|
||||
fputs($f,"email_address=$mail@$dom\nchosen_theme=default_theme.php\n");
|
||||
if ($g) {
|
||||
while ($s=fgets($g,1024)) {
|
||||
if (substr($s,0,14)!="email_address=" && substr($s,0,13)!="chosen_theme=") {
|
||||
fputs($f,$s);
|
||||
}
|
||||
}
|
||||
fclose($g);
|
||||
}
|
||||
fclose($f);
|
||||
$f=fopen("/var/lib/squirrelmail/data/".$mail."@".$dom.".pref","wb");
|
||||
fputs($f,"email_address=$mail@$dom\nchosen_theme=default_theme.php\n");
|
||||
fclose($f);
|
||||
@copy("/var/lib/squirrelmail/data/".$mail."_".$dom.".pref","/var/lib/squirrelmail/data/".$mail."@".$dom.".pref");
|
||||
exec("/usr/lib/alternc/mail_add ".$mail."_".$dom." ".$cuid);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
alternc (0.9.6.4) stable; urgency=low
|
||||
|
||||
* We copy /etc/squirrelmail/default_pref content for new accounts in _createpop (#1015)
|
||||
* we configure postfix even if main.cf don't currently exist (#1009)
|
||||
* Fixed the 'view' link issues (no urlencode) (#690)
|
||||
* Change "move" to "move to" (ergonomic) (#787)
|
||||
|
|
Loading…
Reference in New Issue