1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085
|
<pre>Independent Submission M. Kucherawy, Ed.
Request for Comments: 7489
Category: Informational E. Zwicky, Ed.
ISSN: 2070-1721 Yahoo!
March 2015
Domain-based Message Authentication, Reporting, and Conformance (DMARC)
Abstract
Domain-based Message Authentication, Reporting, and Conformance
(DMARC) is a scalable mechanism by which a mail-originating
organization can express domain-level policies and preferences for
message validation, disposition, and reporting, that a mail-receiving
organization can use to improve mail handling.
Originators of Internet Mail need to be able to associate reliable
and authenticated domain identifiers with messages, communicate
policies about messages that use those identifiers, and report about
mail using those identifiers. These abilities have several benefits:
Receivers can provide feedback to Domain Owners about the use of
their domains; this feedback can provide valuable insight about the
management of internal operations and the presence of external domain
name abuse.
DMARC does not produce or encourage elevated delivery privilege of
authenticated email. DMARC is a mechanism for policy distribution
that enables increasingly strict handling of messages that fail
authentication checks, ranging from no action, through altered
delivery, up to message rejection.
Status of This Memo
This document is not an Internet Standards Track specification; it is
published for informational purposes.
This is a contribution to the RFC Series, independently of any other
RFC stream. The RFC Editor has chosen to publish this document at
its discretion and makes no statement about its value for
implementation or deployment. Documents approved for publication by
the RFC Editor are not a candidate for any level of Internet
Standard; see <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7489">http://www.rfc-editor.org/info/rfc7489</a>.
<span class="grey">Kucherawy & Zwicky Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
<a href="#section-2">2</a>. Requirements ....................................................<a href="#page-5">5</a>
<a href="#section-2.1">2.1</a>. High-Level Goals ...........................................<a href="#page-5">5</a>
<a href="#section-2.2">2.2</a>. Out of Scope ...............................................<a href="#page-6">6</a>
<a href="#section-2.3">2.3</a>. Scalability ................................................<a href="#page-6">6</a>
<a href="#section-2.4">2.4</a>. Anti-Phishing ..............................................<a href="#page-7">7</a>
<a href="#section-3">3</a>. Terminology and Definitions .....................................<a href="#page-7">7</a>
<a href="#section-3.1">3.1</a>. Identifier Alignment .......................................<a href="#page-8">8</a>
<a href="#section-3.2">3.2</a>. Organizational Domain .....................................<a href="#page-11">11</a>
<a href="#section-4">4</a>. Overview .......................................................<a href="#page-12">12</a>
<a href="#section-4.1">4.1</a>. Authentication Mechanisms .................................<a href="#page-12">12</a>
<a href="#section-4.2">4.2</a>. Key Concepts ..............................................<a href="#page-12">12</a>
<a href="#section-4.3">4.3</a>. Flow Diagram ..............................................<a href="#page-13">13</a>
<a href="#section-5">5</a>. Use of <a href="./rfc5322">RFC5322</a>.From ............................................<a href="#page-15">15</a>
<a href="#section-6">6</a>. Policy .........................................................<a href="#page-15">15</a>
<a href="#section-6.1">6.1</a>. DMARC Policy Record .......................................<a href="#page-16">16</a>
<a href="#section-6.2">6.2</a>. DMARC URIs ................................................<a href="#page-16">16</a>
<a href="#section-6.3">6.3</a>. General Record Format .....................................<a href="#page-17">17</a>
<a href="#section-6.4">6.4</a>. Formal Definition .........................................<a href="#page-21">21</a>
<a href="#section-6.5">6.5</a>. Domain Owner Actions ......................................<a href="#page-22">22</a>
<a href="#section-6.6">6.6</a>. Mail Receiver Actions .....................................<a href="#page-23">23</a>
<a href="#section-6.7">6.7</a>. Policy Enforcement Considerations .........................<a href="#page-27">27</a>
<a href="#section-7">7</a>. DMARC Feedback .................................................<a href="#page-28">28</a>
<a href="#section-7.1">7.1</a>. Verifying External Destinations ...........................<a href="#page-28">28</a>
<a href="#section-7.2">7.2</a>. Aggregate Reports .........................................<a href="#page-30">30</a>
<a href="#section-7.3">7.3</a>. Failure Reports ...........................................<a href="#page-36">36</a>
<a href="#section-8">8</a>. Minimum Implementations ........................................<a href="#page-37">37</a>
<a href="#section-9">9</a>. Privacy Considerations .........................................<a href="#page-38">38</a>
<a href="#section-9.1">9.1</a>. Data Exposure Considerations ..............................<a href="#page-38">38</a>
<a href="#section-9.2">9.2</a>. Report Recipients .........................................<a href="#page-39">39</a>
<span class="grey">Kucherawy & Zwicky Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<a href="#section-10">10</a>. Other Topics ..................................................<a href="#page-39">39</a>
<a href="#section-10.1">10.1</a>. Issues Specific to SPF ...................................<a href="#page-39">39</a>
<a href="#section-10.2">10.2</a>. DNS Load and Caching .....................................<a href="#page-40">40</a>
<a href="#section-10.3">10.3</a>. Rejecting Messages .......................................<a href="#page-40">40</a>
<a href="#section-10.4">10.4</a>. Identifier Alignment Considerations ......................<a href="#page-41">41</a>
<a href="#section-10.5">10.5</a>. Interoperability Issues ..................................<a href="#page-41">41</a>
<a href="#section-11">11</a>. IANA Considerations ...........................................<a href="#page-42">42</a>
<a href="#section-11.1">11.1</a>. Authentication-Results Method Registry Update ............<a href="#page-42">42</a>
<a href="#section-11.2">11.2</a>. Authentication-Results Result Registry Update ............<a href="#page-42">42</a>
<a href="#section-11.3">11.3</a>. Feedback Report Header Fields Registry Update ............<a href="#page-44">44</a>
<a href="#section-11.4">11.4</a>. DMARC Tag Registry .......................................<a href="#page-44">44</a>
<a href="#section-11.5">11.5</a>. DMARC Report Format Registry .............................<a href="#page-45">45</a>
<a href="#section-12">12</a>. Security Considerations .......................................<a href="#page-46">46</a>
<a href="#section-12.1">12.1</a>. Authentication Methods ...................................<a href="#page-46">46</a>
<a href="#section-12.2">12.2</a>. Attacks on Reporting URIs ................................<a href="#page-46">46</a>
<a href="#section-12.3">12.3</a>. DNS Security .............................................<a href="#page-47">47</a>
<a href="#section-12.4">12.4</a>. Display Name Attacks .....................................<a href="#page-47">47</a>
<a href="#section-12.5">12.5</a>. External Reporting Addresses .............................<a href="#page-48">48</a>
<a href="#section-12.6">12.6</a>. Secure Protocols .........................................<a href="#page-48">48</a>
<a href="#section-13">13</a>. References ....................................................<a href="#page-49">49</a>
<a href="#section-13.1">13.1</a>. Normative References .....................................<a href="#page-49">49</a>
<a href="#section-13.2">13.2</a>. Informative References ...................................<a href="#page-50">50</a>
<a href="#appendix-A">Appendix A</a>. Technology Considerations .............................<a href="#page-52">52</a>
<a href="#appendix-A.1">A.1</a>. S/MIME .....................................................<a href="#page-52">52</a>
<a href="#appendix-A.2">A.2</a>. Method Exclusion ...........................................<a href="#page-53">53</a>
<a href="#appendix-A.3">A.3</a>. Sender Header Field ........................................<a href="#page-53">53</a>
<a href="#appendix-A.4">A.4</a>. Domain Existence Test ......................................<a href="#page-54">54</a>
<a href="#appendix-A.5">A.5</a>. Issues with ADSP in Operation ..............................<a href="#page-54">54</a>
<a href="#appendix-A.6">A.6</a>. Organizational Domain Discovery Issues .....................<a href="#page-55">55</a>
<a href="#appendix-B">Appendix B</a>. Examples ..............................................<a href="#page-56">56</a>
<a href="#appendix-B.1">B.1</a>. Identifier Alignment Examples ..............................<a href="#page-56">56</a>
<a href="#appendix-B.2">B.2</a>. Domain Owner Example .......................................<a href="#page-58">58</a>
<a href="#appendix-B.3">B.3</a>. Mail Receiver Example .....................................<a href="#page-63">63</a>
<a href="#appendix-B.4">B.4</a>. Utilization of Aggregate Feedback: Example .................<a href="#page-64">64</a>
<a href="#appendix-B.5">B.5</a>. mailto Transport Example ...................................<a href="#page-65">65</a>
<a href="#appendix-C">Appendix C</a>. DMARC XML Schema ......................................<a href="#page-66">66</a>
Acknowledgements ..................................................<a href="#page-73">73</a>
Authors' Addresses ................................................<a href="#page-73">73</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Sender Policy Framework ([<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>]) and DomainKeys Identified Mail
([<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>]) provide domain-level authentication. They enable
cooperating email receivers to detect mail authorized to use the
domain name, which can permit differential handling. (A detailed
discussion of the threats these systems attempt to address can be
found in [<a href="#ref-DKIM-THREATS">DKIM-THREATS</a>].) However, there has been no single widely
accepted or publicly available mechanism to communication of
<span class="grey">Kucherawy & Zwicky Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
domain-specific message-handling policies for receivers, or to
request reporting of authentication and disposition of received mail.
Absent the ability to obtain feedback reports, originators who have
implemented email authentication have difficulty determining how
effective their authentication is. As a consequence, use of
authentication failures to filter mail typically does not succeed.
Over time, one-on-one relationships were established between select
senders and receivers with privately communicated means to assert
policy and receive message traffic and authentication disposition
reporting. Although these ad hoc practices have been generally
successful, they require significant manual coordination between
parties, and this model does not scale for general use on the
Internet.
This document defines Domain-based Message Authentication, Reporting,
and Conformance (DMARC), a mechanism by which email operators
leverage existing authentication and policy advertisement
technologies to enable both message-stream feedback and enforcement
of policies against unauthenticated email.
DMARC allows Domain Owners and receivers to collaborate by:
1. Providing receivers with assertions about Domain Owners' policies
2. Providing feedback to senders so they can monitor authentication
and judge threats
The basic outline of DMARC is as follows:
1. Domain Owners publish policy assertions about domains via the
DNS.
2. Receivers compare the <a href="./rfc5322">RFC5322</a>.From address in the mail to the SPF
and DKIM results, if present, and the DMARC policy in DNS.
3. These receivers can use these results to determine how the mail
should be handled.
4. The receiver sends reports to the Domain Owner or its designee
about mail claiming to be from their domain.
Security terms used in this document are defined in [<a href="#ref-SEC-TERMS">SEC-TERMS</a>].
<span class="grey">Kucherawy & Zwicky Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
DMARC differs from previous approaches to policy advertisement (e.g.,
[<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] and [<a href="#ref-ADSP" title=""DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP)"">ADSP</a>]) in that:
o Authentication technologies are:
1. decoupled from any technology-specific policy mechanisms, and
2. used solely to establish reliable per-message domain-level
identifiers.
o Multiple authentication technologies are used to:
1. reduce the impact of transient authentication errors
2. reduce the impact of site-specific configuration errors and
deployment gaps
3. enable more use cases than any individual technology supports
alone
o Receiver-generated feedback is supported, allowing senders to
establish confidence in authentication practices.
o The domain name extracted from a message's <a href="./rfc5322">RFC5322</a>.From field is
the primary identifier in the DMARC mechanism. This identifier is
used in conjunction with the results of the underlying
authentication technologies to evaluate results under DMARC.
Experience with DMARC has revealed some issues of interoperability
with email in general that require due consideration before
deployment, particularly with configurations that can cause mail to
be rejected. These are discussed in <a href="#section-10">Section 10</a>.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Requirements</span>
Specification of DMARC is guided by the following high-level goals,
security dependencies, detailed requirements, and items that are
documented as out of scope.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. High-Level Goals</span>
DMARC has the following high-level goals:
o Allow Domain Owners to assert the preferred handling of
authentication failures, for messages purporting to have
authorship within the domain.
o Allow Domain Owners to verify their authentication deployment.
<span class="grey">Kucherawy & Zwicky Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
o Minimize implementation complexity for both senders and receivers,
as well as the impact on handling and delivery of legitimate
messages.
o Reduce the amount of successfully delivered spoofed email.
o Work at Internet scale.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Out of Scope</span>
Several topics and issues are specifically out of scope for the
initial version of this work. These include the following:
o different treatment of messages that are not authenticated versus
those that fail authentication;
o evaluation of anything other than <a href="./rfc5322">RFC5322</a>.From;
o multiple reporting formats;
o publishing policy other than via the DNS;
o reporting or otherwise evaluating other than the last-hop IP
address;
o attacks in the <a href="./rfc5322">RFC5322</a>.From field, also known as "display name"
attacks;
o authentication of entities other than domains, since DMARC is
built upon SPF and DKIM, which authenticate domains; and
o content analysis.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Scalability</span>
Scalability is a major issue for systems that need to operate in a
system as widely deployed as current SMTP email. For this reason,
DMARC seeks to avoid the need for third parties or pre-sending
agreements between senders and receivers. This preserves the
positive aspects of the current email infrastructure.
Although DMARC does not introduce third-party senders (namely
external agents authorized to send on behalf of an operator) to the
email-handling flow, it also does not preclude them. Such third
parties are free to provide services in conjunction with DMARC.
<span class="grey">Kucherawy & Zwicky Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Anti-Phishing</span>
DMARC is designed to prevent bad actors from sending mail that claims
to come from legitimate senders, particularly senders of
transactional email (official mail that is about business
transactions). One of the primary uses of this kind of spoofed mail
is phishing (enticing users to provide information by pretending to
be the legitimate service requesting the information). Thus, DMARC
is significantly informed by ongoing efforts to enact large-scale,
Internet-wide anti-phishing measures.
Although DMARC can only be used to combat specific forms of exact-
domain spoofing directly, the DMARC mechanism has been found to be
useful in the creation of reliable and defensible message streams.
DMARC does not attempt to solve all problems with spoofed or
otherwise fraudulent email. In particular, it does not address the
use of visually similar domain names ("cousin domains") or abuse of
the <a href="./rfc5322">RFC5322</a>.From human-readable <display-name>.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Terminology and Definitions</span>
This section defines terms used in the rest of the document.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="#ref-KEYWORDS" title=""Key words for use in RFCs to Indicate Requirement Levels"">KEYWORDS</a>].
Readers are encouraged to be familiar with the contents of
[<a href="#ref-EMAIL-ARCH">EMAIL-ARCH</a>]. In particular, that document defines various roles in
the messaging infrastructure that can appear the same or separate in
various contexts. For example, a Domain Owner could, via the
messaging security mechanisms on which DMARC is based, delegate the
ability to send mail as the Domain Owner to a third party with
another role. This document does not address the distinctions among
such roles; the reader is encouraged to become familiar with that
material before continuing.
The following terms are also used:
Authenticated Identifiers: Domain-level identifiers that are
validated using authentication technologies are referred to as
"Authenticated Identifiers". See <a href="#section-4.1">Section 4.1</a> for details about
the supported mechanisms.
Author Domain: The domain name of the apparent author, as extracted
from the <a href="./rfc5322">RFC5322</a>.From field.
<span class="grey">Kucherawy & Zwicky Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Domain Owner: An entity or organization that owns a DNS domain. The
term "owns" here indicates that the entity or organization being
referenced holds the registration of that DNS domain. Domain
Owners range from complex, globally distributed organizations, to
service providers working on behalf of non-technical clients, to
individuals responsible for maintaining personal domains. This
specification uses this term as analogous to an Administrative
Management Domain as defined in [<a href="#ref-EMAIL-ARCH">EMAIL-ARCH</a>]. It can also refer
to delegates, such as Report Receivers, when those are outside of
their immediate management domain.
Identifier Alignment: When the domain in the <a href="./rfc5322">RFC5322</a>.From address
matches a domain validated by SPF or DKIM (or both), it has
Identifier Alignment.
Mail Receiver: The entity or organization that receives and
processes email. Mail Receivers operate one or more Internet-
facing Mail Transport Agents (MTAs).
Organizational Domain: The domain that was registered with a domain
name registrar. In the absence of more accurate methods,
heuristics are used to determine this, since it is not always the
case that the registered domain name is simply a top-level DNS
domain plus one component (e.g., "example.com", where "com" is a
top-level domain). The Organizational Domain is determined by
applying the algorithm found in <a href="#section-3.2">Section 3.2</a>.
Report Receiver: An operator that receives reports from another
operator implementing the reporting mechanism described in this
document. Such an operator might be receiving reports about its
own messages, or reports about messages related to another
operator. This term applies collectively to the system components
that receive and process these reports and the organizations that
operate them.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Identifier Alignment</span>
Email authentication technologies authenticate various (and
disparate) aspects of an individual message. For example, [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>]
authenticates the domain that affixed a signature to the message,
while [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] can authenticate either the domain that appears in the
<a href="./rfc5321">RFC5321</a>.MailFrom (MAIL FROM) portion of [<a href="#ref-SMTP" title=""Simple Mail Transfer Protocol"">SMTP</a>] or the <a href="./rfc5321">RFC5321</a>.EHLO/
HELO domain, or both. These may be different domains, and they are
typically not visible to the end user.
DMARC authenticates use of the <a href="./rfc5322">RFC5322</a>.From domain by requiring that
it match (be aligned with) an Authenticated Identifier. The
<a href="./rfc5322">RFC5322</a>.From domain was selected as the central identity of the DMARC
<span class="grey">Kucherawy & Zwicky Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
mechanism because it is a required message header field and therefore
guaranteed to be present in compliant messages, and most Mail User
Agents (MUAs) represent the <a href="./rfc5322">RFC5322</a>.From field as the originator of
the message and render some or all of this header field's content to
end users.
Thus, this field is the one used by end users to identify the source
of the message and therefore is a prime target for abuse. Many
high-profile email sources, such as email service providers, require
that the sending agent have authenticated before email can be
generated. Thus, for these mailboxes, the mechanism described in
this document provides recipient end users with strong evidence that
the message was indeed originated by the agent they associate with
that mailbox, if the end user knows that these various protections
have been provided.
Domain names in this context are to be compared in a case-insensitive
manner, per [<a href="#ref-DNS-CASE" title=""Domain Name System (DNS) Case Insensitivity Clarification"">DNS-CASE</a>].
It is important to note that Identifier Alignment cannot occur with a
message that is not valid per [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>], particularly one with a
malformed, absent, or repeated <a href="./rfc5322">RFC5322</a>.From field, since in that case
there is no reliable way to determine a DMARC policy that applies to
the message. Accordingly, DMARC operation is predicated on the input
being a valid <a href="./rfc5322">RFC5322</a> message object, and handling of such
non-compliant cases is outside of the scope of this specification.
Further discussion of this can be found in <a href="#section-6.6.1">Section 6.6.1</a>.
Each of the underlying authentication technologies that DMARC takes
as input yields authenticated domains as their outputs when they
succeed. From the perspective of DMARC, each can be operated in a
"strict" mode or a "relaxed" mode. A Domain Owner would normally
select strict mode if it wanted Mail Receivers to apply DMARC
processing only to messages bearing an <a href="./rfc5322">RFC5322</a>.From domain exactly
matching the domains those mechanisms will verify. Relaxed mode can
be used when the operator also wishes to affect message flows bearing
subdomains of the verified domains.
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>. DKIM-Authenticated Identifiers</span>
DMARC permits Identifier Alignment, based on the result of a DKIM
authentication, to be strict or relaxed. (Note that these are not
related to DKIM's "simple" and "relaxed" canonicalization modes.)
<span class="grey">Kucherawy & Zwicky Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
In relaxed mode, the Organizational Domains of both the [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>]-
authenticated signing domain (taken from the value of the "d=" tag in
the signature) and that of the <a href="./rfc5322">RFC5322</a>.From domain must be equal if
the identifiers are to be considered aligned. In strict mode, only
an exact match between both of the Fully Qualified Domain Names
(FQDNs) is considered to produce Identifier Alignment.
To illustrate, in relaxed mode, if a validated DKIM signature
successfully verifies with a "d=" domain of "example.com", and the
<a href="./rfc5322">RFC5322</a>.From address is "alerts@news.example.com", the DKIM "d="
domain and the <a href="./rfc5322">RFC5322</a>.From domain are considered to be "in
alignment". In strict mode, this test would fail, since the "d="
domain does not exactly match the FQDN of the address.
However, a DKIM signature bearing a value of "d=com" would never
allow an "in alignment" result, as "com" should appear on all public
suffix lists (see <a href="#appendix-A.6.1">Appendix A.6.1</a>) and therefore cannot be an
Organizational Domain.
Identifier Alignment is required because a message can bear a valid
signature from any domain, including domains used by a mailing list
or even a bad actor. Therefore, merely bearing a valid signature is
not enough to infer authenticity of the Author Domain.
Note that a single email can contain multiple DKIM signatures, and it
is considered to be a DMARC "pass" if any DKIM signature is aligned
and verifies.
<span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a>. SPF-Authenticated Identifiers</span>
DMARC permits Identifier Alignment, based on the result of an SPF
authentication, to be strict or relaxed.
In relaxed mode, the [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>]-authenticated domain and <a href="./rfc5322">RFC5322</a>.From
domain must have the same Organizational Domain. In strict mode,
only an exact DNS domain match is considered to produce Identifier
Alignment.
Note that the <a href="./rfc5321">RFC5321</a>.HELO identity is not typically used in the
context of DMARC (except when required to "fake" an otherwise null
reverse-path), even though a "pure SPF" implementation according to
[<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] would check that identifier.
<span class="grey">Kucherawy & Zwicky Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
For example, if a message passes an SPF check with an
<a href="./rfc5321">RFC5321</a>.MailFrom domain of "cbg.bounces.example.com", and the address
portion of the <a href="./rfc5322">RFC5322</a>.From field contains "payments@example.com",
the Authenticated <a href="./rfc5321">RFC5321</a>.MailFrom domain identifier and the
<a href="./rfc5322">RFC5322</a>.From domain are considered to be "in alignment" in relaxed
mode, but not in strict mode.
<span class="h4"><a class="selflink" id="section-3.1.3" href="#section-3.1.3">3.1.3</a>. Alignment and Extension Technologies</span>
If in the future DMARC is extended to include the use of other
authentication mechanisms, the extensions will need to allow for
domain identifier extraction so that alignment with the <a href="./rfc5322">RFC5322</a>.From
domain can be verified.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Organizational Domain</span>
The Organizational Domain is determined using the following
algorithm:
1. Acquire a "public suffix" list, i.e., a list of DNS domain names
reserved for registrations. Some country Top-Level Domains
(TLDs) make specific registration requirements, e.g., the United
Kingdom places company registrations under ".co.uk"; other TLDs
such as ".com" appear in the IANA registry of top-level DNS
domains. A public suffix list is the union of all of these.
<a href="#appendix-A.6.1">Appendix A.6.1</a> contains some discussion about obtaining a public
suffix list.
2. Break the subject DNS domain name into a set of "n" ordered
labels. Number these labels from right to left; e.g., for
"example.com", "com" would be label 1 and "example" would be
label 2.
3. Search the public suffix list for the name that matches the
largest number of labels found in the subject DNS domain. Let
that number be "x".
4. Construct a new DNS domain name using the name that matched from
the public suffix list and prefixing to it the "x+1"th label from
the subject domain. This new name is the Organizational Domain.
Thus, since "com" is an IANA-registered TLD, a subject domain of
"a.b.c.d.example.com" would have an Organizational Domain of
"example.com".
The process of determining a suffix is currently a heuristic one. No
list is guaranteed to be accurate or current.
<span class="grey">Kucherawy & Zwicky Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Overview</span>
This section provides a general overview of the design and operation
of the DMARC environment.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Authentication Mechanisms</span>
The following mechanisms for determining Authenticated Identifiers
are supported in this version of DMARC:
o [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>], which provides a domain-level identifier in the content of
the "d=" tag of a validated DKIM-Signature header field.
o [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>], which can authenticate both the domain found in an [<a href="#ref-SMTP" title=""Simple Mail Transfer Protocol"">SMTP</a>]
HELO/EHLO command (the HELO identity) and the domain found in an
SMTP MAIL command (the MAIL FROM identity). DMARC uses the result
of SPF authentication of the MAIL FROM identity. Section 2.4 of
[<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] describes MAIL FROM processing for cases in which the MAIL
command has a null path.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Key Concepts</span>
DMARC policies are published by the Domain Owner, and retrieved by
the Mail Receiver during the SMTP session, via the DNS.
DMARC's filtering function is based on whether the <a href="./rfc5322">RFC5322</a>.From field
domain is aligned with (matches) an authenticated domain name from
SPF or DKIM. When a DMARC policy is published for the domain name
found in the <a href="./rfc5322">RFC5322</a>.From field, and that domain name is not
validated through SPF or DKIM, the disposition of that message can be
affected by that DMARC policy when delivered to a participating
receiver.
It is important to note that the authentication mechanisms employed
by DMARC authenticate only a DNS domain and do not authenticate the
local-part of any email address identifier found in a message, nor do
they validate the legitimacy of message content.
DMARC's feedback component involves the collection of information
about received messages claiming to be from the Organizational Domain
for periodic aggregate reports to the Domain Owner. The parameters
and format for such reports are discussed in later sections of this
document.
A DMARC-enabled Mail Receiver might also generate per-message reports
that contain information related to individual messages that fail SPF
and/or DKIM. Per-message failure reports are a useful source of
information when debugging deployments (if messages can be determined
<span class="grey">Kucherawy & Zwicky Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
to be legitimate even though failing authentication) or in analyzing
attacks. The capability for such services is enabled by DMARC but
defined in other referenced material such as [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>].
A message satisfies the DMARC checks if at least one of the supported
authentication mechanisms:
1. produces a "pass" result, and
2. produces that result based on an identifier that is in alignment,
as defined in <a href="#section-3">Section 3</a>.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Flow Diagram</span>
+---------------+
| Author Domain |< . . . . . . . . . . . . . . . . . . . . . . .
+---------------+ . . .
| . . .
V V V .
+-----------+ +--------+ +----------+ +----------+ .
| MSA |<***>| DKIM | | DKIM | | SPF | .
| Service | | Signer | | Verifier | | Verifier | .
+-----------+ +--------+ +----------+ +----------+ .
| ^ ^ .
| ************** .
V * .
+------+ (~~~~~~~~~~~~) +------+ * .
| sMTA |------->( other MTAs )----->| rMTA | * .
+------+ (~~~~~~~~~~~~) +------+ * .
| * ........
| * .
V * .
+-----------+ V V
+---------+ | MDA | +----------+
| User |<--| Filtering |<***>| DMARC |
| Mailbox | | Engine | | Verifier |
+---------+ +-----------+ +----------+
MSA = Mail Submission Agent
MDA = Mail Delivery Agent
The above diagram shows a simple flow of messages through a DMARC-
aware system. Solid lines denote the actual message flow, dotted
lines involve DNS queries used to retrieve message policy related to
the supported message authentication schemes, and asterisk lines
indicate data exchange between message-handling modules and message
authentication modules. "sMTA" is the sending MTA, and "rMTA" is the
receiving MTA.
<span class="grey">Kucherawy & Zwicky Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
In essence, the steps are as follows:
1. Domain Owner constructs an SPF policy and publishes it in its
DNS database as per [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>]. Domain Owner also configures its
system for DKIM signing as described in [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>]. Finally, Domain
Owner publishes via the DNS a DMARC message-handling policy.
2. Author generates a message and hands the message to Domain
Owner's designated mail submission service.
3. Submission service passes relevant details to the DKIM signing
module in order to generate a DKIM signature to be applied to
the message.
4. Submission service relays the now-signed message to its
designated transport service for routing to its intended
recipient(s).
5. Message may pass through other relays but eventually arrives at
a recipient's transport service.
6. Recipient delivery service conducts SPF and DKIM authentication
checks by passing the necessary data to their respective
modules, each of which requires queries to the Author Domain's
DNS data (when identifiers are aligned; see below).
7. The results of these are passed to the DMARC module along with
the Author's domain. The DMARC module attempts to retrieve a
policy from the DNS for that domain. If none is found, the
DMARC module determines the Organizational Domain and repeats
the attempt to retrieve a policy from the DNS. (This is
described in further detail in <a href="#section-6.6.3">Section 6.6.3</a>.)
8. If a policy is found, it is combined with the Author's domain
and the SPF and DKIM results to produce a DMARC policy result (a
"pass" or "fail") and can optionally cause one of two kinds of
reports to be generated (not shown).
9. Recipient transport service either delivers the message to the
recipient inbox or takes other local policy action based on the
DMARC result (not shown).
10. When requested, Recipient transport service collects data from
the message delivery session to be used in providing feedback
(see <a href="#section-7">Section 7</a>).
<span class="grey">Kucherawy & Zwicky Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Use of <a href="./rfc5322">RFC5322</a>.From</span>
One of the most obvious points of security scrutiny for DMARC is the
choice to focus on an identifier, namely the <a href="./rfc5322">RFC5322</a>.From address,
which is part of a body of data that has been trivially forged
throughout the history of email.
Several points suggest that it is the most correct and safest thing
to do in this context:
o Of all the identifiers that are part of the message itself, this
is the only one guaranteed to be present.
o It seems the best choice of an identifier on which to focus, as
most MUAs display some or all of the contents of that field in a
manner strongly suggesting those data as reflective of the true
originator of the message.
The absence of a single, properly formed <a href="./rfc5322">RFC5322</a>.From field renders
the message invalid. Handling of such a message is outside of the
scope of this specification.
Since the sorts of mail typically protected by DMARC participants
tend to only have single Authors, DMARC participants generally
operate under a slightly restricted profile of <a href="./rfc5322">RFC5322</a> with respect
to the expected syntax of this field. See <a href="#section-6.6">Section 6.6</a> for details.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Policy</span>
DMARC policies are published by Domain Owners and applied by Mail
Receivers.
A Domain Owner advertises DMARC participation of one or more of its
domains by adding a DNS TXT record (described in <a href="#section-6.1">Section 6.1</a>) to
those domains. In doing so, Domain Owners make specific requests of
Mail Receivers regarding the disposition of messages purporting to be
from one of the Domain Owner's domains and the provision of feedback
about those messages.
A Domain Owner may choose not to participate in DMARC evaluation by
Mail Receivers. In this case, the Domain Owner simply declines to
advertise participation in those schemes. For example, if the
results of path authorization checks ought not be considered as part
of the overall DMARC result for a given Author Domain, then the
Domain Owner does not publish an SPF policy record that can produce
an SPF pass result.
<span class="grey">Kucherawy & Zwicky Informational [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
A Mail Receiver implementing the DMARC mechanism SHOULD make a
best-effort attempt to adhere to the Domain Owner's published DMARC
policy when a message fails the DMARC test. Since email streams can
be complicated (due to forwarding, existing <a href="./rfc5322">RFC5322</a>.From
domain-spoofing services, etc.), Mail Receivers MAY deviate from a
Domain Owner's published policy during message processing and SHOULD
make available the fact of and reason for the deviation to the Domain
Owner via feedback reporting, specifically using the "PolicyOverride"
feature of the aggregate report (see <a href="#section-7.2">Section 7.2</a>).
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. DMARC Policy Record</span>
Domain Owner DMARC preferences are stored as DNS TXT records in
subdomains named "_dmarc". For example, the Domain Owner of
"example.com" would post DMARC preferences in a TXT record at
"_dmarc.example.com". Similarly, a Mail Receiver wishing to query
for DMARC preferences regarding mail with an <a href="./rfc5322">RFC5322</a>.From domain of
"example.com" would issue a TXT query to the DNS for the subdomain of
"_dmarc.example.com". The DNS-located DMARC preference data will
hereafter be called the "DMARC record".
DMARC's use of the Domain Name Service is driven by DMARC's use of
domain names and the nature of the query it performs. The query
requirement matches with the DNS, for obtaining simple parametric
information. It uses an established method of storing the
information, associated with the target domain name, namely an
isolated TXT record that is restricted to the DMARC context. Use of
the DNS as the query service has the benefit of reusing an extremely
well-established operations, administration, and management
infrastructure, rather than creating a new one.
Per [<a href="#ref-DNS" title=""Domain names - implementation and specification"">DNS</a>], a TXT record can comprise several "character-string"
objects. Where this is the case, the module performing DMARC
evaluation MUST concatenate these strings by joining together the
objects in order and parsing the result as a single string.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. DMARC URIs</span>
[<a id="ref-URI">URI</a>] defines a generic syntax for identifying a resource. The DMARC
mechanism uses this as the format by which a Domain Owner specifies
the destination for the two report types that are supported.
The place such URIs are specified (see <a href="#section-6.3">Section 6.3</a>) allows a list of
these to be provided. A report is normally sent to each listed URI
in the order provided by the Domain Owner. Receivers MAY impose a
limit on the number of URIs to which they will send reports but MUST
support the ability to send to at least two. The list of URIs is
separated by commas (ASCII 0x2C).
<span class="grey">Kucherawy & Zwicky Informational [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Each URI can have associated with it a maximum report size that may
be sent to it. This is accomplished by appending an exclamation
point (ASCII 0x21), followed by a maximum-size indication, before a
separating comma or terminating semicolon.
Thus, a DMARC URI is a URI within which any commas or exclamation
points are percent-encoded per [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>], followed by an OPTIONAL
exclamation point and a maximum-size specification, and, if there are
additional reporting URIs in the list, a comma and the next URI.
For example, the URI "mailto:reports@example.com!50m" would request
that a report be sent via email to "reports@example.com" so long as
the report payload does not exceed 50 megabytes.
A formal definition is provided in <a href="#section-6.4">Section 6.4</a>.
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. General Record Format</span>
DMARC records follow the extensible "tag-value" syntax for DNS-based
key records defined in DKIM [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>].
<a href="#section-11">Section 11</a> creates a registry for known DMARC tags and registers the
initial set defined in this document. Only tags defined in this
document or in later extensions, and thus added to that registry, are
to be processed; unknown tags MUST be ignored.
The following tags are introduced as the initial valid DMARC tags:
adkim: (plain-text; OPTIONAL; default is "r".) Indicates whether
strict or relaxed DKIM Identifier Alignment mode is required by
the Domain Owner. See <a href="#section-3.1.1">Section 3.1.1</a> for details. Valid values
are as follows:
r: relaxed mode
s: strict mode
aspf: (plain-text; OPTIONAL; default is "r".) Indicates whether
strict or relaxed SPF Identifier Alignment mode is required by the
Domain Owner. See <a href="#section-3.1.2">Section 3.1.2</a> for details. Valid values are as
follows:
r: relaxed mode
s: strict mode
<span class="grey">Kucherawy & Zwicky Informational [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
fo: Failure reporting options (plain-text; OPTIONAL; default is "0")
Provides requested options for generation of failure reports.
Report generators MAY choose to adhere to the requested options.
This tag's content MUST be ignored if a "ruf" tag (below) is not
also specified. The value of this tag is a colon-separated list
of characters that indicate failure reporting options as follows:
0: Generate a DMARC failure report if all underlying
authentication mechanisms fail to produce an aligned "pass"
result.
1: Generate a DMARC failure report if any underlying
authentication mechanism produced something other than an
aligned "pass" result.
d: Generate a DKIM failure report if the message had a signature
that failed evaluation, regardless of its alignment. DKIM-
specific reporting is described in [<a href="#ref-AFRF-DKIM">AFRF-DKIM</a>].
s: Generate an SPF failure report if the message failed SPF
evaluation, regardless of its alignment. SPF-specific
reporting is described in [<a href="#ref-AFRF-SPF" title=""Sender Policy Framework (SPF) Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF-SPF</a>].
p: Requested Mail Receiver policy (plain-text; REQUIRED for policy
records). Indicates the policy to be enacted by the Receiver at
the request of the Domain Owner. Policy applies to the domain
queried and to subdomains, unless subdomain policy is explicitly
described using the "sp" tag. This tag is mandatory for policy
records only, but not for third-party reporting records (see
<a href="#section-7.1">Section 7.1</a>). Possible values are as follows:
none: The Domain Owner requests no specific action be taken
regarding delivery of messages.
quarantine: The Domain Owner wishes to have email that fails the
DMARC mechanism check be treated by Mail Receivers as
suspicious. Depending on the capabilities of the Mail
Receiver, this can mean "place into spam folder", "scrutinize
with additional intensity", and/or "flag as suspicious".
reject: The Domain Owner wishes for Mail Receivers to reject
email that fails the DMARC mechanism check. Rejection SHOULD
occur during the SMTP transaction. See <a href="#section-10.3">Section 10.3</a> for some
discussion of SMTP rejection methods and their implications.
pct: (plain-text integer between 0 and 100, inclusive; OPTIONAL;
default is 100). Percentage of messages from the Domain Owner's
mail stream to which the DMARC policy is to be applied. However,
<span class="grey">Kucherawy & Zwicky Informational [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
this MUST NOT be applied to the DMARC-generated reports, all of
which must be sent and received unhindered. The purpose of the
"pct" tag is to allow Domain Owners to enact a slow rollout
enforcement of the DMARC mechanism. The prospect of "all or
nothing" is recognized as preventing many organizations from
experimenting with strong authentication-based mechanisms. See
<a href="#section-6.6.4">Section 6.6.4</a> for details. Note that random selection based on
this percentage, such as the following pseudocode, is adequate:
if (random mod 100) < pct then
selected = true
else
selected = false
rf: Format to be used for message-specific failure reports (colon-
separated plain-text list of values; OPTIONAL; default is "afrf").
The value of this tag is a list of one or more report formats as
requested by the Domain Owner to be used when a message fails both
[<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] and [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>] tests to report details of the individual
failure. The values MUST be present in the registry of reporting
formats defined in <a href="#section-11">Section 11</a>; a Mail Receiver observing a
different value SHOULD ignore it or MAY ignore the entire DMARC
record. For this version, only "afrf" (the auth-failure report
type defined in [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>]) is presently supported. See <a href="#section-7.3">Section 7.3</a>
for details. For interoperability, the Authentication Failure
Reporting Format (AFRF) MUST be supported.
ri: Interval requested between aggregate reports (plain-text 32-bit
unsigned integer; OPTIONAL; default is 86400). Indicates a
request to Receivers to generate aggregate reports separated by no
more than the requested number of seconds. DMARC implementations
MUST be able to provide daily reports and SHOULD be able to
provide hourly reports when requested. However, anything other
than a daily report is understood to be accommodated on a best-
effort basis.
rua: Addresses to which aggregate feedback is to be sent (comma-
separated plain-text list of DMARC URIs; OPTIONAL). A comma or
exclamation point that is part of such a DMARC URI MUST be encoded
per Section 2.1 of [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>] so as to distinguish it from the list
delimiter or an OPTIONAL size limit. <a href="#section-7.1">Section 7.1</a> discusses
considerations that apply when the domain name of a URI differs
from that of the domain advertising the policy. See <a href="#section-12.5">Section 12.5</a>
for additional considerations. Any valid URI can be specified. A
Mail Receiver MUST implement support for a "mailto:" URI, i.e.,
the ability to send a DMARC report via electronic mail. If not
<span class="grey">Kucherawy & Zwicky Informational [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
provided, Mail Receivers MUST NOT generate aggregate feedback
reports. URIs not supported by Mail Receivers MUST be ignored.
The aggregate feedback report format is described in <a href="#section-7.2">Section 7.2</a>.
ruf: Addresses to which message-specific failure information is to
be reported (comma-separated plain-text list of DMARC URIs;
OPTIONAL). If present, the Domain Owner is requesting Mail
Receivers to send detailed failure reports about messages that
fail the DMARC evaluation in specific ways (see the "fo" tag
above). The format of the message to be generated MUST follow the
format specified for the "rf" tag. <a href="#section-7.1">Section 7.1</a> discusses
considerations that apply when the domain name of a URI differs
from that of the domain advertising the policy. A Mail Receiver
MUST implement support for a "mailto:" URI, i.e., the ability to
send a DMARC report via electronic mail. If not provided, Mail
Receivers MUST NOT generate failure reports. See <a href="#section-12.5">Section 12.5</a> for
additional considerations.
sp: Requested Mail Receiver policy for all subdomains (plain-text;
OPTIONAL). Indicates the policy to be enacted by the Receiver at
the request of the Domain Owner. It applies only to subdomains of
the domain queried and not to the domain itself. Its syntax is
identical to that of the "p" tag defined above. If absent, the
policy specified by the "p" tag MUST be applied for subdomains.
Note that "sp" will be ignored for DMARC records published on
subdomains of Organizational Domains due to the effect of the
DMARC policy discovery mechanism described in <a href="#section-6.6.3">Section 6.6.3</a>.
v: Version (plain-text; REQUIRED). Identifies the record retrieved
as a DMARC record. It MUST have the value of "DMARC1". The value
of this tag MUST match precisely; if it does not or it is absent,
the entire retrieved record MUST be ignored. It MUST be the first
tag in the list.
A DMARC policy record MUST comply with the formal specification found
in <a href="#section-6.4">Section 6.4</a> in that the "v" and "p" tags MUST be present and MUST
appear in that order. Unknown tags MUST be ignored. Syntax errors
in the remainder of the record SHOULD be discarded in favor of
default values (if any) or ignored outright.
Note that given the rules of the previous paragraph, addition of a
new tag into the registered list of tags does not itself require a
new version of DMARC to be generated (with a corresponding change to
the "v" tag's value), but a change to any existing tags does require
a new version of DMARC.
<span class="grey">Kucherawy & Zwicky Informational [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. Formal Definition</span>
The formal definition of the DMARC format, using [<a href="#ref-ABNF" title=""Augmented BNF for Syntax Specifications: ABNF"">ABNF</a>], is as
follows:
dmarc-uri = URI [ "!" 1*DIGIT [ "k" / "m" / "g" / "t" ] ]
; "URI" is imported from [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>]; commas (ASCII
; 0x2C) and exclamation points (ASCII 0x21)
; MUST be encoded; the numeric portion MUST fit
; within an unsigned 64-bit integer
dmarc-record = dmarc-version dmarc-sep
[dmarc-request]
[dmarc-sep dmarc-srequest]
[dmarc-sep dmarc-auri]
[dmarc-sep dmarc-furi]
[dmarc-sep dmarc-adkim]
[dmarc-sep dmarc-aspf]
[dmarc-sep dmarc-ainterval]
[dmarc-sep dmarc-fo]
[dmarc-sep dmarc-rfmt]
[dmarc-sep dmarc-percent]
[dmarc-sep]
; components other than dmarc-version and
; dmarc-request may appear in any order
dmarc-version = "v" *WSP "=" *WSP %x44 %x4d %x41 %x52 %x43 %x31
dmarc-sep = *WSP %x3b *WSP
dmarc-request = "p" *WSP "=" *WSP
( "none" / "quarantine" / "reject" )
dmarc-srequest = "sp" *WSP "=" *WSP
( "none" / "quarantine" / "reject" )
dmarc-auri = "rua" *WSP "=" *WSP
dmarc-uri *(*WSP "," *WSP dmarc-uri)
dmarc-furi = "ruf" *WSP "=" *WSP
dmarc-uri *(*WSP "," *WSP dmarc-uri)
dmarc-adkim = "adkim" *WSP "=" *WSP
( "r" / "s" )
dmarc-aspf = "aspf" *WSP "=" *WSP
( "r" / "s" )
<span class="grey">Kucherawy & Zwicky Informational [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
dmarc-ainterval = "ri" *WSP "=" *WSP 1*DIGIT
dmarc-fo = "fo" *WSP "=" *WSP
( "0" / "1" / "d" / "s" )
*(*WSP ":" *WSP ( "0" / "1" / "d" / "s" ))
dmarc-rfmt = "rf" *WSP "=" *WSP Keyword *(*WSP ":" Keyword)
; registered reporting formats only
dmarc-percent = "pct" *WSP "=" *WSP
1*3DIGIT
"Keyword" is imported from Section 4.1.2 of [<a href="#ref-SMTP" title=""Simple Mail Transfer Protocol"">SMTP</a>].
A size limitation in a dmarc-uri, if provided, is interpreted as a
count of units followed by an OPTIONAL unit size ("k" for kilobytes,
"m" for megabytes, "g" for gigabytes, "t" for terabytes). Without a
unit, the number is presumed to be a basic byte count. Note that the
units are considered to be powers of two; a kilobyte is 2^10, a
megabyte is 2^20, etc.
<span class="h3"><a class="selflink" id="section-6.5" href="#section-6.5">6.5</a>. Domain Owner Actions</span>
To implement the DMARC mechanism, the only action required of a
Domain Owner is the creation of the DMARC policy record in the DNS.
However, in order to make meaningful use of DMARC, a Domain Owner
must at minimum either establish an address to receive reports, or
deploy authentication technologies and ensure Identifier Alignment.
Most Domain Owners will want to do both.
DMARC reports will be of significant size, and the addresses that
receive them are publicly visible, so we encourage Domain Owners to
set up dedicated email addresses to receive and process reports, and
to deploy abuse countermeasures on those email addresses as
appropriate.
Authentication technologies are discussed in [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>] (see also
[<a href="#ref-DKIM-OVERVIEW">DKIM-OVERVIEW</a>] and [<a href="#ref-DKIM-DEPLOYMENT">DKIM-DEPLOYMENT</a>]) and [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>].
<span class="grey">Kucherawy & Zwicky Informational [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="section-6.6" href="#section-6.6">6.6</a>. Mail Receiver Actions</span>
This section describes receiver actions in the DMARC environment.
<span class="h4"><a class="selflink" id="section-6.6.1" href="#section-6.6.1">6.6.1</a>. Extract Author Domain</span>
The domain in the <a href="./rfc5322">RFC5322</a>.From field is extracted as the domain to be
evaluated by DMARC. If the domain is encoded with UTF-8, the domain
name must be converted to an A-label, as described in Section 2.3 of
[<a href="#ref-IDNA" title=""Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework"">IDNA</a>], for further processing.
In order to be processed by DMARC, a message typically needs to
contain exactly one <a href="./rfc5322">RFC5322</a>.From domain (a single From: field with a
single domain in it). Not all messages meet this requirement, and
handling of them is outside of the scope of this document. Typical
exceptions, and the way they have been historically handled by DMARC
participants, are as follows:
o Messages with multiple <a href="./rfc5322">RFC5322</a>.From fields are typically rejected,
since that form is forbidden under <a href="./rfc5322">RFC 5322</a> [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>];
o Messages bearing a single <a href="./rfc5322">RFC5322</a>.From field containing multiple
addresses (and, thus, multiple domain names to be evaluated) are
typically rejected because the sorts of mail normally protected by
DMARC do not use this format;
o Messages that have no <a href="./rfc5322">RFC5322</a>.From field at all are typically
rejected, since that form is forbidden under <a href="./rfc5322">RFC 5322</a> [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>];
o Messages with an <a href="./rfc5322">RFC5322</a>.From field that contains no meaningful
domains, such as <a href="./rfc5322">RFC 5322</a> [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>]'s "group" syntax, are typically
ignored.
The case of a syntactically valid multi-valued <a href="./rfc5322">RFC5322</a>.From field
presents a particular challenge. The process in this case is to
apply the DMARC check using each of those domains found in the
<a href="./rfc5322">RFC5322</a>.From field as the Author Domain and apply the most strict
policy selected among the checks that fail.
<span class="grey">Kucherawy & Zwicky Informational [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h4"><a class="selflink" id="section-6.6.2" href="#section-6.6.2">6.6.2</a>. Determine Handling Policy</span>
To arrive at a policy for an individual message, Mail Receivers MUST
perform the following actions or their semantic equivalents.
Steps 2-4 MAY be done in parallel, whereas steps 5 and 6 require
input from previous steps.
The steps are as follows:
1. Extract the <a href="./rfc5322">RFC5322</a>.From domain from the message (as above).
2. Query the DNS for a DMARC policy record. Continue if one is
found, or terminate DMARC evaluation otherwise. See
<a href="#section-6.6.3">Section 6.6.3</a> for details.
3. Perform DKIM signature verification checks. A single email could
contain multiple DKIM signatures. The results of this step are
passed to the remainder of the algorithm and MUST include the
value of the "d=" tag from each checked DKIM signature.
4. Perform SPF validation checks. The results of this step are
passed to the remainder of the algorithm and MUST include the
domain name used to complete the SPF check.
5. Conduct Identifier Alignment checks. With authentication checks
and policy discovery performed, the Mail Receiver checks to see
if Authenticated Identifiers fall into alignment as described in
<a href="#section-3">Section 3</a>. If one or more of the Authenticated Identifiers align
with the <a href="./rfc5322">RFC5322</a>.From domain, the message is considered to pass
the DMARC mechanism check. All other conditions (authentication
failures, identifier mismatches) are considered to be DMARC
mechanism check failures.
6. Apply policy. Emails that fail the DMARC mechanism check are
disposed of in accordance with the discovered DMARC policy of the
Domain Owner. See <a href="#section-6.3">Section 6.3</a> for details.
Heuristics applied in the absence of use by a Domain Owner of either
SPF or DKIM (e.g., [<a href="#ref-Best-Guess-SPF">Best-Guess-SPF</a>]) SHOULD NOT be used, as it may be
the case that the Domain Owner wishes a Message Receiver not to
consider the results of that underlying authentication protocol at
all.
DMARC evaluation can only yield a "pass" result after one of the
underlying authentication mechanisms passes for an aligned
identifier. If neither passes and one or both of them fail due to a
temporary error, the Receiver evaluating the message is unable to
conclude that the DMARC mechanism had a permanent failure; they
<span class="grey">Kucherawy & Zwicky Informational [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
therefore cannot apply the advertised DMARC policy. When otherwise
appropriate, Receivers MAY send feedback reports regarding temporary
errors.
Handling of messages for which SPF and/or DKIM evaluation encounter a
permanent DNS error is left to the discretion of the Mail Receiver.
<span class="h4"><a class="selflink" id="section-6.6.3" href="#section-6.6.3">6.6.3</a>. Policy Discovery</span>
As stated above, the DMARC mechanism uses DNS TXT records to
advertise policy. Policy discovery is accomplished via a method
similar to the method used for SPF records. This method, and the
important differences between DMARC and SPF mechanisms, are discussed
below.
To balance the conflicting requirements of supporting wildcarding,
allowing subdomain policy overrides, and limiting DNS query load, the
following DNS lookup scheme is employed:
1. Mail Receivers MUST query the DNS for a DMARC TXT record at the
DNS domain matching the one found in the <a href="./rfc5322">RFC5322</a>.From domain in
the message. A possibly empty set of records is returned.
2. Records that do not start with a "v=" tag that identifies the
current version of DMARC are discarded.
3. If the set is now empty, the Mail Receiver MUST query the DNS for
a DMARC TXT record at the DNS domain matching the Organizational
Domain in place of the <a href="./rfc5322">RFC5322</a>.From domain in the message (if
different). This record can contain policy to be asserted for
subdomains of the Organizational Domain. A possibly empty set of
records is returned.
4. Records that do not start with a "v=" tag that identifies the
current version of DMARC are discarded.
5. If the remaining set contains multiple records or no records,
policy discovery terminates and DMARC processing is not applied
to this message.
<span class="grey">Kucherawy & Zwicky Informational [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
6. If a retrieved policy record does not contain a valid "p" tag, or
contains an "sp" tag that is not valid, then:
1. if a "rua" tag is present and contains at least one
syntactically valid reporting URI, the Mail Receiver SHOULD
act as if a record containing a valid "v" tag and "p=none"
was retrieved, and continue processing;
2. otherwise, the Mail Receiver applies no DMARC processing to
this message.
If the set produced by the mechanism above contains no DMARC policy
record (i.e., any indication that there is no such record as opposed
to a transient DNS error), Mail Receivers SHOULD NOT apply the DMARC
mechanism to the message.
Handling of DNS errors when querying for the DMARC policy record is
left to the discretion of the Mail Receiver. For example, to ensure
minimal disruption of mail flow, transient errors could result in
delivery of the message ("fail open"), or they could result in the
message being temporarily rejected (i.e., an SMTP 4yx reply), which
invites the sending MTA to try again after the condition has possibly
cleared, allowing a definite DMARC conclusion to be reached ("fail
closed").
<span class="h4"><a class="selflink" id="section-6.6.4" href="#section-6.6.4">6.6.4</a>. Message Sampling</span>
If the "pct" tag is present in the policy record, the Mail Receiver
MUST NOT enact the requested policy ("p" tag or "sp" tag") on more
than the stated percent of the totality of affected messages.
However, regardless of whether or not the "pct" tag is present, the
Mail Receiver MUST include all relevant message data in any reports
produced.
If email is subject to the DMARC policy of "quarantine", the Mail
Receiver SHOULD quarantine the message. If the email is not subject
to the "quarantine" policy (due to the "pct" tag), the Mail Receiver
SHOULD apply local message classification as normal.
If email is subject to the DMARC policy of "reject", the Mail
Receiver SHOULD reject the message (see <a href="#section-10.3">Section 10.3</a>). If the email
is not subject to the "reject" policy (due to the "pct" tag), the
Mail Receiver SHOULD treat the email as though the "quarantine"
policy applies. This behavior allows Domain Owners to experiment
with progressively stronger policies without relaxing existing
policy.
<span class="grey">Kucherawy & Zwicky Informational [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Mail Receivers implement "pct" via statistical mechanisms that
achieve a close approximation to the requested percentage and provide
a representative sample across a reporting period.
<span class="h4"><a class="selflink" id="section-6.6.5" href="#section-6.6.5">6.6.5</a>. Store Results of DMARC Processing</span>
The results of Mail Receiver-based DMARC processing should be stored
for eventual presentation back to the Domain Owner in the form of
aggregate feedback reports. Sections <a href="#section-6.3">6.3</a> and <a href="#section-7.2">7.2</a> discuss aggregate
feedback.
<span class="h3"><a class="selflink" id="section-6.7" href="#section-6.7">6.7</a>. Policy Enforcement Considerations</span>
Mail Receivers MAY choose to reject or quarantine email even if email
passes the DMARC mechanism check. The DMARC mechanism does not
inform Mail Receivers whether an email stream is "good". Mail
Receivers are encouraged to maintain anti-abuse technologies to
combat the possibility of DMARC-enabled criminal campaigns.
Mail Receivers MAY choose to accept email that fails the DMARC
mechanism check even if the Domain Owner has published a "reject"
policy. Mail Receivers need to make a best effort not to increase
the likelihood of accepting abusive mail if they choose not to comply
with a Domain Owner's reject, against policy. At a minimum, addition
of the Authentication-Results header field (see [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]) is
RECOMMENDED when delivery of failing mail is done. When this is
done, the DNS domain name thus recorded MUST be encoded as an
A-label.
Mail Receivers are only obligated to report reject or quarantine
policy actions in aggregate feedback reports that are due to DMARC
policy. They are not required to report reject or quarantine actions
that are the result of local policy. If local policy information is
exposed, abusers can gain insight into the effectiveness and delivery
rates of spam campaigns.
Final disposition of a message is always a matter of local policy.
An operator that wishes to favor DMARC policy over SPF policy, for
example, will disregard the SPF policy, since enacting an
SPF-determined rejection prevents evaluation of DKIM; DKIM might
otherwise pass, satisfying the DMARC evaluation. There is a
trade-off to doing so, namely acceptance and processing of the entire
message body in exchange for the enhanced protection DMARC provides.
DMARC-compliant Mail Receivers typically disregard any mail-handling
directive discovered as part of an authentication mechanism (e.g.,
Author Domain Signing Practices (ADSP), SPF) where a DMARC record is
also discovered that specifies a policy other than "none". Deviating
<span class="grey">Kucherawy & Zwicky Informational [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
from this practice introduces inconsistency among DMARC operators in
terms of handling of the message. However, such deviation is not
proscribed.
To enable Domain Owners to receive DMARC feedback without impacting
existing mail processing, discovered policies of "p=none" SHOULD NOT
modify existing mail disposition processing.
Mail Receivers SHOULD also implement reporting instructions of DMARC,
even in the absence of a request for DKIM reporting [<a href="#ref-AFRF-DKIM">AFRF-DKIM</a>] or
SPF reporting [<a href="#ref-AFRF-SPF" title=""Sender Policy Framework (SPF) Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF-SPF</a>]. Furthermore, the presence of such requests
SHOULD NOT affect DMARC reporting.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. DMARC Feedback</span>
Providing Domain Owners with visibility into how Mail Receivers
implement and enforce the DMARC mechanism in the form of feedback is
critical to establishing and maintaining accurate authentication
deployments. When Domain Owners can see what effect their policies
and practices are having, they are better willing and able to use
quarantine and reject policies.
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Verifying External Destinations</span>
It is possible to specify destinations for the different reports that
are outside the authority of the Domain Owner making the request.
This allows domains that do not operate mail servers to request
reports and have them go someplace that is able to receive and
process them.
Without checks, this would allow a bad actor to publish a DMARC
policy record that requests that reports be sent to a victim address,
and then send a large volume of mail that will fail both DKIM and SPF
checks to a wide variety of destinations; the victim will in turn be
flooded with unwanted reports. Therefore, a verification mechanism
is included.
When a Mail Receiver discovers a DMARC policy in the DNS, and the
Organizational Domain at which that record was discovered is not
identical to the Organizational Domain of the host part of the
authority component of a [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>] specified in the "rua" or "ruf" tag,
the following verification steps are to be taken:
1. Extract the host portion of the authority component of the URI.
Call this the "destination host", as it refers to a Report
Receiver.
2. Prepend the string "_report._dmarc".
<span class="grey">Kucherawy & Zwicky Informational [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
3. Prepend the domain name from which the policy was retrieved,
after conversion to an A-label if needed.
4. Query the DNS for a TXT record at the constructed name. If the
result of this request is a temporary DNS error of some kind
(e.g., a timeout), the Mail Receiver MAY elect to temporarily
fail the delivery so the verification test can be repeated later.
5. For each record returned, parse the result as a series of
"tag=value" pairs, i.e., the same overall format as the policy
record (see <a href="#section-6.4">Section 6.4</a>). In particular, the "v=DMARC1" tag is
mandatory and MUST appear first in the list. Discard any that do
not pass this test.
6. If the result includes no TXT resource records that pass basic
parsing, a positive determination of the external reporting
relationship cannot be made; stop.
7. If at least one TXT resource record remains in the set after
parsing, then the external reporting arrangement was authorized
by the Report Receiver.
8. If a "rua" or "ruf" tag is thus discovered, replace the
corresponding value extracted from the domain's DMARC policy
record with the one found in this record. This permits the
Report Receiver to override the report destination. However, to
prevent loops or indirect abuse, the overriding URI MUST use the
same destination host from the first step.
For example, if a DMARC policy query for "blue.example.com" contained
"rua=mailto:reports@red.example.net", the host extracted from the
latter ("red.example.net") does not match "blue.example.com", so this
procedure is enacted. A TXT query for
"blue.example.com._report._dmarc.red.example.net" is issued. If a
single reply comes back containing a tag of "v=DMARC1", then the
relationship between the two is confirmed. Moreover,
"red.example.net" has the opportunity to override the report
destination requested by "blue.example.com" if needed.
Where the above algorithm fails to confirm that the external
reporting was authorized by the Report Receiver, the URI MUST be
ignored by the Mail Receiver generating the report. Further, if the
confirming record includes a URI whose host is again different than
the domain publishing that override, the Mail Receiver generating the
report MUST NOT generate a report to either the original or the
override URI.
<span class="grey">Kucherawy & Zwicky Informational [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
A Report Receiver publishes such a record in its DNS if it wishes to
receive reports for other domains.
A Report Receiver that is willing to receive reports for any domain
can use a wildcard DNS record. For example, a TXT resource record at
"*._report._dmarc.example.com" containing at least "v=DMARC1"
confirms that example.com is willing to receive DMARC reports for any
domain.
If the Report Receiver is overcome by volume, it can simply remove
the confirming DNS record. However, due to positive caching, the
change could take as long as the time-to-live (TTL) on the record to
go into effect.
A Mail Receiver might decide not to enact this procedure if, for
example, it relies on a local list of domains for which external
reporting addresses are permitted.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Aggregate Reports</span>
The DMARC aggregate feedback report is designed to provide Domain
Owners with precise insight into:
o authentication results,
o corrective action that needs to be taken by Domain Owners, and
o the effect of Domain Owner DMARC policy on email streams processed
by Mail Receivers.
Aggregate DMARC feedback provides visibility into real-world email
streams that Domain Owners need to make informed decisions regarding
the publication of DMARC policy. When Domain Owners know what
legitimate mail they are sending, what the authentication results are
on that mail, and what forged mail receivers are getting, they can
make better decisions about the policies they need and the steps they
need to take to enable those policies. When Domain Owners set
policies appropriately and understand their effects, Mail Receivers
can act on them confidently.
Visibility comes in the form of daily (or more frequent) Mail
Receiver-originated feedback reports that contain aggregate data on
message streams relevant to the Domain Owner. This information
includes data about messages that passed DMARC authentication as well
as those that did not.
The format for these reports is defined in <a href="#appendix-C">Appendix C</a>.
<span class="grey">Kucherawy & Zwicky Informational [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
The report SHOULD include the following data:
o The DMARC policy discovered and applied, if any
o The selected message disposition
o The identifier evaluated by SPF and the SPF result, if any
o The identifier evaluated by DKIM and the DKIM result, if any
o For both DKIM and SPF, an indication of whether the identifier was
in alignment
o Data for each Domain Owner's subdomain separately from mail from
the sender's Organizational Domain, even if there is no explicit
subdomain policy
o Sending and receiving domains
o The policy requested by the Domain Owner and the policy actually
applied (if different)
o The number of successful authentications
o The counts of messages based on all messages received, even if
their delivery is ultimately blocked by other filtering agents
Note that Domain Owners or their agents may change the published
DMARC policy for a domain or subdomain at any time. From a Mail
Receiver's perspective, this will occur during a reporting period and
may be noticed during that period, at the end of that period when
reports are generated, or during a subsequent reporting period, all
depending on the Mail Receiver's implementation. Under these
conditions, it is possible that a Mail Receiver could do any of the
following:
o generate for such a reporting period a single aggregate report
that includes message dispositions based on the old policy, or a
mix of the two policies, even though the report only contains a
single "policy_published" element;
o generate multiple reports for the same period, one for each
published policy occurring during the reporting period;
o generate a report whose end time occurs when the updated policy
was detected, regardless of any requested report interval.
<span class="grey">Kucherawy & Zwicky Informational [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Such policy changes are expected to be infrequent for any given
domain, whereas more stringent policy monitoring requirements on the
Mail Receiver would produce a very large burden at Internet scale.
Therefore, it is the responsibility of report consumers and Domain
Owners to be aware of this situation and allow for such mixed reports
during the propagation of the new policy to Mail Receivers.
Aggregate reports are most useful when they all cover a common time
period. By contrast, correlation of these reports from multiple
generators when they cover incongruent time periods is difficult or
impossible. Report generators SHOULD, wherever possible, adhere to
hour boundaries for the reporting period they are using. For
example, starting a per-day report at 00:00; starting per-hour
reports at 00:00, 01:00, 02:00; etc. Report generators using a
24-hour report period are strongly encouraged to begin that period at
00:00 UTC, regardless of local timezone or time of report production,
in order to facilitate correlation.
A Mail Receiver discovers reporting requests when it looks up a DMARC
policy record that corresponds to an <a href="./rfc5322">RFC5322</a>.From domain on received
mail. The presence of the "rua" tag specifies where to send
feedback.
<span class="h4"><a class="selflink" id="section-7.2.1" href="#section-7.2.1">7.2.1</a>. Transport</span>
Where the URI specified in a "rua" tag does not specify otherwise, a
Mail Receiver generating a feedback report SHOULD employ a secure
transport mechanism.
The Mail Receiver, after preparing a report, MUST evaluate the
provided reporting URIs in the order given. Any reporting URI that
includes a size limitation exceeded by the generated report (after
compression and after any encoding required by the particular
transport mechanism) MUST NOT be used. An attempt MUST be made to
deliver an aggregate report to every remaining URI, up to the
Receiver's limits on supported URIs.
If transport is not possible because the services advertised by the
published URIs are not able to accept reports (e.g., the URI refers
to a service that is unreachable, or all provided URIs specify size
limits exceeded by the generated record), the Mail Receiver SHOULD
send a short report (see <a href="#section-7.2.2">Section 7.2.2</a>) indicating that a report is
available but could not be sent. The Mail Receiver MAY cache that
data and try again later, or MAY discard data that could not be sent.
<span class="grey">Kucherawy & Zwicky Informational [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h5"><a class="selflink" id="section-7.2.1.1" href="#section-7.2.1.1">7.2.1.1</a>. Email</span>
The message generated by the Mail Receiver MUST be a [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>] message
formatted per [<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>]. The aggregate report itself MUST be included
in one of the parts of the message. A human-readable portion MAY be
included as a MIME part (such as a text/plain part).
The aggregate data MUST be an XML file that SHOULD be subjected to
GZIP compression. Declining to apply compression can cause the
report to be too large for a receiver to process (a commonly observed
receiver limit is ten megabytes); doing the compression increases the
chances of acceptance of the report at some compute cost. The
aggregate data SHOULD be present using the media type "application/
gzip" if compressed (see [<a href="#ref-GZIP" title=""The 'application/zlib' and 'application/gzip' Media Types"">GZIP</a>]), and "text/xml" otherwise. The
filename is typically constructed using the following ABNF:
filename = receiver "!" policy-domain "!" begin-timestamp
"!" end-timestamp [ "!" unique-id ] "." extension
unique-id = 1*(ALPHA / DIGIT)
receiver = domain
; imported from [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>]
policy-domain = domain
begin-timestamp = 1*DIGIT
; seconds since 00:00:00 UTC January 1, 1970
; indicating start of the time range contained
; in the report
end-timestamp = 1*DIGIT
; seconds since 00:00:00 UTC January 1, 1970
; indicating end of the time range contained
; in the report
extension = "xml" / "xml.gz"
The extension MUST be "xml" for a plain XML file, or "xml.gz" for an
XML file compressed using GZIP.
"unique-id" allows an optional unique ID generated by the Mail
Receiver to distinguish among multiple reports generated
simultaneously by different sources within the same Domain Owner.
<span class="grey">Kucherawy & Zwicky Informational [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
For example, this is a possible filename for the gzip file of a
report to the Domain Owner "example.com" from the Mail Receiver
"mail.receiver.example":
mail.receiver.example!example.com!1013662812!1013749130.gz
No specific MIME message structure is required. It is presumed that
the aggregate reporting address will be equipped to extract MIME
parts with the prescribed media type and filename and ignore the
rest.
Email streams carrying DMARC feedback data MUST conform to the DMARC
mechanism, thereby resulting in an aligned "pass" (see <a href="#section-3.1">Section 3.1</a>).
This practice minimizes the risk of report consumers processing
fraudulent reports.
The <a href="./rfc5322">RFC5322</a>.Subject field for individual report submissions SHOULD
conform to the following ABNF:
dmarc-subject = %x52.65.70.6f.72.74 1*FWS ; "Report"
%x44.6f.6d.61.69.6e.3a 1*FWS ; "Domain:"
domain-name 1*FWS ; from <a href="./rfc6376">RFC 6376</a>
%x53.75.62.6d.69.74.74.65.72.3a ; "Submitter:"
1*FWS domain-name 1*FWS
%x52.65.70.6f.72.74.2d.49.44.3a ; "Report-ID:"
msg-id ; from <a href="./rfc5322">RFC 5322</a>
The first domain-name indicates the DNS domain name about which the
report was generated. The second domain-name indicates the DNS
domain name representing the Mail Receiver generating the report.
The purpose of the Report-ID: portion of the field is to enable the
Domain Owner to identify and ignore duplicate reports that might be
sent by a Mail Receiver.
For instance, this is a possible Subject field for a report to the
Domain Owner "example.com" from the Mail Receiver
"mail.receiver.example". It is line-wrapped as allowed by [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>]:
Subject: Report Domain: example.com
Submitter: mail.receiver.example
Report-ID: <2002.02.15.1>
This transport mechanism potentially encounters a problem when
feedback data size exceeds maximum allowable attachment sizes for
either the generator or the consumer. See <a href="#section-7.2.2">Section 7.2.2</a> for further
discussion.
<span class="grey">Kucherawy & Zwicky Informational [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h5"><a class="selflink" id="section-7.2.1.2" href="#section-7.2.1.2">7.2.1.2</a>. Other Methods</span>
The specification as written allows for the addition of other
registered URI schemes to be supported in later versions.
<span class="h4"><a class="selflink" id="section-7.2.2" href="#section-7.2.2">7.2.2</a>. Error Reports</span>
When a Mail Receiver is unable to complete delivery of a report via
any of the URIs listed by the Domain Owner, the Mail Receiver SHOULD
generate an error message. An attempt MUST be made to send this
report to all listed "mailto" URIs, and it MAY also be sent to any or
all other listed URIs.
The error report MUST be formatted per [<a href="#ref-MIME" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">MIME</a>]. A text/plain part
MUST be included that contains field-value pairs such as those found
in Section 2 of [<a href="#ref-DSN" title=""An Extensible Message Format for Delivery Status Notifications"">DSN</a>]. The fields required, which may appear in any
order, are as follows:
Report-Date: A [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>]-formatted date expression indicating when the
transport failure occurred.
Report-Domain: The domain-name about which the failed report was
generated.
Report-ID: The Report-ID: that the report tried to use.
Report-Size: The size, in bytes, of the report that was unable to be
sent. This MUST represent the number of bytes that the Mail
Receiver attempted to send. Where more than one transport system
was attempted, the sizes may be different; in such cases, separate
error reports MUST be generated so that this value matches the
actual attempt that was made.
Submitter: The domain-name representing the Mail Receiver that
generated, but was unable to submit, the report.
Submitting-URI: The URI(s) to which the Mail Receiver tried, but
failed, to submit the report.
An additional text/plain part MAY be included that gives a human-
readable explanation of the above and MAY also include a URI that can
be used to seek assistance.
<span class="grey">Kucherawy & Zwicky Informational [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Failure Reports</span>
Failure reports are normally generated and sent almost immediately
after the Mail Receiver detects a DMARC failure. Rather than waiting
for an aggregate report, these reports are useful for quickly
notifying the Domain Owners when there is an authentication failure.
Whether the failure is due to an infrastructure problem or the
message is inauthentic, failure reports also provide more information
about the failed message than is available in an aggregate report.
These reports SHOULD include any URI(s) from the message that failed
authentication. These reports SHOULD include as much of the message
and message header as is reasonable to support the Domain Owner's
investigation into what caused the message to fail authentication and
track down the sender.
When a Domain Owner requests failure reports for the purpose of
forensic analysis, and the Mail Receiver is willing to provide such
reports, the Mail Receiver generates and sends a message using the
format described in [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>]; this document updates that reporting
format, as described in <a href="#section-7.3.1">Section 7.3.1</a>.
The destination(s) and nature of the reports are defined by the "ruf"
and "fo" tags as defined in <a href="#section-6.3">Section 6.3</a>.
Where multiple URIs are selected to receive failure reports, the
report generator MUST make an attempt to deliver to each of them.
An obvious consideration is the denial-of-service attack that can be
perpetrated by an attacker who sends numerous messages purporting to
be from the intended victim Domain Owner but that fail both SPF and
DKIM; this would cause participating Mail Receivers to send failure
reports to the Domain Owner or its delegate in potentially huge
volumes. Accordingly, participating Mail Receivers are encouraged to
aggregate these reports as much as is practical, using the Incidents
field of the Abuse Reporting Format ([<a href="#ref-ARF" title=""An Extensible Format for Email Feedback Reports"">ARF</a>]). Various aggregation
techniques are possible, including the following:
o only send a report to the first recipient of multi-recipient
messages;
o store reports for a period of time before sending them, allowing
detection, collection, and reporting of like incidents;
o apply rate limiting, such as a maximum number of reports per
minute that will be generated (and the remainder discarded).
<span class="grey">Kucherawy & Zwicky Informational [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h4"><a class="selflink" id="section-7.3.1" href="#section-7.3.1">7.3.1</a>. Reporting Format Update</span>
Operators implementing this specification also implement an augmented
version of [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>] as follows:
1. A DMARC failure report includes the following ARF header fields,
with the indicated normative requirement levels:
* Identity-Alignment (REQUIRED; defined below)
* Delivery-Result (OPTIONAL)
* DKIM-Domain, DKIM-Identity, DKIM-Selector (REQUIRED if the
message was signed by DKIM)
* DKIM-Canonicalized-Header, DKIM-Canonicalized-Body (OPTIONAL
if the message was signed by DKIM)
* SPF-DNS (REQUIRED)
2. The "Identity-Alignment" field is defined to contain a comma-
separated list of authentication mechanism names that produced an
aligned identity, or the keyword "none" if none did. ABNF:
id-align = "Identity-Alignment:" [CFWS]
( "none" /
dmarc-method *( [CFWS] "," [CFWS] dmarc-method ) )
[CFWS]
dmarc-method = ( "dkim" / "spf" )
; each may appear at most once in an id-align
3. Authentication Failure Type "dmarc" is defined, which is to be
used when a failure report is generated because some or all of
the authentication mechanisms failed to produce aligned
identifiers. Note that a failure report generator MAY also
independently produce an AFRF message for any or all of the
underlying authentication methods.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Minimum Implementations</span>
A minimum implementation of DMARC has the following characteristics:
o Is able to send and/or receive reports at least daily;
o Is able to send and/or receive reports using "mailto" URIs;
<span class="grey">Kucherawy & Zwicky Informational [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
o Other than in exceptional circumstances such as resource
exhaustion, can generate or accept a report up to ten megabytes in
size;
o If acting as a Mail Receiver, fully implements the provisions of
<a href="#section-6.6">Section 6.6</a>.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Privacy Considerations</span>
This section discusses security issues specific to private data that
may be included in the interactions that are part of DMARC.
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Data Exposure Considerations</span>
Aggregate reports are limited in scope to DMARC policy and
disposition results, to information pertaining to the underlying
authentication mechanisms, and to the identifiers involved in DMARC
validation.
Failed-message reporting provides message-specific details pertaining
to authentication failures. Individual reports can contain message
content as well as trace header fields. Domain Owners are able to
analyze individual reports and attempt to determine root causes of
authentication mechanism failures, gain insight into
misconfigurations or other problems with email and network
infrastructure, or inspect messages for insight into abusive
practices.
Both report types may expose sender and recipient identifiers (e.g.,
<a href="./rfc5322">RFC5322</a>.From addresses), and although the [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>] format used for
failed-message reporting supports redaction, failed-message reporting
is capable of exposing the entire message to the report recipient.
Domain Owners requesting reports will receive information about mail
claiming to be from them, which includes mail that was not, in fact,
from them. Information about the final destination of mail where it
might otherwise be obscured by intermediate systems will therefore be
exposed.
When message-forwarding arrangements exist, Domain Owners requesting
reports will also receive information about mail forwarded to domains
that were not originally part of their messages' recipient lists.
This means that destination domains previously unknown to the Domain
Owner may now become visible.
Disclosure of information about the messages is being requested by
the entity generating the email in the first place, i.e., the Domain
Owner and not the Mail Receiver, so this may not fit squarely within
<span class="grey">Kucherawy & Zwicky Informational [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
existing privacy policy provisions. For some providers, aggregate
reporting and failed-message reporting are viewed as a function
similar to complaint reporting about spamming or phishing and are
treated similarly under the privacy policy. Report generators (i.e.,
Mail Receivers) are encouraged to review their reporting limitations
under such policies before enabling DMARC reporting.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Report Recipients</span>
A DMARC record can specify that reports should be sent to an
intermediary operating on behalf of the Domain Owner. This is done
when the Domain Owner contracts with an entity to monitor mail
streams for abuse and performance issues. Receipt by third parties
of such data may or may not be permitted by the Mail Receiver's
privacy policy, terms of use, or other similar governing document.
Domain Owners and Mail Receivers should both review and understand if
their own internal policies constrain the use and transmission of
DMARC reporting.
Some potential exists for report recipients to perform traffic
analysis, making it possible to obtain metadata about the Receiver's
traffic. In addition to verifying compliance with policies,
Receivers need to consider that before sending reports to a third
party.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Other Topics</span>
This section discusses some topics regarding choices made in the
development of DMARC, largely to commit the history to record.
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Issues Specific to SPF</span>
Though DMARC does not inherently change the semantics of an SPF
policy record, historically lax enforcement of such policies has led
many to publish extremely broad records containing many large network
ranges. Domain Owners are strongly encouraged to carefully review
their SPF records to understand which networks are authorized to send
on behalf of the Domain Owner before publishing a DMARC record.
Some receiver architectures might implement SPF in advance of any
DMARC operations. This means that a "-" prefix on a sender's SPF
mechanism, such as "-all", could cause that rejection to go into
effect early in handling, causing message rejection before any DMARC
processing takes place. Operators choosing to use "-all" should be
aware of this.
<span class="grey">Kucherawy & Zwicky Informational [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. DNS Load and Caching</span>
DMARC policies are communicated using the DNS and therefore inherit a
number of considerations related to DNS caching. The inherent
conflict between freshness and the impact of caching on the reduction
of DNS-lookup overhead should be considered from the Mail Receiver's
point of view. Should Domain Owners publish a DNS record with a very
short TTL, Mail Receivers can be provoked through the injection of
large volumes of messages to overwhelm the Domain Owner's DNS.
Although this is not a concern specific to DMARC, the implications of
a very short TTL should be considered when publishing DMARC policies.
Conversely, long TTLs will cause records to be cached for long
periods of time. This can cause a critical change to DMARC
parameters advertised by a Domain Owner to go unnoticed for the
length of the TTL (while waiting for DNS caches to expire). Avoiding
this problem can mean shorter TTLs, with the potential problems
described above. A balance should be sought to maintain
responsiveness of DMARC preference changes while preserving the
benefits of DNS caching.
<span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. Rejecting Messages</span>
This proposal calls for rejection of a message during the SMTP
session under certain circumstances. This is preferable to
generation of a Delivery Status Notification ([<a href="#ref-DSN" title=""An Extensible Message Format for Delivery Status Notifications"">DSN</a>]), since
fraudulent messages caught and rejected using DMARC would then result
in annoying generation of such failure reports that go back to the
<a href="./rfc5321">RFC5321</a>.MailFrom address.
This synchronous rejection is typically done in one of two ways:
o Full rejection, wherein the SMTP server issues a 5xy reply code as
an indication to the SMTP client that the transaction failed; the
SMTP client is then responsible for generating notification that
delivery failed (see Section 4.2.5 of [<a href="#ref-SMTP" title=""Simple Mail Transfer Protocol"">SMTP</a>]).
o A "silent discard", wherein the SMTP server returns a 2xy reply
code implying to the client that delivery (or, at least, relay)
was successfully completed, but then simply discarding the message
with no further action.
Each of these has a cost. For instance, a silent discard can help to
prevent backscatter, but it also effectively means that the SMTP
server has to be programmed to give a false result, which can
confound external debugging efforts.
<span class="grey">Kucherawy & Zwicky Informational [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Similarly, the text portion of the SMTP reply may be important to
consider. For example, when rejecting a message, revealing the
reason for the rejection might give an attacker enough information to
bypass those efforts on a later attempt, though it might also assist
a legitimate client to determine the source of some local issue that
caused the rejection.
In the latter case, when doing an SMTP rejection, providing a clear
hint can be useful in resolving issues. A receiver might indicate in
plain text the reason for the rejection by using the word "DMARC"
somewhere in the reply text. Many systems are able to scan the SMTP
reply text to determine the nature of the rejection. Thus, providing
a machine-detectable reason for rejection allows the problems causing
rejections to be properly addressed by automated systems. For
example:
550 5.7.1 Email rejected per DMARC policy for example.com
If a Mail Receiver elects to defer delivery due to inability to
retrieve or apply DMARC policy, this is best done with a 4xy SMTP
reply code.
<span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a>. Identifier Alignment Considerations</span>
The DMARC mechanism allows both DKIM and SPF-authenticated
identifiers to authenticate email on behalf of a Domain Owner and,
possibly, on behalf of different subdomains. If malicious or unaware
users can gain control of the SPF record or DKIM selector records for
a subdomain, the subdomain can be used to generate DMARC-passing
email on behalf of the Organizational Domain.
For example, an attacker who controls the SPF record for
"evil.example.com" can send mail with an <a href="./rfc5322">RFC5322</a>.From field
containing "foo@example.com" that can pass both authentication and
the DMARC check against "example.com".
The Organizational Domain administrator should be careful not to
delegate control of subdomains if this is an issue, and to consider
using the "strict" Identifier Alignment option if appropriate.
<span class="h3"><a class="selflink" id="section-10.5" href="#section-10.5">10.5</a>. Interoperability Issues</span>
DMARC limits which end-to-end scenarios can achieve a "pass" result.
Because DMARC relies on [<a href="#ref-SPF" title=""Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1"">SPF</a>] and/or [<a href="#ref-DKIM" title=""DomainKeys Identified Mail (DKIM) Signatures"">DKIM</a>] to achieve a "pass",
their limitations also apply.
<span class="grey">Kucherawy & Zwicky Informational [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Additional DMARC constraints occur when a message is processed by
some Mediators, such as mailing lists. Transiting a Mediator often
causes either the authentication to fail or Identifier Alignment to
be lost. These transformations may conform to standards but will
still prevent a DMARC "pass".
In addition to Mediators, mail that is sent by authorized,
independent third parties might not be sent with Identifier
Alignment, also preventing a "pass" result.
Issues specific to the use of policy mechanisms alongside DKIM are
further discussed in [<a href="#ref-DKIM-LISTS">DKIM-LISTS</a>], particularly <a href="#section-5.2">Section 5.2</a>.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. IANA Considerations</span>
This section describes actions completed by IANA.
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Authentication-Results Method Registry Update</span>
IANA has added the following to the "Email Authentication Methods"
registry:
Method: dmarc
Defined: <a href="./rfc7489">RFC 7489</a>
ptype: header
Property: from
Value: the domain portion of the <a href="./rfc5322">RFC5322</a>.From field
Status: active
Version: 1
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Authentication-Results Result Registry Update</span>
IANA has added the following in the "Email Authentication Result
Names" registry:
Code: none
Existing/New Code: existing
Defined: [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Auth Method: dmarc (added)
<span class="grey">Kucherawy & Zwicky Informational [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Meaning: No DMARC policy record was published for the aligned
identifier, or no aligned identifier could be extracted.
Status: active
Code: pass
Existing/New Code: existing
Defined: [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Auth Method: dmarc (added)
Meaning: A DMARC policy record was published for the aligned
identifier, and at least one of the authentication mechanisms
passed.
Status: active
Code: fail
Existing/New Code: existing
Defined: [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Auth Method: dmarc (added)
Meaning: A DMARC policy record was published for the aligned
identifier, and none of the authentication mechanisms passed.
Status: active
Code: temperror
Existing/New Code: existing
Defined: [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Auth Method: dmarc (added)
Meaning: A temporary error occurred during DMARC evaluation. A
later attempt might produce a final result.
Status: active
<span class="grey">Kucherawy & Zwicky Informational [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Code: permerror
Existing/New Code: existing
Defined: [<a href="#ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Auth Method: dmarc (added)
Meaning: A permanent error occurred during DMARC evaluation, such as
encountering a syntactically incorrect DMARC record. A later
attempt is unlikely to produce a final result.
Status: active
<span class="h3"><a class="selflink" id="section-11.3" href="#section-11.3">11.3</a>. Feedback Report Header Fields Registry Update</span>
The following has been added to the "Feedback Report Header Fields"
registry:
Field Name: Identity-Alignment
Description: indicates whether the message about which a report is
being generated had any identifiers in alignment as defined in
<a href="./rfc7489">RFC 7489</a>
Multiple Appearances: No
Related "Feedback-Type": auth-failure
Reference: <a href="./rfc7489">RFC 7489</a>
Status: current
<span class="h3"><a class="selflink" id="section-11.4" href="#section-11.4">11.4</a>. DMARC Tag Registry</span>
A new registry tree called "Domain-based Message Authentication,
Reporting, and Conformance (DMARC) Parameters" has been created.
Within it, a new sub-registry called the "DMARC Tag Registry" has
been created.
Names of DMARC tags must be registered with IANA in this new
sub-registry. New entries are assigned only for values that have
been documented in a manner that satisfies the terms of Specification
Required, per [<a href="#ref-IANA-CONSIDERATIONS">IANA-CONSIDERATIONS</a>]. Each registration must include
the tag name; the specification that defines it; a brief description;
and its status, which must be one of "current", "experimental", or
"historic". The Designated Expert needs to confirm that the provided
<span class="grey">Kucherawy & Zwicky Informational [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
specification adequately describes the new tag and clearly presents
how it would be used within the DMARC context by Domain Owners and
Mail Receivers.
To avoid version compatibility issues, tags added to the DMARC
specification are to avoid changing the semantics of existing records
when processed by implementations conforming to prior specifications.
The initial set of entries in this registry is as follows:
+----------+-------------+---------+------------------------------+
| Tag Name | Reference | Status | Description |
+----------+-------------+---------+------------------------------+
| adkim | <a href="./rfc7489">RFC 7489</a> | current | DKIM alignment mode |
+----------+-------------+---------+------------------------------+
| aspf | <a href="./rfc7489">RFC 7489</a> | current | SPF alignment mode |
+----------+-------------+---------+------------------------------+
| fo | <a href="./rfc7489">RFC 7489</a> | current | Failure reporting options |
+----------+-------------+---------+------------------------------+
| p | <a href="./rfc7489">RFC 7489</a> | current | Requested handling policy |
+----------+-------------+---------+------------------------------+
| pct | <a href="./rfc7489">RFC 7489</a> | current | Sampling rate |
+----------+-------------+---------+------------------------------+
| rf | <a href="./rfc7489">RFC 7489</a> | current | Failure reporting format(s) |
+----------+-------------+---------+------------------------------+
| ri | <a href="./rfc7489">RFC 7489</a> | current | Aggregate Reporting interval |
+----------+-------------+---------+------------------------------+
| rua | <a href="./rfc7489">RFC 7489</a> | current | Reporting URI(s) for |
| | | | aggregate data |
+----------+-------------+---------+------------------------------+
| ruf | <a href="./rfc7489">RFC 7489</a> | current | Reporting URI(s) for |
| | | | failure data |
+----------+-------------+---------+------------------------------+
| sp | <a href="./rfc7489">RFC 7489</a> | current | Requested handling policy |
| | | | for subdomains |
+----------+-------------+---------+------------------------------+
| v | <a href="./rfc7489">RFC 7489</a> | current | Specification version |
+----------+-------------+---------+------------------------------+
<span class="h3"><a class="selflink" id="section-11.5" href="#section-11.5">11.5</a>. DMARC Report Format Registry</span>
Also within "Domain-based Message Authentication, Reporting, and
Conformance (DMARC) Parameters", a new sub-registry called "DMARC
Report Format Registry" has been created.
Names of DMARC failure reporting formats must be registered with IANA
in this registry. New entries are assigned only for values that
satisfy the definition of Specification Required, per
<span class="grey">Kucherawy & Zwicky Informational [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
[<a href="#ref-IANA-CONSIDERATIONS">IANA-CONSIDERATIONS</a>]. In addition to a reference to a permanent
specification, each registration must include the format name; a
brief description; and its status, which must be one of "current",
"experimental", or "historic". The Designated Expert needs to
confirm that the provided specification adequately describes the
report format and clearly presents how it would be used within the
DMARC context by Domain Owners and Mail Receivers.
The initial entry in this registry is as follows:
+--------+-------------+---------+-----------------------------+
| Format | Reference | Status | Description |
| Name | | | |
+--------+-------------+---------+-----------------------------+
| afrf | <a href="./rfc7489">RFC 7489</a> | current | Authentication Failure |
| | | | Reporting Format (see |
| | | | [<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>]) |
+--------+-------------+---------+-----------------------------+
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Security Considerations</span>
This section discusses security issues and possible remediations
(where available) for DMARC.
<span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. Authentication Methods</span>
Security considerations from the authentication methods used by DMARC
are incorporated here by reference.
<span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. Attacks on Reporting URIs</span>
URIs published in DNS TXT records are well-understood possible
targets for attack. Specifications such as [<a href="#ref-DNS" title=""Domain names - implementation and specification"">DNS</a>] and [<a href="#ref-ROLES" title=""Mailbox Names for Common Services, Roles and Functions"">ROLES</a>] either
expose or cause the exposure of email addresses that could be flooded
by an attacker, for example; MX, NS, and other records found in the
DNS advertise potential attack destinations; common DNS names such as
"www" plainly identify the locations at which particular services can
be found, providing destinations for targeted denial-of-service or
penetration attacks.
Thus, Domain Owners will need to harden these addresses against
various attacks, including but not limited to:
o high-volume denial-of-service attacks;
o deliberate construction of malformed reports intended to identify
or exploit parsing or processing vulnerabilities;
<span class="grey">Kucherawy & Zwicky Informational [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
o deliberate construction of reports containing false claims for the
Submitter or Reported-Domain fields, including the possibility of
false data from compromised but known Mail Receivers.
<span class="h3"><a class="selflink" id="section-12.3" href="#section-12.3">12.3</a>. DNS Security</span>
The DMARC mechanism and its underlying technologies (SPF, DKIM)
depend on the security of the DNS. To reduce the risk of subversion
of the DMARC mechanism due to DNS-based exploits, serious
consideration should be given to the deployment of DNSSEC in parallel
with the deployment of DMARC by both Domain Owners and Mail
Receivers.
Publication of data using DNSSEC is relevant to Domain Owners and
third-party Report Receivers. DNSSEC-aware resolution is relevant to
Mail Receivers and Report Receivers.
<span class="h3"><a class="selflink" id="section-12.4" href="#section-12.4">12.4</a>. Display Name Attacks</span>
A common attack in messaging abuse is the presentation of false
information in the display-name portion of the <a href="./rfc5322">RFC5322</a>.From field.
For example, it is possible for the email address in that field to be
an arbitrary address or domain name, while containing a well-known
name (a person, brand, role, etc.) in the display name, intending to
fool the end user into believing that the name is used legitimately.
The attack is predicated on the notion that most common MUAs will
show the display name and not the email address when both are
available.
Generally, display name attacks are out of scope for DMARC, as
further exploration of possible defenses against these attacks needs
to be undertaken.
There are a few possible mechanisms that attempt mitigation of these
attacks, such as the following:
o If the display name is found to include an email address (as
specified in [<a href="#ref-MAIL" title=""Internet Message Format"">MAIL</a>]), execute the DMARC mechanism on the domain
name found there rather than the domain name discovered
originally. However, this addresses only a very specific attack
space, and spoofers can easily circumvent it by simply not using
an email address in the display name. There are also known cases
of legitimate uses of an email address in the display name with a
domain different from the one in the address portion, e.g.,
From: "user@example.org via Bug Tracker" <support@example.com>
<span class="grey">Kucherawy & Zwicky Informational [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
o In the MUA, only show the display name if the DMARC mechanism
succeeds. This too is easily defeated, as an attacker could
arrange to pass the DMARC tests while fraudulently using another
domain name in the display name.
o In the MUA, only show the display name if the DMARC mechanism
passes and the email address thus validated matches one found in
the receiving user's list of known addresses.
<span class="h3"><a class="selflink" id="section-12.5" href="#section-12.5">12.5</a>. External Reporting Addresses</span>
To avoid abuse by bad actors, reporting addresses generally have to
be inside the domains about which reports are requested. In order to
accommodate special cases such as a need to get reports about domains
that cannot actually receive mail, <a href="#section-7.1">Section 7.1</a> describes a DNS-based
mechanism for verifying approved external reporting.
The obvious consideration here is an increased DNS load against
domains that are claimed as external recipients. Negative caching
will mitigate this problem, but only to a limited extent, mostly
dependent on the default TTL in the domain's SOA record.
Where possible, external reporting is best achieved by having the
report be directed to domains that can receive mail and simply having
it automatically forwarded to the desired external destination.
Note that the addresses shown in the "ruf" tag receive more
information that might be considered private data, since it is
possible for actual email content to appear in the failure reports.
The URIs identified there are thus more attractive targets for
intrusion attempts than those found in the "rua" tag. Moreover,
attacking the DNS of the subject domain to cause failure data to be
routed fraudulently to an attacker's systems may be an attractive
prospect. Deployment of [<a href="#ref-DNSSEC" title=""DNS Security Introduction and Requirements"">DNSSEC</a>] is advisable if this is a concern.
The verification mechanism presented in <a href="#section-7.1">Section 7.1</a> is currently not
mandatory ("MUST") but strongly recommended ("SHOULD"). It is
possible that it would be elevated to a "MUST" by later security
review.
<span class="h3"><a class="selflink" id="section-12.6" href="#section-12.6">12.6</a>. Secure Protocols</span>
This document encourages use of secure transport mechanisms to
prevent loss of private data to third parties that may be able to
monitor such transmissions. Unencrypted mechanisms should be
avoided.
<span class="grey">Kucherawy & Zwicky Informational [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
In particular, a message that was originally encrypted or otherwise
secured might appear in a report that is not sent securely, which
could reveal private information.
<span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. References</span>
<span class="h3"><a class="selflink" id="section-13.1" href="#section-13.1">13.1</a>. Normative References</span>
[<a id="ref-ABNF">ABNF</a>] Crocker, D., Ed., and P. Overell, "Augmented BNF for
Syntax Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>,
January 2008, <<a href="http://www.rfc-editor.org/info/rfc5234">http://www.rfc-editor.org/info/rfc5234</a>>.
[<a id="ref-AFRF">AFRF</a>] Fontana, H., "Authentication Failure Reporting Using the
Abuse Reporting Format", <a href="./rfc6591">RFC 6591</a>, April 2012,
<<a href="http://www.rfc-editor.org/info/rfc6591">http://www.rfc-editor.org/info/rfc6591</a>>.
[<a id="ref-AFRF-DKIM">AFRF-DKIM</a>]
Kucherawy, M., "Extensions to DomainKeys Identified Mail
(DKIM) for Failure Reporting", <a href="./rfc6651">RFC 6651</a>, June 2012,
<<a href="http://www.rfc-editor.org/info/rfc6651">http://www.rfc-editor.org/info/rfc6651</a>>.
[<a id="ref-AFRF-SPF">AFRF-SPF</a>] Kitterman, S., "Sender Policy Framework (SPF)
Authentication Failure Reporting Using the Abuse Reporting
Format", <a href="./rfc6652">RFC 6652</a>, June 2012,
<<a href="http://www.rfc-editor.org/info/rfc6652">http://www.rfc-editor.org/info/rfc6652</a>>.
[<a id="ref-DKIM">DKIM</a>] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed.,
"DomainKeys Identified Mail (DKIM) Signatures", STD 76,
<a href="./rfc6376">RFC 6376</a>, September 2011, <<a href="http://www.rfc-editor.org/info/rfc6376">http://www.rfc-editor.org/</a>
<a href="http://www.rfc-editor.org/info/rfc6376">info/rfc6376</a>>.
[<a id="ref-DNS">DNS</a>] Mockapetris, P., "Domain names - implementation and
specification", STD 13, <a href="./rfc1035">RFC 1035</a>, November 1987,
<<a href="http://www.rfc-editor.org/info/rfc1035">http://www.rfc-editor.org/info/rfc1035</a>>.
[<a id="ref-DNS-CASE">DNS-CASE</a>] Eastlake 3rd, D., "Domain Name System (DNS) Case
Insensitivity Clarification", <a href="./rfc4343">RFC 4343</a>, January 2006,
<<a href="http://www.rfc-editor.org/info/rfc4343">http://www.rfc-editor.org/info/rfc4343</a>>.
[<a id="ref-GZIP">GZIP</a>] Levine, J., "The 'application/zlib' and 'application/gzip'
Media Types", <a href="./rfc6713">RFC 6713</a>, August 2012,
<<a href="http://www.rfc-editor.org/info/rfc6713">http://www.rfc-editor.org/info/rfc6713</a>>.
[<a id="ref-IDNA">IDNA</a>] Klensin, J., "Internationalized Domain Names for
Applications (IDNA): Definitions and Document Framework",
<a href="./rfc5890">RFC 5890</a>, August 2010,
<<a href="http://www.rfc-editor.org/info/rfc5890">http://www.rfc-editor.org/info/rfc5890</a>>.
<span class="grey">Kucherawy & Zwicky Informational [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
[<a id="ref-KEYWORDS">KEYWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-MAIL">MAIL</a>] Resnick, P., Ed., "Internet Message Format", <a href="./rfc5322">RFC 5322</a>,
October 2008, <<a href="http://www.rfc-editor.org/info/rfc5322">http://www.rfc-editor.org/info/rfc5322</a>>.
[<a id="ref-MIME">MIME</a>] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message
Bodies", <a href="./rfc2045">RFC 2045</a>, November 1996,
<<a href="http://www.rfc-editor.org/info/rfc2045">http://www.rfc-editor.org/info/rfc2045</a>>.
[<a id="ref-SEC-TERMS">SEC-TERMS</a>]
Shirey, R., "Internet Security Glossary, Version 2",
FYI 36, <a href="./rfc4949">RFC 4949</a>, August 2007,
<<a href="http://www.rfc-editor.org/info/rfc4949">http://www.rfc-editor.org/info/rfc4949</a>>.
[<a id="ref-SMTP">SMTP</a>] Klensin, J., "Simple Mail Transfer Protocol", <a href="./rfc5321">RFC 5321</a>,
October 2008, <<a href="http://www.rfc-editor.org/info/rfc5321">http://www.rfc-editor.org/info/rfc5321</a>>.
[<a id="ref-SPF">SPF</a>] Kitterman, S., "Sender Policy Framework (SPF) for
Authorizing Use of Domains in Email, Version 1", <a href="./rfc7208">RFC 7208</a>,
April 2014, <<a href="http://www.rfc-editor.org/info/rfc7208">http://www.rfc-editor.org/info/rfc7208</a>>.
[<a id="ref-URI">URI</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
<a href="./rfc3986">RFC 3986</a>, January 2005,
<<a href="http://www.rfc-editor.org/info/rfc3986">http://www.rfc-editor.org/info/rfc3986</a>>.
<span class="h3"><a class="selflink" id="section-13.2" href="#section-13.2">13.2</a>. Informative References</span>
[<a id="ref-ADSP">ADSP</a>] Allman, E., Fenton, J., Delany, M., and J. Levine,
"DomainKeys Identified Mail (DKIM) Author Domain Signing
Practices (ADSP)", <a href="./rfc5617">RFC 5617</a>, August 2009,
<<a href="http://www.rfc-editor.org/info/rfc5617">http://www.rfc-editor.org/info/rfc5617</a>>.
[<a id="ref-ARF">ARF</a>] Shafranovich, Y., Levine, J., and M. Kucherawy, "An
Extensible Format for Email Feedback Reports", <a href="./rfc5965">RFC 5965</a>,
August 2010, <<a href="http://www.rfc-editor.org/info/rfc5965">http://www.rfc-editor.org/info/rfc5965</a>>.
[<a id="ref-AUTH-RESULTS">AUTH-RESULTS</a>]
Kucherawy, M., "Message Header Field for Indicating
Message Authentication Status", <a href="./rfc7001">RFC 7001</a>, September 2013,
<<a href="http://www.rfc-editor.org/info/rfc7001">http://www.rfc-editor.org/info/rfc7001</a>>.
<span class="grey">Kucherawy & Zwicky Informational [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
[<a id="ref-Best-Guess-SPF">Best-Guess-SPF</a>]
Kitterman, S., "Sender Policy Framework: Best guess record
(FAQ entry)", May 2010,
<<a href="http://www.openspf.org/FAQ/Best_guess_record">http://www.openspf.org/FAQ/Best_guess_record</a>>.
[<a id="ref-DKIM-DEPLOYMENT">DKIM-DEPLOYMENT</a>]
Hansen, T., Siegel, E., Hallam-Baker, P., and D. Crocker,
"DomainKeys Identified Mail (DKIM) Development,
Deployment, and Operations", <a href="./rfc5863">RFC 5863</a>, May 2010,
<<a href="http://www.rfc-editor.org/info/rfc5863">http://www.rfc-editor.org/info/rfc5863</a>>.
[<a id="ref-DKIM-LISTS">DKIM-LISTS</a>]
Kucherawy, M., "DomainKeys Identified Mail (DKIM) and
Mailing Lists", <a href="https://www.rfc-editor.org/bcp/bcp167">BCP 167</a>, <a href="./rfc6377">RFC 6377</a>, September 2011,
<<a href="http://www.rfc-editor.org/info/rfc6377">http://www.rfc-editor.org/info/rfc6377</a>>.
[<a id="ref-DKIM-OVERVIEW">DKIM-OVERVIEW</a>]
Hansen, T., Crocker, D., and P. Hallam-Baker, "DomainKeys
Identified Mail (DKIM) Service Overview", <a href="./rfc5585">RFC 5585</a>,
July 2009, <<a href="http://www.rfc-editor.org/info/rfc5585">http://www.rfc-editor.org/info/rfc5585</a>>.
[<a id="ref-DKIM-THREATS">DKIM-THREATS</a>]
Fenton, J., "Analysis of Threats Motivating DomainKeys
Identified Mail (DKIM)", <a href="./rfc4686">RFC 4686</a>, September 2006,
<<a href="http://www.rfc-editor.org/info/rfc4686">http://www.rfc-editor.org/info/rfc4686</a>>.
[<a id="ref-DNSSEC">DNSSEC</a>] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
<a href="./rfc4033">RFC 4033</a>, March 2005,
<<a href="http://www.rfc-editor.org/info/rfc4033">http://www.rfc-editor.org/info/rfc4033</a>>.
[<a id="ref-DSN">DSN</a>] Moore, K. and G. Vaudreuil, "An Extensible Message Format
for Delivery Status Notifications", <a href="./rfc3464">RFC 3464</a>,
January 2003, <<a href="http://www.rfc-editor.org/info/rfc3464">http://www.rfc-editor.org/info/rfc3464</a>>.
[<a id="ref-EMAIL-ARCH">EMAIL-ARCH</a>]
Crocker, D., "Internet Mail Architecture", <a href="./rfc5598">RFC 5598</a>,
July 2009, <<a href="http://www.rfc-editor.org/info/rfc5598">http://www.rfc-editor.org/info/rfc5598</a>>.
[<a id="ref-IANA-CONSIDERATIONS">IANA-CONSIDERATIONS</a>]
Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>, <a href="./rfc5226">RFC 5226</a>,
May 2008, <<a href="http://www.rfc-editor.org/info/rfc5226">http://www.rfc-editor.org/info/rfc5226</a>>.
[<a id="ref-ROLES">ROLES</a>] Crocker, D., "Mailbox Names for Common Services, Roles and
Functions", <a href="./rfc2142">RFC 2142</a>, May 1997,
<<a href="http://www.rfc-editor.org/info/rfc2142">http://www.rfc-editor.org/info/rfc2142</a>>.
<span class="grey">Kucherawy & Zwicky Informational [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Technology Considerations</span>
This section documents some design decisions that were made in the
development of DMARC. Specifically, addressed here are some
suggestions that were considered but not included in the design.
This text is included to explain why they were considered and not
included in this version.
<span class="h3"><a class="selflink" id="appendix-A.1" href="#appendix-A.1">A.1</a>. S/MIME</span>
S/MIME, or Secure Multipurpose Internet Mail Extensions, is a
standard for encryption and signing of MIME data in a message. This
was suggested and considered as a third security protocol for
authenticating the source of a message.
DMARC is focused on authentication at the domain level (i.e., the
Domain Owner taking responsibility for the message), while S/MIME is
really intended for user-to-user authentication and encryption. This
alone appears to make it a bad fit for DMARC's goals.
S/MIME also suffers from the heavyweight problem of Public Key
Infrastructure, which means that distribution of keys used to verify
signatures needs to be incorporated. In many instances, this alone
is a showstopper. There have been consistent promises that PKI
usability and deployment will improve, but these have yet to
materialize. DMARC can revisit this choice after those barriers are
addressed.
S/MIME has extensive deployment in specific market segments
(government, for example) but does not enjoy similar widespread
deployment over the general Internet, and this shows no signs of
changing. DKIM and SPF both are deployed widely over the general
Internet, and their adoption rates continue to be positive.
Finally, experiments have shown that including S/MIME support in the
initial version of DMARC would neither cause nor enable a substantial
increase in the accuracy of the overall mechanism.
<span class="grey">Kucherawy & Zwicky Informational [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="appendix-A.2" href="#appendix-A.2">A.2</a>. Method Exclusion</span>
It was suggested that DMARC include a mechanism by which a Domain
Owner could tell Message Receivers not to attempt validation by one
of the supported methods (e.g., "check DKIM, but not SPF").
Specifically, consider a Domain Owner that has deployed one of the
technologies, and that technology fails for some messages, but such
failures don't cause enforcement action. Deploying DMARC would cause
enforcement action for policies other than "none", which would appear
to exclude participation by that Domain Owner.
The DMARC development team evaluated the idea of policy exception
mechanisms on several occasions and invariably concluded that there
was not a strong enough use case to include them. The specific
target audience for DMARC does not appear to have concerns about the
failure modes of one or the other being a barrier to DMARC's
adoption.
In the scenario described above, the Domain Owner has a few options:
1. Tighten up its infrastructure to minimize the failure modes of
the single deployed technology.
2. Deploy the other supported authentication mechanism, to offset
the failure modes of the first.
3. Deploy DMARC in a reporting-only mode.
<span class="h3"><a class="selflink" id="appendix-A.3" href="#appendix-A.3">A.3</a>. Sender Header Field</span>
It has been suggested in several message authentication efforts that
the Sender header field be checked for an identifier of interest, as
the standards indicate this as the proper way to indicate a
re-mailing of content such as through a mailing list. Most recently,
it was a protocol-level option for DomainKeys, but on evolution to
DKIM, this property was removed.
The DMARC development team considered this and decided not to include
support for doing so, for the following reasons:
1. The main user protection approach is to be concerned with what
the user sees when a message is rendered. There is no consistent
behavior among MUAs regarding what to do with the content of the
Sender field, if present. Accordingly, supporting checking of
the Sender identifier would mean applying policy to an identifier
<span class="grey">Kucherawy & Zwicky Informational [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
the end user might never actually see, which can create a vector
for attack against end users by simply forging a Sender field
containing some identifier that DMARC will like.
2. Although it is certainly true that this is what the Sender field
is for, its use in this way is also unreliable, making it a poor
candidate for inclusion in the DMARC evaluation algorithm.
3. Allowing multiple ways to discover policy introduces unacceptable
ambiguity into the DMARC evaluation algorithm in terms of which
policy is to be applied and when.
<span class="h3"><a class="selflink" id="appendix-A.4" href="#appendix-A.4">A.4</a>. Domain Existence Test</span>
A common practice among MTA operators, and indeed one documented in
[<a href="#ref-ADSP" title=""DomainKeys Identified Mail (DKIM) Author Domain Signing Practices (ADSP)"">ADSP</a>], is a test to determine domain existence prior to any more
expensive processing. This is typically done by querying the DNS for
MX, A, or AAAA resource records for the name being evaluated and
assuming that the domain is nonexistent if it could be determined
that no such records were published for that domain name.
The original pre-standardization version of this protocol included a
mandatory check of this nature. It was ultimately removed, as the
method's error rate was too high without substantial manual tuning
and heuristic work. There are indeed use cases this work needs to
address where such a method would return a negative result about a
domain for which reporting is desired, such as a registered domain
name that never sends legitimate mail and thus has none of these
records present in the DNS.
<span class="h3"><a class="selflink" id="appendix-A.5" href="#appendix-A.5">A.5</a>. Issues with ADSP in Operation</span>
DMARC has been characterized as a "super-ADSP" of sorts.
Contributors to DMARC have compiled a list of issues associated with
ADSP, gained from operational experience, that have influenced the
direction of DMARC:
1. ADSP has no support for subdomains, i.e., the ADSP record for
example.com does not explicitly or implicitly apply to
subdomain.example.com. If wildcarding is not applied, then
spammers can trivially bypass ADSP by sending from a subdomain
with no ADSP record.
<span class="grey">Kucherawy & Zwicky Informational [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
2. Nonexistent subdomains are explicitly out of scope in ADSP.
There is nothing in ADSP that states receivers should simply
reject mail from NXDOMAINs regardless of ADSP policy (which of
course allows spammers to trivially bypass ADSP by sending email
from nonexistent subdomains).
3. ADSP has no operational advice on when to look up the ADSP
record.
4. ADSP has no support for using SPF as an auxiliary mechanism to
DKIM.
5. ADSP has no support for a slow rollout, i.e., no way to configure
a percentage of email on which the receiver should apply the
policy. This is important for large-volume senders.
6. ADSP has no explicit support for an intermediate phase where the
receiver quarantines (e.g., sends to the recipient's "spam"
folder) rather than rejects the email.
7. The binding between the "From" header domain and DKIM is too
tight for ADSP; they must match exactly.
<span class="h3"><a class="selflink" id="appendix-A.6" href="#appendix-A.6">A.6</a>. Organizational Domain Discovery Issues</span>
Although protocols like ADSP are useful for "protecting" a specific
domain name, they are not helpful at protecting subdomains. If one
wished to protect "example.com" by requiring via ADSP that all mail
bearing an <a href="./rfc5322">RFC5322</a>.From domain of "example.com" be signed, this would
"protect" that domain; however, one could then craft an email whose
<a href="./rfc5322">RFC5322</a>.From domain is "security.example.com", and ADSP would not
provide any protection. One could use a DNS wildcard, but this can
undesirably interfere with other DNS activity; one could add ADSP
records as fraudulent domains are discovered, but this solution does
not scale and is a purely reactive measure against abuse.
The DNS does not provide a method by which the "domain of record", or
the domain that was actually registered with a domain registrar, can
be determined given an arbitrary domain name. Suggestions have been
made that attempt to glean such information from SOA or NS resource
records, but these too are not fully reliable, as the partitioning of
the DNS is not always done at administrative boundaries.
When seeking domain-specific policy based on an arbitrary domain
name, one could "climb the tree", dropping labels off the left end of
the name until the root is reached or a policy is discovered, but
then one could craft a name that has a large number of nonsense
<span class="grey">Kucherawy & Zwicky Informational [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
labels; this would cause a Mail Receiver to attempt a large number of
queries in search of a policy record. Sending many such messages
constitutes an amplified denial-of-service attack.
The Organizational Domain mechanism is a necessary component to the
goals of DMARC. The method described in <a href="#section-3.2">Section 3.2</a> is far from
perfect but serves this purpose reasonably well without adding undue
burden or semantics to the DNS. If a method is created to do so that
is more reliable and secure than the use of a public suffix list,
DMARC should be amended to use that method as soon as it is generally
available.
<span class="h4"><a class="selflink" id="appendix-A.6.1" href="#appendix-A.6.1">A.6.1</a>. Public Suffix Lists</span>
A public suffix list for the purposes of determining the
Organizational Domain can be obtained from various sources. The most
common one is maintained by the Mozilla Foundation and made public at
<<a href="http://publicsuffix.org">http://publicsuffix.org</a>>. License terms governing the use of that
list are available at that URI.
Note that if operators use a variety of public suffix lists,
interoperability will be difficult or impossible to guarantee.
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Examples</span>
This section illustrates both the Domain Owner side and the Mail
Receiver side of a DMARC exchange.
<span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. Identifier Alignment Examples</span>
The following examples illustrate the DMARC mechanism's use of
Identifier Alignment. For brevity's sake, only message headers are
shown, as message bodies are not considered when conducting DMARC
checks.
<span class="h4"><a class="selflink" id="appendix-B.1.1" href="#appendix-B.1.1">B.1.1</a>. SPF</span>
The following SPF examples assume that SPF produces a passing result.
Example 1: SPF in alignment:
MAIL FROM: <sender@example.com>
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
<span class="grey">Kucherawy & Zwicky Informational [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
In this case, the <a href="./rfc5321">RFC5321</a>.MailFrom parameter and the <a href="./rfc5322">RFC5322</a>.From
field have identical DNS domains. Thus, the identifiers are in
alignment.
Example 2: SPF in alignment (parent):
MAIL FROM: <sender@child.example.com>
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
In this case, the <a href="./rfc5322">RFC5322</a>.From parameter includes a DNS domain that
is a parent of the <a href="./rfc5321">RFC5321</a>.MailFrom domain. Thus, the identifiers
are in alignment if relaxed SPF mode is requested by the Domain
Owner, and not in alignment if strict SPF mode is requested.
Example 3: SPF not in alignment:
MAIL FROM: <sender@example.net>
From: sender@child.example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
In this case, the <a href="./rfc5321">RFC5321</a>.MailFrom parameter includes a DNS domain
that is neither the same as nor a parent of the <a href="./rfc5322">RFC5322</a>.From domain.
Thus, the identifiers are not in alignment.
<span class="h4"><a class="selflink" id="appendix-B.1.2" href="#appendix-B.1.2">B.1.2</a>. DKIM</span>
The examples below assume that the DKIM signatures pass verification.
Alignment cannot exist with a DKIM signature that does not verify.
Example 1: DKIM in alignment:
DKIM-Signature: v=1; ...; d=example.com; ...
From: sender@example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
In this case, the DKIM "d=" parameter and the <a href="./rfc5322">RFC5322</a>.From field have
identical DNS domains. Thus, the identifiers are in alignment.
<span class="grey">Kucherawy & Zwicky Informational [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Example 2: DKIM in alignment (parent):
DKIM-Signature: v=1; ...; d=example.com; ...
From: sender@child.example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
In this case, the DKIM signature's "d=" parameter includes a DNS
domain that is a parent of the <a href="./rfc5322">RFC5322</a>.From domain. Thus, the
identifiers are in alignment for relaxed mode, but not for strict
mode.
Example 3: DKIM not in alignment:
DKIM-Signature: v=1; ...; d=sample.net; ...
From: sender@child.example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: receiver@example.org
Subject: here's a sample
In this case, the DKIM signature's "d=" parameter includes a DNS
domain that is neither the same as nor a parent of the <a href="./rfc5322">RFC5322</a>.From
domain. Thus, the identifiers are not in alignment.
<span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Domain Owner Example</span>
A Domain Owner that wants to use DMARC should have already deployed
and tested SPF and DKIM. The next step is to publish a DNS record
that advertises a DMARC policy for the Domain Owner's Organizational
Domain.
<span class="h4"><a class="selflink" id="appendix-B.2.1" href="#appendix-B.2.1">B.2.1</a>. Entire Domain, Monitoring Only</span>
The owner of the domain "example.com" has deployed SPF and DKIM on
its messaging infrastructure. The owner wishes to begin using DMARC
with a policy that will solicit aggregate feedback from receivers
without affecting how the messages are processed, in order to:
o Confirm that its legitimate messages are authenticating correctly
o Verify that all authorized message sources have implemented
authentication measures
o Determine how many messages from other sources would be affected
by a blocking policy
<span class="grey">Kucherawy & Zwicky Informational [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
The Domain Owner accomplishes this by constructing a policy record
indicating that:
o The version of DMARC being used is "DMARC1" ("v=DMARC1")
o Receivers should not alter how they treat these messages because
of this DMARC policy record ("p=none")
o Aggregate feedback reports should be sent via email to the address
"dmarc-feedback@example.com"
("rua=mailto:dmarc-feedback@example.com")
o All messages from this Organizational Domain are subject to this
policy (no "pct" tag present, so the default of 100% applies)
The DMARC policy record might look like this when retrieved using a
common command-line tool:
% dig +short TXT _dmarc.example.com.
"v=DMARC1; p=none; rua=mailto:dmarc-feedback@example.com"
To publish such a record, the DNS administrator for the Domain Owner
creates an entry like the following in the appropriate zone file
(following the conventional zone file format):
; DMARC record for the domain example.com
_dmarc IN TXT ( "v=DMARC1; p=none; "
"rua=mailto:dmarc-feedback@example.com" )
<span class="h4"><a class="selflink" id="appendix-B.2.2" href="#appendix-B.2.2">B.2.2</a>. Entire Domain, Monitoring Only, Per-Message Reports</span>
The Domain Owner from the previous example has used the aggregate
reporting to discover some messaging systems that had not yet
implemented DKIM correctly, but they are still seeing periodic
authentication failures. In order to diagnose these intermittent
problems, they wish to request per-message failure reports when
authentication failures occur.
Not all Receivers will honor such a request, but the Domain Owner
feels that any reports it does receive will be helpful enough to
justify publishing this record. The default per-message report
format ([<a href="#ref-AFRF" title=""Authentication Failure Reporting Using the Abuse Reporting Format"">AFRF</a>]) meets the Domain Owner's needs in this scenario.
<span class="grey">Kucherawy & Zwicky Informational [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
The Domain Owner accomplishes this by adding the following to its
policy record from <a href="#appendix-B.2">Appendix B.2</a>:
o Per-message failure reports should be sent via email to the
address "auth-reports@example.com"
("ruf=mailto:auth-reports@example.com")
The DMARC policy record might look like this when retrieved using a
common command-line tool (the output shown would appear on a single
line but is wrapped here for publication):
% dig +short TXT _dmarc.example.com.
"v=DMARC1; p=none; rua=mailto:dmarc-feedback@example.com;
ruf=mailto:auth-reports@example.com"
To publish such a record, the DNS administrator for the Domain Owner
might create an entry like the following in the appropriate zone file
(following the conventional zone file format):
; DMARC record for the domain example.com
_dmarc IN TXT ( "v=DMARC1; p=none; "
"rua=mailto:dmarc-feedback@example.com; "
"ruf=mailto:auth-reports@example.com" )
<span class="h4"><a class="selflink" id="appendix-B.2.3" href="#appendix-B.2.3">B.2.3</a>. Per-Message Failure Reports Directed to Third Party</span>
The Domain Owner from the previous example is maintaining the same
policy but now wishes to have a third party receive and process the
per-message failure reports. Again, not all Receivers will honor
this request, but those that do may implement additional checks to
validate that the third party wishes to receive the failure reports
for this domain.
The Domain Owner needs to alter its policy record from <a href="#appendix-B.2.2">Appendix B.2.2</a>
as follows:
o Per-message failure reports should be sent via email to the
address "auth-reports@thirdparty.example.net"
("ruf=mailto:auth-reports@thirdparty.example.net")
The DMARC policy record might look like this when retrieved using a
common command-line tool (the output shown would appear on a single
line but is wrapped here for publication):
% dig +short TXT _dmarc.example.com.
"v=DMARC1; p=none; rua=mailto:dmarc-feedback@example.com;
ruf=mailto:auth-reports@thirdparty.example.net"
<span class="grey">Kucherawy & Zwicky Informational [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
To publish such a record, the DNS administrator for the Domain Owner
might create an entry like the following in the appropriate zone file
(following the conventional zone file format):
; DMARC record for the domain example.com
_dmarc IN TXT ( "v=DMARC1; p=none; "
"rua=mailto:dmarc-feedback@example.com; "
"ruf=mailto:auth-reports@thirdparty.example.net" )
Because the address used in the "ruf" tag is outside the
Organizational Domain in which this record is published, conforming
Receivers will implement additional checks as described in
<a href="#section-7.1">Section 7.1</a> of this document. In order to pass these additional
checks, the third party will need to publish an additional DNS record
as follows:
o Given the DMARC record published by the Domain Owner at
"_dmarc.example.com", the DNS administrator for the third party
will need to publish a TXT resource record at
"example.com._report._dmarc.thirdparty.example.net" with the value
"v=DMARC1".
The resulting DNS record might look like this when retrieved using a
common command-line tool (the output shown would appear on a single
line but is wrapped here for publication):
% dig +short TXT example.com._report._dmarc.thirdparty.example.net
"v=DMARC1"
To publish such a record, the DNS administrator for example.net might
create an entry like the following in the appropriate zone file
(following the conventional zone file format):
; zone file for thirdparty.example.net
; Accept DMARC failure reports on behalf of example.com
example.com._report._dmarc IN TXT "v=DMARC1"
Intermediaries and other third parties should refer to <a href="#section-7.1">Section 7.1</a>
for the full details of this mechanism.
<span class="h4"><a class="selflink" id="appendix-B.2.4" href="#appendix-B.2.4">B.2.4</a>. Subdomain, Sampling, and Multiple Aggregate Report URIs</span>
The Domain Owner has implemented SPF and DKIM in a subdomain used for
pre-production testing of messaging services. It now wishes to
request that participating receivers act to reject messages from this
subdomain that fail to authenticate.
<span class="grey">Kucherawy & Zwicky Informational [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
As a first step, it will ask that a portion (1/4 in this example) of
failing messages be quarantined, enabling examination of messages
sent to mailboxes hosted by participating receivers. Aggregate
feedback reports will be sent to a mailbox within the Organizational
Domain, and to a mailbox at a third party selected and authorized to
receive same by the Domain Owner. Aggregate reports sent to the
third party are limited to a maximum size of ten megabytes.
The Domain Owner will accomplish this by constructing a policy record
indicating that:
o The version of DMARC being used is "DMARC1" ("v=DMARC1")
o It is applied only to this subdomain (record is published at
"_dmarc.test.example.com" and not "_dmarc.example.com")
o Receivers should quarantine messages from this Organizational
Domain that fail to authenticate ("p=quarantine")
o Aggregate feedback reports should be sent via email to the
addresses "dmarc-feedback@example.com" and
"example-tld-test@thirdparty.example.net", with the latter
subjected to a maximum size limit ("rua=mailto:dmarc-feedback@
example.com,mailto:tld-test@thirdparty.example.net!10m")
o 25% of messages from this Organizational Domain are subject to
action based on this policy ("pct=25")
The DMARC policy record might look like this when retrieved using a
common command-line tool (the output shown would appear on a single
line but is wrapped here for publication):
% dig +short TXT _dmarc.test.example.com
"v=DMARC1; p=quarantine; rua=mailto:dmarc-feedback@example.com,
mailto:tld-test@thirdparty.example.net!10m; pct=25"
To publish such a record, the DNS administrator for the Domain Owner
might create an entry like the following in the appropriate zone
file:
; DMARC record for the domain example.com
_dmarc IN TXT ( "v=DMARC1; p=quarantine; "
"rua=mailto:dmarc-feedback@example.com,"
"mailto:tld-test@thirdparty.example.net!10m; "
"pct=25" )
<span class="grey">Kucherawy & Zwicky Informational [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<span class="h3"><a class="selflink" id="appendix-B.3" href="#appendix-B.3">B.3</a>. Mail Receiver Example</span>
A Mail Receiver that wants to use DMARC should already be checking
SPF and DKIM, and possess the ability to collect relevant information
from various email-processing stages to provide feedback to Domain
Owners (possibly via Report Receivers).
<span class="h4"><a class="selflink" id="appendix-B.3.1" href="#appendix-B.3.1">B.3.1</a>. Processing of SMTP Time</span>
An optimal DMARC-enabled Mail Receiver performs authentication and
Identifier Alignment checking during the [<a href="#ref-SMTP" title=""Simple Mail Transfer Protocol"">SMTP</a>] conversation.
Prior to returning a final reply to the DATA command, the Mail
Receiver's MTA has performed:
1. An SPF check to determine an SPF-authenticated Identifier.
2. DKIM checks that yield one or more DKIM-authenticated
Identifiers.
3. A DMARC policy lookup.
The presence of an Author Domain DMARC record indicates that the Mail
Receiver should continue with DMARC-specific processing before
returning a reply to the DATA command.
Given a DMARC record and the set of Authenticated Identifiers, the
Mail Receiver checks to see if the Authenticated Identifiers align
with the Author Domain (taking into consideration any strict versus
relaxed options found in the DMARC record).
For example, the following sample data is considered to be from a
piece of email originating from the Domain Owner of "example.com":
Author Domain: example.com
SPF-authenticated Identifier: mail.example.com
DKIM-authenticated Identifier: example.com
DMARC record:
"v=DMARC1; p=reject; aspf=r;
rua=mailto:dmarc-feedback@example.com"
In the above sample, both the SPF-authenticated Identifier and the
DKIM-authenticated Identifier align with the Author Domain. The Mail
Receiver considers the above email to pass the DMARC check, avoiding
the "reject" policy that is to be applied to email that fails to pass
the DMARC check.
<span class="grey">Kucherawy & Zwicky Informational [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
If no Authenticated Identifiers align with the Author Domain, then
the Mail Receiver applies the DMARC-record-specified policy.
However, before this action is taken, the Mail Receiver can consult
external information to override the Domain Owner's policy. For
example, if the Mail Receiver knows that this particular email came
from a known and trusted forwarder (that happens to break both SPF
and DKIM), then the Mail Receiver may choose to ignore the Domain
Owner's policy.
The Mail Receiver is now ready to reply to the DATA command. If the
DMARC check yields that the message is to be rejected, then the Mail
Receiver replies with a 5xy code to inform the sender of failure. If
the DMARC check cannot be resolved due to transient network errors,
then the Mail Receiver replies with a 4xy code to inform the sender
as to the need to reattempt delivery later. If the DMARC check
yields a passing message, then the Mail Receiver continues on with
email processing, perhaps using the result of the DMARC check as an
input to additional processing modules such as a domain reputation
query.
Before exiting DMARC-specific processing, the Mail Receiver checks to
see if the Author Domain DMARC record requests AFRF-based reporting.
If so, then the Mail Receiver can emit an AFRF to the reporting
address supplied in the DMARC record.
At the exit of DMARC-specific processing, the Mail Receiver captures
(through logging or direct insertion into a data store) the result of
DMARC processing. Captured information is used to build feedback for
Domain Owner consumption. This is not necessary if the Domain Owner
has not requested aggregate reports, i.e., no "rua" tag was found in
the policy record.
<span class="h3"><a class="selflink" id="appendix-B.4" href="#appendix-B.4">B.4</a>. Utilization of Aggregate Feedback: Example</span>
Aggregate feedback is consumed by Domain Owners to verify a Domain
Owner's understanding of how the Domain Owner's domain is being
processed by the Mail Receiver. Aggregate reporting data on emails
that pass all DMARC-supporting authentication checks is used by
Domain Owners to verify that authentication practices remain
accurate. For example, if a third party is sending on behalf of a
Domain Owner, the Domain Owner can use aggregate report data to
verify ongoing authentication practices of the third party.
<span class="grey">Kucherawy & Zwicky Informational [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Data on email that only partially passes underlying authentication
checks provides visibility into problems that need to be addressed by
the Domain Owner. For example, if either SPF or DKIM fails to pass,
the Domain Owner is provided with enough information to either
directly correct the problem or understand where authentication-
breaking changes are being introduced in the email transmission path.
If authentication-breaking changes due to email transmission path
cannot be directly corrected, then the Domain Owner at least
maintains an understanding of the effect of DMARC-based policies upon
the Domain Owner's email.
Data on email that fails all underlying authentication checks
provides baseline visibility on how the Domain Owner's domain is
being received at the Mail Receiver. Based on this visibility, the
Domain Owner can begin deployment of authentication technologies
across uncovered email sources. Additionally, the Domain Owner may
come to an understanding of how its domain is being misused.
<span class="h3"><a class="selflink" id="appendix-B.5" href="#appendix-B.5">B.5</a>. mailto Transport Example</span>
A DMARC record can contain a "mailto" reporting address, such as:
mailto:dmarc-feedback@example.com
A sample aggregate report from the Mail Receiver at
mail.receiver.example follows:
DKIM-Signature: v=1; ...; d=mail.receiver.example; ...
From: dmarc-reporting@mail.receiver.example
Date: Fri, Feb 15 2002 16:54:30 -0800
To: dmarc-feedback@example.com
Subject: Report Domain: example.com
Submitter: mail.receiver.example
Report-ID: <2002.02.15.1>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_024E_01CC9B0A.AFE54C00"
Content-Language: en-us
This is a multipart message in MIME format.
------=_NextPart_000_024E_01CC9B0A.AFE54C00
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
<span class="grey">Kucherawy & Zwicky Informational [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
This is an aggregate report from mail.receiver.example.
------=_NextPart_000_024E_01CC9B0A.AFE54C00
Content-Type: application/gzip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="mail.receiver.example!example.com!
1013662812!1013749130.gz"
<gzipped content of report>
------=_NextPart_000_024E_01CC9B0A.AFE54C00--
Not shown in the above example is that the Mail Receiver's feedback
should be authenticated using SPF. Also, the value of the "filename"
MIME parameter is wrapped for printing in this specification but
would normally appear as one continuous string.
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">Appendix C</a>. DMARC XML Schema</span>
The following is the proposed initial schema for producing
XML-formatted aggregate reports as described in this document.
NOTE: Per the definition of XML, unless otherwise specified in the
schema below, the minOccurs and maxOccurs values for each element are
set to 1.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://dmarc.org/dmarc-xml/0.1">
<!-- The time range in UTC covered by messages in this report,
specified in seconds since epoch. -->
<xs:complexType name="DateRangeType">
<xs:all>
<xs:element name="begin" type="xs:integer"/>
<xs:element name="end" type="xs:integer"/>
</xs:all>
</xs:complexType>
<!-- Report generator metadata. -->
<xs:complexType name="ReportMetadataType">
<xs:sequence>
<xs:element name="org_name" type="xs:string"/>
<xs:element name="email" type="xs:string"/>
<xs:element name="extra_contact_info" type="xs:string"
minOccurs="0"/>
<xs:element name="report_id" type="xs:string"/>
<span class="grey">Kucherawy & Zwicky Informational [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<xs:element name="date_range" type="DateRangeType"/>
<xs:element name="error" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Alignment mode (relaxed or strict) for DKIM and SPF. -->
<xs:simpleType name="AlignmentType">
<xs:restriction base="xs:string">
<xs:enumeration value="r"/>
<xs:enumeration value="s"/>
</xs:restriction>
</xs:simpleType>
<!-- The policy actions specified by p and sp in the
DMARC record. -->
<xs:simpleType name="DispositionType">
<xs:restriction base="xs:string">
<xs:enumeration value="none"/>
<xs:enumeration value="quarantine"/>
<xs:enumeration value="reject"/>
</xs:restriction>
</xs:simpleType>
<!-- The DMARC policy that applied to the messages in
this report. -->
<xs:complexType name="PolicyPublishedType">
<xs:all>
<!-- The domain at which the DMARC record was found. -->
<xs:element name="domain" type="xs:string"/>
<!-- The DKIM alignment mode. -->
<xs:element name="adkim" type="AlignmentType"
minOccurs="0"/>
<!-- The SPF alignment mode. -->
<xs:element name="aspf" type="AlignmentType"
minOccurs="0"/>
<!-- The policy to apply to messages from the domain. -->
<xs:element name="p" type="DispositionType"/>
<!-- The policy to apply to messages from subdomains. -->
<xs:element name="sp" type="DispositionType"/>
<!-- The percent of messages to which policy applies. -->
<xs:element name="pct" type="xs:integer"/>
<!-- Failure reporting options in effect. -->
<xs:element name="fo" type="xs:string"/>
</xs:all>
</xs:complexType>
<span class="grey">Kucherawy & Zwicky Informational [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<!-- The DMARC-aligned authentication result. -->
<xs:simpleType name="DMARCResultType">
<xs:restriction base="xs:string">
<xs:enumeration value="pass"/>
<xs:enumeration value="fail"/>
</xs:restriction>
</xs:simpleType>
<!-- Reasons that may affect DMARC disposition or execution
thereof. -->
<xs:simpleType name="PolicyOverrideType">
<xs:restriction base="xs:string">
<xs:enumeration value="forwarded"/>
<xs:enumeration value="sampled_out"/>
<xs:enumeration value="trusted_forwarder"/>
<xs:enumeration value="mailing_list"/>
<xs:enumeration value="local_policy"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
<!-- How do we allow report generators to include new
classes of override reasons if they want to be more
specific than "other"? -->
<xs:complexType name="PolicyOverrideReason">
<xs:all>
<xs:element name="type" type="PolicyOverrideType"/>
<xs:element name="comment" type="xs:string"
minOccurs="0"/>
</xs:all>
</xs:complexType>
<!-- Taking into account everything else in the record,
the results of applying DMARC. -->
<xs:complexType name="PolicyEvaluatedType">
<xs:sequence>
<xs:element name="disposition" type="DispositionType"/>
<xs:element name="dkim" type="DMARCResultType"/>
<xs:element name="spf" type="DMARCResultType"/>
<xs:element name="reason" type="PolicyOverrideReason"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<span class="grey">Kucherawy & Zwicky Informational [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<!-- Credit to Roger L. Costello for IPv4 regex
<a href="http://mailman.ic.ac.uk/pipermail/xml-dev/1999-December/018018.html">http://mailman.ic.ac.uk/pipermail/xml-dev/1999-December/</a>
<a href="http://mailman.ic.ac.uk/pipermail/xml-dev/1999-December/018018.html">018018.html</a> -->
<!-- Credit to java2s.com for IPv6 regex
<a href="http://www.java2s.com/Code/XML/XML-Schema/IPv6addressesareeasiertodescribeusingasimpleregex.htm">http://www.java2s.com/Code/XML/XML-Schema/</a>
<a href="http://www.java2s.com/Code/XML/XML-Schema/IPv6addressesareeasiertodescribeusingasimpleregex.htm">IPv6addressesareeasiertodescribeusingasimpleregex.htm</a> -->
<xs:simpleType name="IPAddress">
<xs:restriction base="xs:string">
<xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).){3}
(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])|
([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RowType">
<xs:all>
<!-- The connecting IP. -->
<xs:element name="source_ip" type="IPAddress"/>
<!-- The number of matching messages. -->
<xs:element name="count" type="xs:integer"/>
<!-- The DMARC disposition applying to matching
messages. -->
<xs:element name="policy_evaluated"
type="PolicyEvaluatedType"
minOccurs="1"/>
</xs:all>
</xs:complexType>
<xs:complexType name="IdentifierType">
<xs:all>
<!-- The envelope recipient domain. -->
<xs:element name="envelope_to" type="xs:string"
minOccurs="0"/>
<!-- The <a href="./rfc5321">RFC5321</a>.MailFrom domain. -->
<xs:element name="envelope_from" type="xs:string"
minOccurs="1"/>
<!-- The <a href="./rfc5322">RFC5322</a>.From domain. -->
<xs:element name="header_from" type="xs:string"
minOccurs="1"/>
</xs:all>
</xs:complexType>
<!-- DKIM verification result, according to <a href="./rfc7001#section-2.6.1">RFC 7001
Section 2.6.1</a>. -->
<xs:simpleType name="DKIMResultType">
<xs:restriction base="xs:string">
<xs:enumeration value="none"/>
<xs:enumeration value="pass"/>
<span class="grey">Kucherawy & Zwicky Informational [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<xs:enumeration value="fail"/>
<xs:enumeration value="policy"/>
<xs:enumeration value="neutral"/>
<xs:enumeration value="temperror"/>
<xs:enumeration value="permerror"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DKIMAuthResultType">
<xs:all>
<!-- The "d=" parameter in the signature. -->
<xs:element name="domain" type="xs:string"
minOccurs="1"/>
<!-- The "s=" parameter in the signature. -->
<xs:element name="selector" type="xs:string"
minOccurs="0"/>
<!-- The DKIM verification result. -->
<xs:element name="result" type="DKIMResultType"
minOccurs="1"/>
<!-- Any extra information (e.g., from
Authentication-Results). -->
<xs:element name="human_result" type="xs:string"
minOccurs="0"/>
</xs:all>
</xs:complexType>
<!-- SPF domain scope. -->
<xs:simpleType name="SPFDomainScope">
<xs:restriction base="xs:string">
<xs:enumeration value="helo"/>
<xs:enumeration value="mfrom"/>
</xs:restriction>
</xs:simpleType>
<!-- SPF result. -->
<xs:simpleType name="SPFResultType">
<xs:restriction base="xs:string">
<xs:enumeration value="none"/>
<xs:enumeration value="neutral"/>
<xs:enumeration value="pass"/>
<xs:enumeration value="fail"/>
<xs:enumeration value="softfail"/>
<!-- "TempError" commonly implemented as "unknown". -->
<xs:enumeration value="temperror"/>
<!-- "PermError" commonly implemented as "error". -->
<xs:enumeration value="permerror"/>
</xs:restriction>
</xs:simpleType>
<span class="grey">Kucherawy & Zwicky Informational [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<xs:complexType name="SPFAuthResultType">
<xs:all>
<!-- The checked domain. -->
<xs:element name="domain" type="xs:string" minOccurs="1"/>
<!-- The scope of the checked domain. -->
<xs:element name="scope" type="SPFDomainScope" minOccurs="1"/>
<!-- The SPF verification result. -->
<xs:element name="result" type="SPFResultType"
minOccurs="1"/>
</xs:all>
</xs:complexType>
<!-- This element contains DKIM and SPF results, uninterpreted
with respect to DMARC. -->
<xs:complexType name="AuthResultType">
<xs:sequence>
<!-- There may be no DKIM signatures, or multiple DKIM
signatures. -->
<xs:element name="dkim" type="DKIMAuthResultType"
minOccurs="0" maxOccurs="unbounded"/>
<!-- There will always be at least one SPF result. -->
<xs:element name="spf" type="SPFAuthResultType" minOccurs="1"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- This element contains all the authentication results that
were evaluated by the receiving system for the given set of
messages. -->
<xs:complexType name="RecordType">
<xs:sequence>
<xs:element name="row" type="RowType"/>
<xs:element name="identifiers" type="IdentifierType"/>
<xs:element name="auth_results" type="AuthResultType"/>
</xs:sequence>
</xs:complexType>
<!-- Parent -->
<xs:element name="feedback">
<xs:complexType>
<xs:sequence>
<xs:element name="version"
type="xs:decimal"/>
<xs:element name="report_metadata"
type="ReportMetadataType"/>
<xs:element name="policy_published"
type="PolicyPublishedType"/>
<span class="grey">Kucherawy & Zwicky Informational [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
<xs:element name="record" type="RecordType"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Descriptions of the PolicyOverrideTypes:
forwarded: The message was relayed via a known forwarder, or local
heuristics identified the message as likely having been forwarded.
There is no expectation that authentication would pass.
local_policy: The Mail Receiver's local policy exempted the message
from being subjected to the Domain Owner's requested policy
action.
mailing_list: Local heuristics determined that the message arrived
via a mailing list, and thus authentication of the original
message was not expected to succeed.
other: Some policy exception not covered by the other entries in
this list occurred. Additional detail can be found in the
PolicyOverrideReason's "comment" field.
sampled_out: The message was exempted from application of policy by
the "pct" setting in the DMARC policy record.
trusted_forwarder: Message authentication failure was anticipated by
other evidence linking the message to a locally maintained list of
known and trusted forwarders.
The "version" for reports generated per this specification MUST be
the value 1.0.
<span class="grey">Kucherawy & Zwicky Informational [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc7489">RFC 7489</a> DMARC March 2015</span>
Acknowledgements
DMARC and the draft version of this document submitted to the
Independent Submission Editor were the result of lengthy efforts by
an informal industry consortium: DMARC.org (see <<a href="http://dmarc.org">http://dmarc.org</a>>).
Participating companies included Agari, American Greetings, AOL, Bank
of America, Cloudmark, Comcast, Facebook, Fidelity Investments,
Google, JPMorgan Chase & Company, LinkedIn, Microsoft, Netease,
PayPal, ReturnPath, The Trusted Domain Project, and Yahoo!. Although
the contributors and supporters are too numerous to mention, notable
individual contributions were made by J. Trent Adams, Michael Adkins,
Monica Chew, Dave Crocker, Tim Draegen, Steve Jones, Franck Martin,
Brett McDowell, and Paul Midgen. The contributors would also like to
recognize the invaluable input and guidance that was provided early
on by J.D. Falk.
Additional contributions within the IETF context were made by Kurt
Anderson, Michael Jack Assels, Les Barstow, Anne Bennett, Jim Fenton,
J. Gomez, Mike Jones, Scott Kitterman, Eliot Lear, John Levine,
S. Moonesamy, Rolf Sonneveld, Henry Timmes, and Stephen J. Turnbull.
Authors' Addresses
Murray S. Kucherawy (editor)
EMail: superuser@gmail.com
Elizabeth Zwicky (editor)
Yahoo!
EMail: zwicky@yahoo-inc.com
Kucherawy & Zwicky Informational [Page 73]
</pre>
|