diff --git a/src-ui/src/app/components/common/page-header/page-header.component.html b/src-ui/src/app/components/common/page-header/page-header.component.html index 7c84046d8..54386422a 100644 --- a/src-ui/src/app/components/common/page-header/page-header.component.html +++ b/src-ui/src/app/components/common/page-header/page-header.component.html @@ -1,6 +1,6 @@ -
+
-

{{title}}

+

{{title}}

diff --git a/src/paperless_mail/admin.py b/src/paperless_mail/admin.py index 130e34ad1..8d05c2a42 100644 --- a/src/paperless_mail/admin.py +++ b/src/paperless_mail/admin.py @@ -9,6 +9,8 @@ class MailAccountAdmin(admin.ModelAdmin): class MailRuleAdmin(admin.ModelAdmin): + list_filter = ("account",) + list_display = ("name", "account", "folder", "action") diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py index dd1e68b35..b942e420a 100644 --- a/src/paperless_mail/mail.py +++ b/src/paperless_mail/mail.py @@ -135,6 +135,7 @@ def get_mailbox(server, port, security): raise ValueError("Unknown IMAP security") return mailbox + class MailAccountHandler(LoggingMixin): def handle_mail_account(self, account): diff --git a/src/paperless_mail/migrations/0003_auto_20201118_1940.py b/src/paperless_mail/migrations/0003_auto_20201118_1940.py new file mode 100644 index 000000000..3339a6d7f --- /dev/null +++ b/src/paperless_mail/migrations/0003_auto_20201118_1940.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.3 on 2020-11-18 19:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('paperless_mail', '0002_auto_20201117_1334'), + ] + + operations = [ + migrations.AlterField( + model_name='mailaccount', + name='imap_port', + field=models.IntegerField(blank=True, help_text='This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.', null=True), + ), + migrations.AlterField( + model_name='mailrule', + name='name', + field=models.CharField(max_length=256, unique=True), + ), + ] diff --git a/src/paperless_mail/models.py b/src/paperless_mail/models.py index 95dbc1bc1..e37fbee16 100644 --- a/src/paperless_mail/models.py +++ b/src/paperless_mail/models.py @@ -19,7 +19,11 @@ class MailAccount(models.Model): imap_server = models.CharField(max_length=256) - imap_port = models.IntegerField(blank=True, null=True) + imap_port = models.IntegerField( + blank=True, + null=True, + help_text="This is usually 143 for unencrypted and STARTTLS " + "connections, and 993 for SSL connections.") imap_security = models.PositiveIntegerField( choices=IMAP_SECURITY_OPTIONS, @@ -68,7 +72,7 @@ class MailRule(models.Model): (CORRESPONDENT_FROM_CUSTOM, "Use correspondent selected below") ) - name = models.CharField(max_length=256) + name = models.CharField(max_length=256, unique=True) account = models.ForeignKey( MailAccount,