We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] unable to change mail rule order in new frontend
### Description

i was setting up mail rules and wasn't able to get them to work properly until i realized that in the django admin i was able to set a order for those rules. in the new frontend the order was already displayed how i actually wanted them to be but in the django admin i was able to see they were in the wrong order

### Steps to reproduce

1. go to django admin
2. change mail order rule
3. go to new mail rule frontend
4. mail rule order doesn't match the django admin order
5. (also there is no way to change the order in the new frontend)

### Webserver logs

```bash
n/a
```


### Browser logs

_No response_

### Paperless-ngx version

1.11.4

### Host OS

Debian 11

### Installation method

Bare metal

### Browser

Firefox 108

### Configuration changes

_No response_

### Other

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/paperless_mail/views.py`
Content:
```
1 from paperless.views import StandardPagination
2 from paperless_mail.models import MailAccount
3 from paperless_mail.models import MailRule
4 from paperless_mail.serialisers import MailAccountSerializer
5 from paperless_mail.serialisers import MailRuleSerializer
6 from rest_framework.permissions import IsAuthenticated
7 from rest_framework.viewsets import ModelViewSet
8 
9 
10 class MailAccountViewSet(ModelViewSet):
11     model = MailAccount
12 
13     queryset = MailAccount.objects.all().order_by("pk")
14     serializer_class = MailAccountSerializer
15     pagination_class = StandardPagination
16     permission_classes = (IsAuthenticated,)
17 
18     # TODO: user-scoped
19     # def get_queryset(self):
20     #     user = self.request.user
21     #     return MailAccount.objects.filter(user=user)
22 
23     # def perform_create(self, serializer):
24     #     serializer.save(user=self.request.user)
25 
26 
27 class MailRuleViewSet(ModelViewSet):
28     model = MailRule
29 
30     queryset = MailRule.objects.all().order_by("pk")
31     serializer_class = MailRuleSerializer
32     pagination_class = StandardPagination
33     permission_classes = (IsAuthenticated,)
34 
35     # TODO: user-scoped
36     # def get_queryset(self):
37     #     user = self.request.user
38     #     return MailRule.objects.filter(user=user)
39 
40     # def perform_create(self, serializer):
41     #     serializer.save(user=self.request.user)
42
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/paperless_mail/views.py b/src/paperless_mail/views.py
--- a/src/paperless_mail/views.py
+++ b/src/paperless_mail/views.py
@@ -27,7 +27,7 @@
 class MailRuleViewSet(ModelViewSet):
     model = MailRule
 
-    queryset = MailRule.objects.all().order_by("pk")
+    queryset = MailRule.objects.all().order_by("order")
     serializer_class = MailRuleSerializer
     pagination_class = StandardPagination
     permission_classes = (IsAuthenticated,)

{"golden_diff": "diff --git a/src/paperless_mail/views.py b/src/paperless_mail/views.py\n--- a/src/paperless_mail/views.py\n+++ b/src/paperless_mail/views.py\n@@ -27,7 +27,7 @@\n class MailRuleViewSet(ModelViewSet):\n     model = MailRule\n \n-    queryset = MailRule.objects.all().order_by(\"pk\")\n+    queryset = MailRule.objects.all().order_by(\"order\")\n     serializer_class = MailRuleSerializer\n     pagination_class = StandardPagination\n     permission_classes = (IsAuthenticated,)\n", "issue": "[BUG] unable to change mail rule order in new frontend\n### Description\n\ni was setting up mail rules and wasn't able to get them to work properly until i realized that in the django admin i was able to set a order for those rules. in the new frontend the order was already displayed how i actually wanted them to be but in the django admin i was able to see they were in the wrong order\n\n### Steps to reproduce\n\n1. go to django admin\r\n2. change mail order rule\r\n3. go to new mail rule frontend\r\n4. mail rule order doesn't match the django admin order\r\n5. (also there is no way to change the order in the new frontend)\n\n### Webserver logs\n\n```bash\nn/a\n```\n\n\n### Browser logs\n\n_No response_\n\n### Paperless-ngx version\n\n1.11.4\n\n### Host OS\n\nDebian 11\n\n### Installation method\n\nBare metal\n\n### Browser\n\nFirefox 108\n\n### Configuration changes\n\n_No response_\n\n### Other\n\n_No response_\n", "before_files": [{"content": "from paperless.views import StandardPagination\nfrom paperless_mail.models import MailAccount\nfrom paperless_mail.models import MailRule\nfrom paperless_mail.serialisers import MailAccountSerializer\nfrom paperless_mail.serialisers import MailRuleSerializer\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.viewsets import ModelViewSet\n\n\nclass MailAccountViewSet(ModelViewSet):\n    model = MailAccount\n\n    queryset = MailAccount.objects.all().order_by(\"pk\")\n    serializer_class = MailAccountSerializer\n    pagination_class = StandardPagination\n    permission_classes = (IsAuthenticated,)\n\n    # TODO: user-scoped\n    # def get_queryset(self):\n    #     user = self.request.user\n    #     return MailAccount.objects.filter(user=user)\n\n    # def perform_create(self, serializer):\n    #     serializer.save(user=self.request.user)\n\n\nclass MailRuleViewSet(ModelViewSet):\n    model = MailRule\n\n    queryset = MailRule.objects.all().order_by(\"pk\")\n    serializer_class = MailRuleSerializer\n    pagination_class = StandardPagination\n    permission_classes = (IsAuthenticated,)\n\n    # TODO: user-scoped\n    # def get_queryset(self):\n    #     user = self.request.user\n    #     return MailRule.objects.filter(user=user)\n\n    # def perform_create(self, serializer):\n    #     serializer.save(user=self.request.user)\n", "path": "src/paperless_mail/views.py"}], "after_files": [{"content": "from paperless.views import StandardPagination\nfrom paperless_mail.models import MailAccount\nfrom paperless_mail.models import MailRule\nfrom paperless_mail.serialisers import MailAccountSerializer\nfrom paperless_mail.serialisers import MailRuleSerializer\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.viewsets import ModelViewSet\n\n\nclass MailAccountViewSet(ModelViewSet):\n    model = MailAccount\n\n    queryset = MailAccount.objects.all().order_by(\"pk\")\n    serializer_class = MailAccountSerializer\n    pagination_class = StandardPagination\n    permission_classes = (IsAuthenticated,)\n\n    # TODO: user-scoped\n    # def get_queryset(self):\n    #     user = self.request.user\n    #     return MailAccount.objects.filter(user=user)\n\n    # def perform_create(self, serializer):\n    #     serializer.save(user=self.request.user)\n\n\nclass MailRuleViewSet(ModelViewSet):\n    model = MailRule\n\n    queryset = MailRule.objects.all().order_by(\"order\")\n    serializer_class = MailRuleSerializer\n    pagination_class = StandardPagination\n    permission_classes = (IsAuthenticated,)\n\n    # TODO: user-scoped\n    # def get_queryset(self):\n    #     user = self.request.user\n    #     return MailRule.objects.filter(user=user)\n\n    # def perform_create(self, serializer):\n    #     serializer.save(user=self.request.user)\n", "path": "src/paperless_mail/views.py"}]}