Format des Spamassassin Backup: Unterschied zwischen den Versionen

Aus Knowledgebase
Zur Navigation springen Zur Suche springen
(Neu)
 
K (→‎T-Teile: Typo)
 
Zeile 44: Zeile 44:
  
 
----
 
----
=== T-Teile ===
+
=== T-Zeile ===
 
  Line    n_spam  n_ham  atime          token
 
  Line    n_spam  n_ham  atime          token
 
  t      0      2      1578062662      a51f87d29e
 
  t      0      2      1578062662      a51f87d29e
Zeile 67: Zeile 67:
  
 
----
 
----
 +
 
=== S-Zeile ===
 
=== S-Zeile ===
 
  Line    flag    msgid
 
  Line    flag    msgid

Aktuelle Version vom 25. Dezember 2020, 20:32 Uhr

Die Backupfunkion von Spamassassin schreibt ein tabellarisches Dateiformat im Klartext, dessen Feldbschreibungen nicht einfach auffindbar sind. Dieses Format soll hier dokumentiert werden.

Drei Arten von Zeilen

Zeile DB-Tabelle
s bayes_seen
t bayes_token
v bayes_global_vars

Die nachfolgenden Informationen variieren je nach Zeilenart.


V-Zeile

Format 1

Line    Val.    Key
v       3       db_version # this must be the first line!!!
MariaDB [spamassassin]> select * from bayes_global_vars limit 5;
+----------+-------+
| variable | value |
+----------+-------+
| VERSION  | 3     |
+----------+-------+

Format 2

Line    Val.    Key
v       679734  num_spam
v       606034  num_nonspam
MariaDB [spamassassin]> select * from bayes_vars limit 5;
+----+--------------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+
| id | username     | spam_count | ham_count | token_count | last_expire | last_atime_delta | last_expire_reduce | oldest_token_age | newest_token_age |
+----+--------------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+
|  1 | spamassassin |     679734 |    606034 |     5593680 |  1608721482 |         22118400 |              92193 |       1563616942 |       1608898408 |
+----+--------------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+

T-Zeile

Line    n_spam  n_ham   atime           token
t       0       2       1578062662      a51f87d29e
t       94      333     1606745986      000124aa15
MariaDB [spamassassin]> select id, hex(token), spam_count, ham_count, atime from bayes_token limit 5;
+----+------------+------------+-----------+------------+
| id | hex(token) | spam_count | ham_count | atime      |
+----+------------+------------+-----------+------------+
|  1 | A51F87D29E |          0 |         2 | 1578062662 |
|  1 | 000124AA15 |         94 |       333 | 1606745986 |
|  1 | 00014C46DB |        147 |       976 | 1608828621 |
|  1 | AEAB11EE46 |          0 |         3 | 1575190834 |
|  1 | 00031FFB07 |         38 |      2485 | 1608723281 |
+----+------------+------------+-----------+------------+

Bitwert bleibt gleich auf OS/400!!

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+..
           ID   HEX ( TOKEN )     SPAM_COUNT       HAM_COUNT           ATIME 
            1    000124AA15               94             333   1.606.745.986 

S-Zeile

Line    flag    msgid
s       h       af1eced4f05c75d52f3b0539e6da1304f7c2769c@sa_generated
s       s       eea1310bdc1e66c30af31619ac880d58195436af@sa_generated
MariaDB [spamassassin]> select * from bayes_seen limit 5;
+----+-------------------------------------------------------+------+
| id | msgid                                                 | flag |
+----+-------------------------------------------------------+------+
|  1 | af1eced4f05c75d52f3b0539e6da1304f7c2769c@sa_generated | h    |
|  1 | eea1310bdc1e66c30af31619ac880d58195436af@sa_generated | s    |
|  1 | 4e4f77c01592c063322a5f9197d83ac6f3be9a91@sa_generated | h    |
|  1 | fdd9c5a887bb906a683163fa36052ebdc0a5f483@sa_generated | h    |
|  1 | b53e253ab3c54d4bb29891bd4d7e5e2b18b3c9c7@sa_generated | h    |
+----+-------------------------------------------------------+------+