예제 #1
0
파일: vdelmaildir.py 프로젝트: damoxc/vmail
    def run(self):
        if not self.args:
            self.log.error('no argument provided')
            return 1

        if '@' not in self.args[0]:
            self.log.error('invalid argument')
            return 1

        (user, domain) = args[0].split('@')
        path = get_mail_dir(domain, user)
        shutil.rmtree(path)
예제 #2
0
파일: vmailman.py 프로젝트: damoxc/vmail
    def run(self):
        # renice ourselves
        os.nice(5)

        # attempt to parse the arguments
        try:
            (domain, local) = self.args[0:2]
        except:
            self.log.error('invalid arguments supplied')
            return 1
        
        # get the domain from the database
        try:
            domain = db.query(Domain).filter_by(domain=domain).one()
        except:
            self.log.error('unable to find domain')
            return 1

        # change to the mailing lists home
        maildir = get_mail_dir(domain.domain)
        os.chdir(os.path.join(maildir, '.mailman'))
예제 #3
0
파일: vmailman.py 프로젝트: rymmx-gls/vmail
    def run(self):
        # renice ourselves
        os.nice(5)

        # attempt to parse the arguments
        try:
            (domain, local) = self.args[0:2]
        except:
            self.log.error('invalid arguments supplied')
            return 1

        # get the domain from the database
        try:
            domain = db.query(Domain).filter_by(domain=domain).one()
        except:
            self.log.error('unable to find domain')
            return 1

        # change to the mailing lists home
        maildir = get_mail_dir(domain.domain)
        os.chdir(os.path.join(maildir, '.mailman'))
예제 #4
0
 def maildir(self):
     (user, domain) = self.email.split('@')
     return get_mail_dir(domain, user)
예제 #5
0
 def maildir(self):
     (user, domain) = self.email.split('@')
     return get_mail_dir(domain, user)