[SOLVED] Fehler: Veränderte Regel beendet Benachrichtigung nicht

hellfire

Well-Known Member
Aug 17, 2016
65
33
58
46
Hallo,

ich habe zum Testen eine Regel erstellt, die eine Benachrichtigung enthielt. Eine Woche später habe ich die Admin-Benachrichtigung dann entfernt. Nur noch das verschieben in die Quarantäne findet statt. Die Adminbenachrichtigung bekomme ich aber immer noch.

Hier ist die Regel in der DB, nachdem ich die Adminbenachrichtigung entfernt habe:

Code:
select * from rule;
id |              name               | priority | active | direction | count
----+---------------------------------+----------+--------+-----------+-------
...
14 | Quarantine/Mark Spam(Level 5)   |       75 |      1 |         0 |    70
...

Code:
Proxmox_ruledb=# select * from rulegroup;
objectgroup_id | rule_id | grouptype
----------------+---------+-----------
...
             11 |      14 |         3
             19 |      14 |         4
             14 |      14 |         4
...

Code:
select * from objectgroup;
id |                  name                   |                                       info                                        |  class  
----+-----------------------------------------+-----------------------------------------------------------------------------------+----------
...
11 | Spam (Level 5)                          | Matches possible spam mail                                                        | what
14 | Modify Spam Subject                     | Mark mail as spam by modifying the subject.                                       | action
19 | Quarantine                              | Move mail to quarantine                                                           | action
...

Man sieht also keine Benachrichtigung in der DB mehr. Diese Mail bekomme ich aber an die Adminadresse:
Code:
Subject: Notification: SOLDES : -60% pour la dernière démarque !
Rule: Quarantine/Mark Spam(Level 5)
...
  Receiver: info@blablub.de
  Action: modify field: subject:SPAM: =?UTF-8?B?U09MREVTIDogLTYwJSBwb3VyIGxhIGRlcm5pw6hyZSBkw6ltYXJxdWUgIQ==?=

  Action: Move to quarantine.
  Action: notify admin@mydomain.de

Es wird also eine Regeldefinition gezeigt, die so nicht mehr konfiguriert ist.

* Ist da irgendwo noch ein Cache, in dem die alten Regeln drin stehen?

Die Regel habe ich mittlerweile gelöscht und neu angelegt, um zu sehen, ob es dadurch besser wird.

Zum System:

* PMG 2 Node Cluster
* Softwarestand:
Code:
ii  pmg-api                         6.2-5                        all          Proxmox Mailgateway API Server Implementation
ii  pmg-docs                        6.2-2                        all          Proxmox Mail Gateway Documentation
ii  pmg-gui                         2.2-2                        all          Proxmox Mail Gateway GUI
ii  pmg-i18n                        2.1-3                        all          Internationalization support for Proxmox Mail Gateway
ii  pmg-log-tracker                 2.1.6-1                      amd64        Proxmox Mailgateway Log Tracker
 
Last edited:
Hier ist die Regel in der DB, nachdem ich die Adminbenachrichtigung entfernt habe:
es ist immer einfacher ein Gesamtbild zu haben (z.b. das output von `pmgdb dump`)

Ansonsten wird im maillog auch mitgelogged welche Rule für eine Action verantwortlich ist - vl. kommt die Notification ja von einer anderen Rule?
(einfach im mail.log nach der mail suchen)

Die Regeln sollten nach Bearbeitung in der GUI an und für sich auch direkt vom pmg-smtp-filter übernommen werden.
 
Danke Stoiko für die Antwort!

Hier ist mal der pmgdb dump:

Code:
Found RULE 4 (prio: 98, in, active): Blacklist
  FOUND FROM GROUP 2: Blacklist
    OBJECT 1: nomail@fromthisdomain.com
  FOUND ACTION GROUP 18: Block
    OBJECT 31: block message
Found RULE 2 (prio: 96, in, active): Block Viruses
  FOUND WHAT GROUP 9: Virus
    OBJECT 22: active
  FOUND ACTION GROUP 18: Block
    OBJECT 31: block message
  FOUND ACTION GROUP 20: Notify Admin
    OBJECT 33: notify __ADMIN__
Found RULE 3 (prio: 96, out, active): Virus Alert
  FOUND WHAT GROUP 9: Virus
    OBJECT 22: active
  FOUND ACTION GROUP 18: Block
    OBJECT 31: block message
  FOUND ACTION GROUP 20: Notify Admin
    OBJECT 33: notify __ADMIN__
  FOUND ACTION GROUP 21: Notify Sender
    OBJECT 34: notify __SENDER__
Found RULE 1 (prio: 93, in, active): Block Dangerous Files
  FOUND WHAT GROUP 8: Dangerous Content
    OBJECT 16: content-type=application/javascript
    OBJECT 17: content-type=application/x-executable
    OBJECT 15: content-type=application/x-java
    OBJECT 14: content-type=application/x-ms-dos-executable
    OBJECT 18: content-type=application/x-ms-dos-executable
    OBJECT 19: content-type=message/partial
    OBJECT 20: filename=.*\.(vbs|pif|lnk|shs|shb)
    OBJECT 21: filename=.*\.\{.+\}
  FOUND ACTION GROUP 15: Remove attachments
    OBJECT 28: remove matching attachments
  FOUND ACTION GROUP 20: Notify Admin
    OBJECT 33: notify __ADMIN__
  FOUND ACTION GROUP 21: Notify Sender
    OBJECT 34: notify __SENDER__
Found RULE 5 (prio: 90, in, active): Modify Header
  FOUND ACTION GROUP 13: Modify Spam Level
    OBJECT 26: modify field: X-SPAM-LEVEL:__SPAM_INFO__
Found RULE 13 (prio: 89, in, inactive): Quarantine Office Files
  FOUND WHAT GROUP 7: Office Files
    OBJECT 9: content-type=application/msword
    OBJECT 7: content-type=application/vnd\.ms-excel
    OBJECT 8: content-type=application/vnd\.ms-powerpoint
    OBJECT 11: content-type=application/vnd\.oasis\.opendocument\..*
    OBJECT 10: content-type=application/vnd\.openxmlformats-officedocument\..*
    OBJECT 12: content-type=application/vnd\.stardivision\..*
    OBJECT 13: content-type=application/vnd\.sun\.xml\..*
  FOUND ACTION GROUP 23: Attachment Quarantine (remove matching)
    OBJECT 36: remove matching attachments
Found RULE 12 (prio: 87, in+out, inactive): Block Multimedia Files
  FOUND WHAT GROUP 6: Multimedia
    OBJECT 5: content-type=audio/.*
    OBJECT 6: content-type=video/.*
  FOUND ACTION GROUP 15: Remove attachments
    OBJECT 28: remove matching attachments
Found RULE 6 (prio: 85, in, active): Whitelist
  FOUND FROM GROUP 3: Whitelist
    OBJECT 2: mail@fromthisdomain.com
  FOUND ACTION GROUP 17: Accept
    OBJECT 30: accept message
Found RULE 9 (prio: 82, in, inactive): Block Spam (Level 10)
  FOUND WHAT GROUP 12: Spam (Level 10)
    OBJECT 25: Level 10
  FOUND ACTION GROUP 18: Block
    OBJECT 31: block message
Found RULE 7 (prio: 80, in, active): Quarantine/Mark Spam (Level 10)
  FOUND WHAT GROUP 12: Spam (Level 10)
    OBJECT 25: Level 10
  FOUND ACTION GROUP 14: Modify Spam Subject
    OBJECT 27: modify field: subject:SPAM: __SUBJECT__
  FOUND ACTION GROUP 19: Quarantine
    OBJECT 32: Move to quarantine.
Found RULE 15 (prio: 75, in, active): Quarantine and Mark Spam (Level 5)
  FOUND WHAT GROUP 11: Spam (Level 5)
    OBJECT 24: Level 5
  FOUND ACTION GROUP 14: Modify Spam Subject
    OBJECT 27: modify field: subject:SPAM: __SUBJECT__
  FOUND ACTION GROUP 19: Quarantine
    OBJECT 32: Move to quarantine.
Found RULE 10 (prio: 70, out, active): Quarantine outgoing Spam
  FOUND WHAT GROUP 11: Spam (Level 5)
    OBJECT 24: Level 5
  FOUND ACTION GROUP 18: Block
    OBJECT 31: block message
  FOUND ACTION GROUP 19: Quarantine
    OBJECT 32: Move to quarantine.
  FOUND ACTION GROUP 20: Notify Admin
    OBJECT 33: notify __ADMIN__
  FOUND ACTION GROUP 21: Notify Sender
    OBJECT 34: notify __SENDER__
Found RULE 11 (prio: 60, out, inactive): Add Disclaimer
  FOUND ACTION GROUP 22: Disclaimer
    OBJECT 35: disclaimer

Das Mail.log prüfe ich beim nächsten auftreten nochmal: Das sind die bisherigen Notifications:

Code:
Jul  1 02:06:16 pmg01 pmg-smtp-filter[16673]: C12525EFBD373BBA73: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 98169C1255)
Jul  1 07:49:39 pmg01 pmg-smtp-filter[17680]: C11DF5EFC23F039072: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 866A2C122A)
Jul  1 18:53:14 pmg01 pmg-smtp-filter[11604]: C124B5EFCBF724B428: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 00BC7C1205)
Jul  2 03:09:42 pmg01 pmg-smtp-filter[11603]: C12605EFD33D3D1869: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 46D7DC1277)
Jul  2 08:18:51 pmg01 pmg-smtp-filter[26082]: C12645EFD7C470E86B: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 68B64C1277)
Jul  2 15:06:48 pmg01 pmg-smtp-filter[26083]: C12435EFDDBE3E7941: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 29349C1251)
Jul  2 22:27:30 pmg01 pmg-smtp-filter[26082]: C130E5EFE432FDE42E: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam (Level 10), B0D82C131B)
Jul  3 06:43:24 pmg01 pmg-smtp-filter[16103]: C13325EFEB76889E1F: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 09722C1338)
Jul  3 08:15:37 pmg01 pmg-smtp-filter[16105]: C130E5EFECD059D647: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), B1EFBC132E)
Jul  5 09:14:56 pmg01 pmg-smtp-filter[16105]: C133E5F017DED8EE2A: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), B5915C1361)
Jul  5 16:55:56 pmg01 pmg-smtp-filter[16105]: C11F65F01E9F7BA715: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 559AFC1378)
Jul  5 17:07:01 pmg01 pmg-smtp-filter[16103]: C12275F01EC9176EB4: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), CA87DC1342)
Jul  6 19:09:25 pmg01 pmg-smtp-filter[16103]: C09CA5F035AC2708A9: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 03CE1C124F)
Jun 29 22:00:29 pmg01 pmg-smtp-filter[20664]: C089F5EFA485B313C7: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), 11C4FC08A1)
Jun 30 10:33:53 pmg01 pmg-smtp-filter[20664]: C0A015EFAF8EFC0AB0: notify <tu@mydomain.de> (rule: Quarantine/Mark Spam(Level 5), E86F9C0A03)

D. h. die vermutete Regel ist hier protokolliert.
 
Last edited:
Sieht soweit alles richtig aus - und es sollte keine notifications mehr bei der Regel: 'Quarantine/Mark Spam(Level 5)' geben.
Die logs sind allesamt älter als ein Monat - wann wurde denn umgestellt?

Falls es wider Erwarten nochmal auftreten sollte - bitte mal versuchen den pmg-smtp-filter neuzustarten (`systemctl restart pmg-smtp-filter`)
falls das nicht helfen sollte bitte nochmals die gesamten (wenn notwendig anonymisierten )Logs zu einer betroffenen Mail posten
 
  • Like
Reactions: hellfire
Ok. Ich habe jetzt gesehen, dass die Regeln im 2. Knoten immer noch die alten Werte haben.

Bei einem pmgcm sync auf dem Slave habe ich einen Fehler bekommen. (Host Key Verification failed). Also habe ich auf dem Slave die ~/.ssh/known_hosts gelöscht. Anschließend habe ich den Sync erfolgreich durchführen können.

Das Regelwerk war aber immer noch nicht identisch. Also habe ich auf dem Slave die Postgres-DB gelöscht und vom Master auf den Slave die Postgres-DB kopiert.

Ursache ist wohl, das sich die SSH-Konfig mittels eigener Orchestrierung(opscode chef) ändere und auch die SSH-Konfiguration(port 12345,...). (Dazu habe ich $HOME/.ssh/config anpassen müssen).

Damit sind die Regelwerke identisch und es tut jetzt hoffentlich.
 
Ahh - klar das mit dem fehlgeschlagenen clustersync wegen geänderter ssh-config erklärt die Sache natürlich - danke für das Teilen der Lösung!

Bitte den thread als 'SOLVED' markieren.
Danke!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!