Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

etc_opendmarc_import.sql 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. -- OpenDMARC database schema
  2. --
  3. -- Copyright (c) 2012, The Trusted Domain Project.
  4. -- All rights reserved.
  5. USE opendmarc;
  6. -- A table for mapping domain names and their DMARC policies to IDs
  7. CREATE TABLE IF NOT EXISTS domains (
  8. id INT NOT NULL AUTO_INCREMENT,
  9. name VARCHAR(255) NOT NULL,
  10. firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  11. PRIMARY KEY(id),
  12. UNIQUE KEY(name)
  13. );
  14. -- A table for logging reporting requests
  15. CREATE TABLE IF NOT EXISTS requests (
  16. id INT NOT NULL AUTO_INCREMENT,
  17. domain INT NOT NULL,
  18. repuri VARCHAR(255) NOT NULL,
  19. adkim TINYINT NOT NULL,
  20. aspf TINYINT NOT NULL,
  21. policy TINYINT NOT NULL,
  22. spolicy TINYINT NOT NULL,
  23. pct TINYINT NOT NULL,
  24. locked TINYINT NOT NULL,
  25. firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  26. lastsent TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
  27. PRIMARY KEY(id),
  28. KEY(lastsent),
  29. UNIQUE KEY(domain)
  30. );
  31. -- A table for reporting hosts
  32. CREATE TABLE IF NOT EXISTS reporters (
  33. id INT NOT NULL AUTO_INCREMENT,
  34. name VARCHAR(255) NOT NULL,
  35. firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  36. PRIMARY KEY(id),
  37. UNIQUE KEY(name)
  38. );
  39. -- A table for IP addresses
  40. CREATE TABLE IF NOT EXISTS ipaddr (
  41. id INT NOT NULL AUTO_INCREMENT,
  42. addr VARCHAR(64) NOT NULL,
  43. firstseen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  44. PRIMARY KEY(id),
  45. UNIQUE KEY(addr)
  46. );
  47. -- A table for messages
  48. CREATE TABLE IF NOT EXISTS messages (
  49. id INT NOT NULL AUTO_INCREMENT,
  50. date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  51. jobid VARCHAR(128) NOT NULL,
  52. reporter INT UNSIGNED NOT NULL,
  53. policy TINYINT UNSIGNED NOT NULL,
  54. disp TINYINT UNSIGNED NOT NULL,
  55. ip INT UNSIGNED NOT NULL,
  56. env_domain INT UNSIGNED NOT NULL,
  57. from_domain INT UNSIGNED NOT NULL,
  58. policy_domain INT UNSIGNED NOT NULL,
  59. spf TINYINT UNSIGNED NOT NULL,
  60. align_dkim TINYINT UNSIGNED NOT NULL,
  61. align_spf TINYINT UNSIGNED NOT NULL,
  62. sigcount TINYINT UNSIGNED NOT NULL,
  63. PRIMARY KEY(id),
  64. KEY(date),
  65. UNIQUE KEY(reporter, date, jobid)
  66. );
  67. -- A table for signatures
  68. CREATE TABLE IF NOT EXISTS signatures (
  69. id INT NOT NULL AUTO_INCREMENT,
  70. message INT NOT NULL,
  71. domain INT NOT NULL,
  72. pass TINYINT NOT NULL,
  73. error TINYINT NOT NULL,
  74. PRIMARY KEY(id),
  75. KEY(message)
  76. );