Server IP : 85.214.239.14 / Your IP : 18.223.170.253 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/task/3/cwd/srv/modoboa/env/lib/python3.5/site-packages/modoboa_postfix_autoreply/ |
Upload File : |
# -*- coding: utf-8 -*- """Postfix autoreply models.""" from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible, smart_text from django.utils.translation import ugettext_lazy as _ from modoboa.admin.models import Mailbox @python_2_unicode_compatible class ARmessage(models.Model): """Auto reply messages.""" mbox = models.ForeignKey(Mailbox, on_delete=models.CASCADE) subject = models.CharField( _("subject"), max_length=255, help_text=_("The subject that will appear in sent emails") ) content = models.TextField( _("content"), help_text=_("The content that will appear in sent emails") ) enabled = models.BooleanField( _("enabled"), help_text=_("Activate/Deactivate your auto reply"), default=False ) fromdate = models.DateTimeField(default=timezone.now) untildate = models.DateTimeField(null=True, blank=True) class Meta: db_table = "postfix_autoreply_armessage" def __str__(self): return smart_text("AR<{}>: {}".format(self.mbox, self.enabled)) class ARhistoric(models.Model): """Auto reply historic.""" armessage = models.ForeignKey(ARmessage, on_delete=models.CASCADE) last_sent = models.DateTimeField(auto_now=True) sender = models.CharField(max_length=254) class Meta: unique_together = ("armessage", "sender") db_table = "postfix_autoreply_arhistoric"