Important update of the plugin engine.

New plugin that allows the handling of an Amavisd-new SQL quarantine.

NB: a DB connections manager has been added inside the lib because
Django does not support multiple connections at the same time. The
main consequence is that we don't use an ORM and that we have to
rewrite a small wrapper that supports several DB (mysql, postgresql, etc.).
Adding a dependancy to an existing ORM module (like SQLalchemy) is
heavy, we don't want that for now.
This commit is contained in:
Antoine Nguyen
2009-06-26 17:13:35 +02:00
parent fc74d34c1d
commit fcab20b608
17 changed files with 227 additions and 19 deletions
+2 -1
View File
@@ -16,7 +16,8 @@ class MailboxForm(forms.ModelForm):
quota = forms.IntegerField(label=_("Quota"), required=False)
password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
password2 = forms.CharField(label=_("Confirmation"), widget=forms.PasswordInput)
enabled = forms.BooleanField(label=gender("Enabled", "f"), required=False)
enabled = forms.BooleanField(label=gender("Enabled", "f"), required=False,
initial=True)
class Meta:
model = Mailbox
+1 -1
View File
@@ -18,7 +18,7 @@ class Domain(models.Model):
def create_dir(self):
path = "%s/%s" % (settings.STORAGE_PATH, self.name)
return exec_as_vuser("mkdir %s" % path)
return exec_as_vuser("mkdir -p %s" % path)
def rename_dir(self, newname):
code, output = exec_pipe("sudo -u %s mv %s/%s %s/%s" \