Пример #1
0
 function dbactionDelete()
 {
     $var = explode('@', $this->main->getParentName());
     $mailpath = mmail__qmail::getDir($var[1]);
     $user = mmail__qmail::getUserGroup($var[1]);
     lxuser_return($user, "/usr/bin/ezmlm-unsub", "{$mailpath}/{$var[0]}/", $this->main->address);
 }
Пример #2
0
 function syncSpamUserPref()
 {
     global $gbl, $sgbl, $ghtml;
     // The parent can be either a domain or a user. CHeck for the @ sign.
     if (csa($this->main->nname, "@")) {
         list($user, $domain) = explode("@", $this->main->nname);
     } else {
         $domain = $this->main->nname;
         $user = null;
     }
     $sysuser = mmail__qmail::getUserGroup($domain);
     // --- issue #578/#721 - missing in version 6.1.6
     //	$mailpath = "/home/lxadmin/mail";
     $mailpath = mmail__qmail::getDir($domain);
     if ($user) {
         //	$prefpath = "$mailpath/domains/{$domain}/{$user}/.bogopref.cf";
         $prefpath = "{$mailpath}/{$user}/.bogopref.cf";
     } else {
         return;
     }
     $prefdir = dirname($prefpath);
     if (!lxfile_exists(dirname($prefpath))) {
         lxuser_mkdir($sysuser, dirname($prefpath));
     }
     $wname = fix_nname_to_be_variable($this->main->nname);
     $fdata = null;
     $cutoff = $this->main->spam_hit / 10 + 0.2;
     $fdata .= "spam_cutoff  {$cutoff}\n";
     $fdata .= "spam_subject_tag={$this->main->subject_tag}\n";
     $fdata .= "wordlist R,user,{$wname}.wordlist.db,1\n";
     $fdata .= "wordlist R,system,wordlist.db,2\n";
     $fdata .= "wordlist R,system,kloxo.wordlist.db,3\n";
     lxuser_put_contents($sysuser, $prefpath, $fdata);
     if (!lxfile_real("/var/bogofilter/{$wname}.wordlist.db")) {
         new_process_cmd($sysuser, null, "bogofilter -d /var/bogofilter/ --wordlist=R,user,{$wname}.wordlist.db,1  -n < /etc/my.cnf");
     }
     lxfile_touch("/var/bogofilter/wordlist.db");
     // Using generic because spamassasin is used on windows too. Or at least can be used.
     //lxfile_generic_chown("/var/bogofilter", mmail__qmail::getUserGroup($domain));
 }
Пример #3
0
 function getFfileFromVirtualList($name)
 {
     list($mailacc, $domain) = explode("@", $this->nname);
     $mailpath = mmail__qmail::getDir($domain);
     $name = coreFfile::getRealpath($name);
     $name = '/' . $name;
     $ffile = new Ffile($this->__masterserver, $this->__readserver, "{$mailpath}/{$mailacc}", $name, mmail__qmail::getUserGroup($domain));
     $ffile->__parent_o = $this;
     $ffile->get();
     return $ffile;
 }