diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index 383af00b..8f505866 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -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; } diff --git a/debian/changelog b/debian/changelog index 646d1532..d6784d9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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)