[{"data":1,"prerenderedAt":1701},["ShallowReactive",2],{"article-20200311-rspamd-trainer-bayes":3},{"article":4,"surround":1690},{"id":5,"title":6,"authorKey":7,"body":8,"codeLinks":1649,"createdAt":1651,"description":1652,"excerpt":1653,"extension":1675,"image":1676,"meta":1677,"navigation":504,"path":1678,"published":1679,"readingTime":523,"revisedAt":1680,"seo":1681,"stem":1682,"tags":1683,"__hash__":1689},"articles\u002Farticles\u002F20200311-rspamd-trainer-bayes.md","Automated Bayesian Spam\u002FHam Training with Rspamd","philip",{"type":9,"value":10,"toc":1644},"minimark",[11,50,53,56,106,109,114,117,127,133,143,158,165,268,282,322,325,350,360,378,381,387,395,399,414,421,430,447,453,477,484,621,636,1070,1081,1392,1395,1435,1441,1469,1484,1488,1494,1501,1634,1637,1640],[12,13,14,15,22,23,28,29,34,35,40,41,45,46,49],"p",{},"At ",[16,17,21],"a",{"href":18,"rel":19},"https:\u002F\u002Fwww.onlime.ch\u002F",[20],"nofollow","Onlime GmbH"," we have migrated the mail infrastructure in Dec 2019 from good old ",[16,24,27],{"href":25,"rel":26},"https:\u002F\u002Fspamassassin.apache.org\u002F",[20],"Spamassassin"," to ",[16,30,33],{"href":31,"rel":32},"https:\u002F\u002Frspamd.com\u002F",[20],"Rspamd"," which greatly improved spam filtering. Rspamd offers a nice way of Bayesian learning in ",[16,36,39],{"href":37,"rel":38},"https:\u002F\u002Frspamd.com\u002Fdoc\u002Fconfiguration\u002Fstatistic.html",[20],"Rspamd statistical module",". You can feed emails through ",[42,43,44],"code",{},"rspamc learn_spam"," or ",[42,47,48],{},"rspamc learn_ham"," for manual spam\u002Fham training to improve Bayes hit rate.",[12,51,52],{},"In the past, we have only internally used Bayesian training. Wouldn't it be nice to let all customers help us improve the Bayes filter \u002F hit rate? Without even asking them to do so?",[12,54,55],{},"In this article, I am going to explain how to set up automated spam\u002Fham Bayes learning for your mail infrastructure, containing the following components:",[57,58,59,73,81,84,95],"ul",{},[60,61,62,67,68],"li",{},[16,63,66],{"href":64,"rel":65},"https:\u002F\u002Fdovecot.org\u002F",[20],"Dovecot IMAP server"," with ",[16,69,72],{"href":70,"rel":71},"https:\u002F\u002Fdoc.dovecot.org\u002Fconfiguration_manual\u002Fsieve\u002Fplugins\u002Fimapsieve\u002F",[20],"Pigeonhole: IMAPSieve Plugin",[60,74,75,76,80],{},"A mail account ",[16,77,79],{"href":78},"mailto:spam@example.com","spam@example.com"," for spam\u002Fham learning",[60,82,83],{},"Global Sieve scripts on IMAP server that feed spam\u002Fham into that mail account",[60,85,86,89,90,94],{},[16,87,33],{"href":31,"rel":88},[20]," with enabled ",[16,91,93],{"href":37,"rel":92},[20],"statistics module"," (Bayes)",[60,96,97,102,103],{},[16,98,101],{"href":99,"rel":100},"https:\u002F\u002Fgitlab.com\u002Fonlime\u002Frspamd-trainer",[20],"onlime\u002Frspamd-trainer"," doing the actual spam\u002Fham learning with ",[42,104,105],{},"rspamc learn_{spam|ham}",[12,107,108],{},"Further down, I explain the \"magic\", how our customers are helping improve our Bayes filtering without even noticing.",[110,111,113],"h2",{"id":112},"set-up-rspamd-trainer","Set up rspamd-trainer",[12,115,116],{},"I have written a small helper script in Python that grabs messages from a mailbox via IMAP and feeds them to Rspamd for spam\u002Fham learning:",[57,118,119],{},[60,120,121],{},[122,123,124],"strong",{},[16,125,101],{"href":99,"rel":126},[20],[12,128,129,130,132],{},"First, create a mailaccount for spam learning (using ",[16,131,79],{"href":78}," as reference in this article) with at least the following folders:",[134,135,140],"pre",{"className":136,"code":138,"language":139},[137],"language-text","INBOX\n├── report_ham\n├── report_spam\n└── report_spam_reply\n","text",[42,141,138],{"__ignoreMap":142},"",[12,144,145,146,149,150,153,154,157],{},"Additional ",[42,147,148],{},"INBOX\u002Flearned_*"," folders will be created by rspamd-trainer upon first moved emails, if they don't exist. rspamd-trainer grabs emails from ",[42,151,152],{},"report_*"," folders and moves them to ",[42,155,156],{},"learned_*"," folders once successfully processed.",[12,159,160,161,164],{},"Now, install ",[16,162,101],{"href":99,"rel":163},[20]," on the same mailserver where Rspamd is running (does not need to run on your IMAP server):",[134,166,170],{"className":167,"code":168,"language":169,"meta":142,"style":142},"language-bash shiki shiki-themes github-light-default github-light-default github-dark-default","$ cd \u002Fopt\n$ git clone git@gitlab.com:onlime\u002Frspamd-trainer.git\n$ cd rspamd-trainer\n$ python3 -m venv venv\n$ . venv\u002Fbin\u002Factivate\n(venv) $ pip install -r requirements.txt\n","bash",[42,171,172,188,202,212,230,241],{"__ignoreMap":142},[173,174,177,181,185],"span",{"class":175,"line":176},"line",1,[173,178,180],{"class":179},"sQJ0q","$",[173,182,184],{"class":183},"s-BGO"," cd",[173,186,187],{"class":183}," \u002Fopt\n",[173,189,191,193,196,199],{"class":175,"line":190},2,[173,192,180],{"class":179},[173,194,195],{"class":183}," git",[173,197,198],{"class":183}," clone",[173,200,201],{"class":183}," git@gitlab.com:onlime\u002Frspamd-trainer.git\n",[173,203,205,207,209],{"class":175,"line":204},3,[173,206,180],{"class":179},[173,208,184],{"class":183},[173,210,211],{"class":183}," rspamd-trainer\n",[173,213,215,217,220,224,227],{"class":175,"line":214},4,[173,216,180],{"class":179},[173,218,219],{"class":183}," python3",[173,221,223],{"class":222},"sDkKp"," -m",[173,225,226],{"class":183}," venv",[173,228,229],{"class":183}," venv\n",[173,231,233,235,238],{"class":175,"line":232},5,[173,234,180],{"class":179},[173,236,237],{"class":183}," .",[173,239,240],{"class":183}," venv\u002Fbin\u002Factivate\n",[173,242,244,248,251,254,256,259,262,265],{"class":175,"line":243},6,[173,245,247],{"class":246},"s_bOF","(",[173,249,250],{"class":179},"venv",[173,252,253],{"class":246},") ",[173,255,180],{"class":179},[173,257,258],{"class":183}," pip",[173,260,261],{"class":183}," install",[173,263,264],{"class":222}," -r",[173,266,267],{"class":183}," requirements.txt\n",[12,269,270,271,274,275,278,279,281],{},"Configuration is stored in ",[42,272,273],{},".env",". See ",[42,276,277],{},".env.defaults"," for default config options. Put the credentials for ",[16,280,79],{"href":78}," mailaccount into that file:",[134,283,287],{"className":284,"code":285,"filename":273,"language":286,"meta":142,"style":142},"language-ini shiki shiki-themes github-light-default github-light-default github-dark-default","HOST=localhost\nUSERNAME=spam@example.com\nPASSWORD=xxxxxxxxxxxxxxxx\nINBOXPREFIX=INBOX\u002F\n","ini",[42,288,289,298,306,314],{"__ignoreMap":142},[173,290,291,295],{"class":175,"line":176},[173,292,294],{"class":293},"s5nWI","HOST",[173,296,297],{"class":246},"=localhost\n",[173,299,300,303],{"class":175,"line":190},[173,301,302],{"class":293},"USERNAME",[173,304,305],{"class":246},"=spam@example.com\n",[173,307,308,311],{"class":175,"line":204},[173,309,310],{"class":293},"PASSWORD",[173,312,313],{"class":246},"=xxxxxxxxxxxxxxxx\n",[173,315,316,319],{"class":175,"line":214},[173,317,318],{"class":293},"INBOXPREFIX",[173,320,321],{"class":246},"=INBOX\u002F\n",[12,323,324],{},"rspamd-trainer is now ready for work and you can already set up a cronjob that runs e.g. every 5mins:",[134,326,328],{"className":167,"code":327,"language":169,"meta":142,"style":142},"*\u002F5 * * * * \u002Fopt\u002Frspamd-trainer\u002Fvenv\u002Fbin\u002Fpython run.py\n",[42,329,330],{"__ignoreMap":142},[173,331,332,335,338,340,343,345,347],{"class":175,"line":176},[173,333,334],{"class":293},"*",[173,336,337],{"class":246},"\u002F5 ",[173,339,334],{"class":293},[173,341,342],{"class":293}," *",[173,344,342],{"class":293},[173,346,342],{"class":293},[173,348,349],{"class":246}," \u002Fopt\u002Frspamd-trainer\u002Fvenv\u002Fbin\u002Fpython run.py\n",[12,351,352,353,356,357,359],{},"Now, copy a spam mail that has not been classified as spam by Rspamd into ",[42,354,355],{},"INBOX\u002Freport_spam"," on ",[16,358,79],{"href":78}," and monitor rspamd-trainer's log:",[134,361,363],{"className":167,"code":362,"language":169,"meta":142,"style":142},"$ tail -f log\u002Fapplication.log\n",[42,364,365],{"__ignoreMap":142},[173,366,367,369,372,375],{"class":175,"line":176},[173,368,180],{"class":179},[173,370,371],{"class":183}," tail",[173,373,374],{"class":222}," -f",[173,376,377],{"class":183}," log\u002Fapplication.log\n",[12,379,380],{},"Sample log lines:",[134,382,385],{"className":383,"code":384,"language":139},[137],"2020-03-11 11:55:01,872 INFO (4e8728ad) - INBOX\u002Freport_spam:40484 From:\"Badcompany GmbH\" \u003Cspammer@example.com> To:\u003Ccontact@example.com> Message-ID: \u003Cff093c4a...>\n2020-03-11 11:55:01,873 INFO (4e8728ad) - running rspamc learn_spam ...\n2020-03-11 11:55:01,965 INFO (4e8728ad) - rspamc output:\nResults for file: stdin (0.035 seconds)\nsuccess = true;\nfilename = \"stdin\";\nscan_time = 0.035999;\n",[42,386,384],{"__ignoreMap":142},[12,388,389,390,394],{},"Great, ",[16,391,393],{"href":99,"rel":392},[20],"rspamd-trainer"," does its job!",[110,396,398],{"id":397},"automated-bayes-learning","Automated Bayes Learning",[400,401,402],"blockquote",{},[12,403,404,405,408,409,413],{},"So far, we did not depend on any specific IMAP mailserver implementation, as ",[16,406,393],{"href":99,"rel":407},[20]," simply connects over IMAP to connect to our spam mailbox for Bayes learning. Now, it gets more vendor specific and I am only going to present you a solution for ",[16,410,412],{"href":64,"rel":411},[20],"Dovecot",", as Dovecot simply is the best open source IMAP server out there - glad we finally ditched Cyrus-IMAPd in 2019!",[12,415,416,417,420],{},"For ",[122,418,419],{},"automated spam\u002Fham learning"," via Dovecot\u002FIMAPSieve, first study the following tutorial for a quick overview:",[57,422,423],{},[60,424,425],{},[16,426,429],{"href":427,"rel":428},"https:\u002F\u002Frspamd.com\u002Fdoc\u002Ftutorials\u002Ffeedback_from_users_with_IMAPSieve.html",[20],"Rspamd: Getting feedback from users with IMAPSieve",[12,431,432,435,436,439,440,442,443,446],{},[122,433,434],{},"The main idea:"," Whenever a customer\u002F mailaccount user is moving an email into his ",[42,437,438],{},"Spam"," folder, we assume this was an email which was not detected as spam and should be learned as \"spam\". Whenever he moves an email from his ",[42,441,438],{}," folder into any other folder (other than ",[42,444,445],{},"Trash","), we assume this was a false-positive and should be learned as \"ham\".",[12,448,449,450,452],{},"Below implementation with global Sieve scripts copies such emails to our spam learning mailbox (in ",[16,451,79],{"href":78}," mailaccount we have set up, see above):",[57,454,455,468],{},[60,456,457,458,461,462,464,465,467],{},"Copy an email to the ",[42,459,460],{},"report_spam"," mailbox if a user copies it from elsewhere to his ",[42,463,438],{}," folder or if a flag is changed on an email in ",[42,466,438],{}," folder.",[60,469,457,470,473,474,476],{},[42,471,472],{},"report_ham"," mailbox if a user copies it from his ",[42,475,438],{}," folder to elsewhere.",[12,478,479,480,483],{},"Spam\u002FHam learning is triggered via Dovecot\u002FIMAPSieve configuration in ",[42,481,482],{},"conf.d\u002F90-sieve.conf",":",[134,485,487],{"className":284,"code":486,"filename":482,"language":286,"meta":142,"style":142},"plugin {\n  # ...\n\n  ###\n  ### Spam learning with IMAPSieve\n  ### Note: MUAs may move message with COPY or APPEND (MS Outlook) (IMAP) command.\n  ###\n  # Spam: From elsewhere to Spam folder or flag changed in Spam folder\n  imapsieve_mailbox1_name = INBOX\u002FSpam\n  imapsieve_mailbox1_causes = COPY APPEND FLAG\n  imapsieve_mailbox1_before = file:\u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-spam.sieve\n\n  # Ham: From Spam folder to elsewhere\n  imapsieve_mailbox2_name = *\n  imapsieve_mailbox2_from = INBOX\u002FSpam\n  imapsieve_mailbox2_causes = COPY\n  imapsieve_mailbox2_before = file:\u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-ham.sieve\n\n  # ...\n}\n",[42,488,489,494,500,506,511,516,521,526,532,541,550,559,564,570,579,587,596,605,610,615],{"__ignoreMap":142},[173,490,491],{"class":175,"line":176},[173,492,493],{"class":246},"plugin {\n",[173,495,496],{"class":175,"line":190},[173,497,499],{"class":498},"s9BHP","  # ...\n",[173,501,502],{"class":175,"line":204},[173,503,505],{"emptyLinePlaceholder":504},true,"\n",[173,507,508],{"class":175,"line":214},[173,509,510],{"class":498},"  ###\n",[173,512,513],{"class":175,"line":232},[173,514,515],{"class":498},"  ### Spam learning with IMAPSieve\n",[173,517,518],{"class":175,"line":243},[173,519,520],{"class":498},"  ### Note: MUAs may move message with COPY or APPEND (MS Outlook) (IMAP) command.\n",[173,522,524],{"class":175,"line":523},7,[173,525,510],{"class":498},[173,527,529],{"class":175,"line":528},8,[173,530,531],{"class":498},"  # Spam: From elsewhere to Spam folder or flag changed in Spam folder\n",[173,533,535,538],{"class":175,"line":534},9,[173,536,537],{"class":293},"  imapsieve_mailbox1_name",[173,539,540],{"class":246}," = INBOX\u002FSpam\n",[173,542,544,547],{"class":175,"line":543},10,[173,545,546],{"class":293},"  imapsieve_mailbox1_causes",[173,548,549],{"class":246}," = COPY APPEND FLAG\n",[173,551,553,556],{"class":175,"line":552},11,[173,554,555],{"class":293},"  imapsieve_mailbox1_before",[173,557,558],{"class":246}," = file:\u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-spam.sieve\n",[173,560,562],{"class":175,"line":561},12,[173,563,505],{"emptyLinePlaceholder":504},[173,565,567],{"class":175,"line":566},13,[173,568,569],{"class":498},"  # Ham: From Spam folder to elsewhere\n",[173,571,573,576],{"class":175,"line":572},14,[173,574,575],{"class":293},"  imapsieve_mailbox2_name",[173,577,578],{"class":246}," = *\n",[173,580,582,585],{"class":175,"line":581},15,[173,583,584],{"class":293},"  imapsieve_mailbox2_from",[173,586,540],{"class":246},[173,588,590,593],{"class":175,"line":589},16,[173,591,592],{"class":293},"  imapsieve_mailbox2_causes",[173,594,595],{"class":246}," = COPY\n",[173,597,599,602],{"class":175,"line":598},17,[173,600,601],{"class":293},"  imapsieve_mailbox2_before",[173,603,604],{"class":246}," = file:\u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-ham.sieve\n",[173,606,608],{"class":175,"line":607},18,[173,609,505],{"emptyLinePlaceholder":504},[173,611,613],{"class":175,"line":612},19,[173,614,499],{"class":498},[173,616,618],{"class":175,"line":617},20,[173,619,620],{"class":246},"}\n",[12,622,623,624,627,628,631,632,635],{},"Global ",[42,625,626],{},"learn-spam.sieve"," that cares about ",[122,629,630],{},"spam learning"," and writes log lines with ",[42,633,634],{},"learn-spam"," keyword:",[134,637,641],{"className":638,"code":639,"filename":626,"language":640,"meta":142,"style":142},"language-ruby shiki shiki-themes github-light-default github-light-default github-dark-default","require [\"vnd.dovecot.pipe\", \"copy\", \"imapsieve\", \"environment\", \"imap4flags\", \"vnd.dovecot.debug\", \"variables\"];\n\n# Logging\nif address :matches \"from\" \"*\" { set \"FROM\" \"${1}\"; }\nif address :matches \"to\" \"*\" { set \"TO\" \"${1}\"; }\nif header :matches \"subject\" \"*\" { set \"SUBJECT\" \"${1}\"; }\nif header :matches \"Message-ID\" \"*\" { set \"MSGID\" \"${1}\"; }\nif header :matches \"X-Spamd-Result\" \"*\" { set \"XSpamdResult\" \"${1}\"; }\nif environment :matches \"imap.cause\" \"*\" { set \"IMAPCAUSE\" \"${1}\"; }\ndebug_log \"learn-spam.sieve was triggered on imap.cause=${IMAPCAUSE}: msgid=${MSGID}\";\nset \"LogMsg\" \"learn-spam on imap.cause=${IMAPCAUSE}: from=${FROM}, to=${TO}, subject=${SUBJECT}, msgid=${MSGID}, X-Spamd-Result=${XSpamdResult}\";\n\n# Spam-learning by storing a copy of the message into spam@example.com\nif anyof (environment :is \"imap.cause\" \"COPY\", environment :is \"imap.cause\" \"APPEND\") {\n    debug_log \"${LogMsg}\";\n    debug_log \"learn-spam copy to INBOX\u002Freport_spam\";\n    pipe :copy \"dovecot-lda\" [ \"-d\", \"spam@example.com\", \"-m\", \"INBOX\u002Freport_spam\" ];\n}\n# Catch replied or forwarded spam\nelsif anyof (allof (hasflag \"\\\\Answered\", environment :contains \"imap.changedflags\" \"\\\\Answered\"),\n             allof (hasflag \"$Forwarded\", environment :contains \"imap.changedflags\" \"$Forwarded\")) {\n    debug_log \"${LogMsg}\";\n    debug_log \"learn-spam copy to INBOX\u002Freport_spam_reply\";\n    pipe :copy \"dovecot-lda\" [ \"-d\", \"spam@example.com\", \"-m\", \"INBOX\u002Freport_spam_reply\" ];\n}\n","ruby",[42,642,643,688,692,697,726,748,771,793,815,838,849,862,866,871,899,909,918,953,957,962,997,1018,1027,1037,1065],{"__ignoreMap":142},[173,644,645,648,651,654,657,660,662,665,667,670,672,675,677,680,682,685],{"class":175,"line":176},[173,646,647],{"class":293},"require",[173,649,650],{"class":246}," [",[173,652,653],{"class":183},"\"vnd.dovecot.pipe\"",[173,655,656],{"class":246},", ",[173,658,659],{"class":183},"\"copy\"",[173,661,656],{"class":246},[173,663,664],{"class":183},"\"imapsieve\"",[173,666,656],{"class":246},[173,668,669],{"class":183},"\"environment\"",[173,671,656],{"class":246},[173,673,674],{"class":183},"\"imap4flags\"",[173,676,656],{"class":246},[173,678,679],{"class":183},"\"vnd.dovecot.debug\"",[173,681,656],{"class":246},[173,683,684],{"class":183},"\"variables\"",[173,686,687],{"class":246},"];\n",[173,689,690],{"class":175,"line":190},[173,691,505],{"emptyLinePlaceholder":504},[173,693,694],{"class":175,"line":204},[173,695,696],{"class":498},"# Logging\n",[173,698,699,702,705,708,711,714,717,720,723],{"class":175,"line":214},[173,700,701],{"class":293},"if",[173,703,704],{"class":246}," address ",[173,706,707],{"class":222},":matches",[173,709,710],{"class":183}," \"from\"",[173,712,713],{"class":183}," \"*\"",[173,715,716],{"class":246}," { set ",[173,718,719],{"class":183},"\"FROM\"",[173,721,722],{"class":183}," \"${1}\"",[173,724,725],{"class":246},"; }\n",[173,727,728,730,732,734,737,739,741,744,746],{"class":175,"line":232},[173,729,701],{"class":293},[173,731,704],{"class":246},[173,733,707],{"class":222},[173,735,736],{"class":183}," \"to\"",[173,738,713],{"class":183},[173,740,716],{"class":246},[173,742,743],{"class":183},"\"TO\"",[173,745,722],{"class":183},[173,747,725],{"class":246},[173,749,750,752,755,757,760,762,764,767,769],{"class":175,"line":243},[173,751,701],{"class":293},[173,753,754],{"class":246}," header ",[173,756,707],{"class":222},[173,758,759],{"class":183}," \"subject\"",[173,761,713],{"class":183},[173,763,716],{"class":246},[173,765,766],{"class":183},"\"SUBJECT\"",[173,768,722],{"class":183},[173,770,725],{"class":246},[173,772,773,775,777,779,782,784,786,789,791],{"class":175,"line":523},[173,774,701],{"class":293},[173,776,754],{"class":246},[173,778,707],{"class":222},[173,780,781],{"class":183}," \"Message-ID\"",[173,783,713],{"class":183},[173,785,716],{"class":246},[173,787,788],{"class":183},"\"MSGID\"",[173,790,722],{"class":183},[173,792,725],{"class":246},[173,794,795,797,799,801,804,806,808,811,813],{"class":175,"line":528},[173,796,701],{"class":293},[173,798,754],{"class":246},[173,800,707],{"class":222},[173,802,803],{"class":183}," \"X-Spamd-Result\"",[173,805,713],{"class":183},[173,807,716],{"class":246},[173,809,810],{"class":183},"\"XSpamdResult\"",[173,812,722],{"class":183},[173,814,725],{"class":246},[173,816,817,819,822,824,827,829,831,834,836],{"class":175,"line":534},[173,818,701],{"class":293},[173,820,821],{"class":246}," environment ",[173,823,707],{"class":222},[173,825,826],{"class":183}," \"imap.cause\"",[173,828,713],{"class":183},[173,830,716],{"class":246},[173,832,833],{"class":183},"\"IMAPCAUSE\"",[173,835,722],{"class":183},[173,837,725],{"class":246},[173,839,840,843,846],{"class":175,"line":543},[173,841,842],{"class":246},"debug_log ",[173,844,845],{"class":183},"\"learn-spam.sieve was triggered on imap.cause=${IMAPCAUSE}: msgid=${MSGID}\"",[173,847,848],{"class":246},";\n",[173,850,851,854,857,860],{"class":175,"line":552},[173,852,853],{"class":246},"set ",[173,855,856],{"class":183},"\"LogMsg\"",[173,858,859],{"class":183}," \"learn-spam on imap.cause=${IMAPCAUSE}: from=${FROM}, to=${TO}, subject=${SUBJECT}, msgid=${MSGID}, X-Spamd-Result=${XSpamdResult}\"",[173,861,848],{"class":246},[173,863,864],{"class":175,"line":561},[173,865,505],{"emptyLinePlaceholder":504},[173,867,868],{"class":175,"line":566},[173,869,870],{"class":498},"# Spam-learning by storing a copy of the message into spam@example.com\n",[173,872,873,875,878,881,883,886,889,891,893,896],{"class":175,"line":572},[173,874,701],{"class":293},[173,876,877],{"class":246}," anyof (environment ",[173,879,880],{"class":222},":is",[173,882,826],{"class":183},[173,884,885],{"class":183}," \"COPY\"",[173,887,888],{"class":246},", environment ",[173,890,880],{"class":222},[173,892,826],{"class":183},[173,894,895],{"class":183}," \"APPEND\"",[173,897,898],{"class":246},") {\n",[173,900,901,904,907],{"class":175,"line":581},[173,902,903],{"class":246},"    debug_log ",[173,905,906],{"class":183},"\"${LogMsg}\"",[173,908,848],{"class":246},[173,910,911,913,916],{"class":175,"line":589},[173,912,903],{"class":246},[173,914,915],{"class":183},"\"learn-spam copy to INBOX\u002Freport_spam\"",[173,917,848],{"class":246},[173,919,920,923,926,929,932,935,937,940,942,945,947,950],{"class":175,"line":598},[173,921,922],{"class":246},"    pipe ",[173,924,925],{"class":222},":copy",[173,927,928],{"class":183}," \"dovecot-lda\"",[173,930,931],{"class":246}," [ ",[173,933,934],{"class":183},"\"-d\"",[173,936,656],{"class":246},[173,938,939],{"class":183},"\"spam@example.com\"",[173,941,656],{"class":246},[173,943,944],{"class":183},"\"-m\"",[173,946,656],{"class":246},[173,948,949],{"class":183},"\"INBOX\u002Freport_spam\"",[173,951,952],{"class":246}," ];\n",[173,954,955],{"class":175,"line":607},[173,956,620],{"class":246},[173,958,959],{"class":175,"line":612},[173,960,961],{"class":498},"# Catch replied or forwarded spam\n",[173,963,964,967,970,973,976,979,981,984,987,990,992,994],{"class":175,"line":617},[173,965,966],{"class":293},"elsif",[173,968,969],{"class":246}," anyof (allof (hasflag ",[173,971,972],{"class":183},"\"",[173,974,975],{"class":293},"\\\\",[173,977,978],{"class":183},"Answered\"",[173,980,888],{"class":246},[173,982,983],{"class":222},":contains",[173,985,986],{"class":183}," \"imap.changedflags\"",[173,988,989],{"class":183}," \"",[173,991,975],{"class":293},[173,993,978],{"class":183},[173,995,996],{"class":246},"),\n",[173,998,1000,1003,1006,1008,1010,1012,1015],{"class":175,"line":999},21,[173,1001,1002],{"class":246},"             allof (hasflag ",[173,1004,1005],{"class":183},"\"$Forwarded\"",[173,1007,888],{"class":246},[173,1009,983],{"class":222},[173,1011,986],{"class":183},[173,1013,1014],{"class":183}," \"$Forwarded\"",[173,1016,1017],{"class":246},")) {\n",[173,1019,1021,1023,1025],{"class":175,"line":1020},22,[173,1022,903],{"class":246},[173,1024,906],{"class":183},[173,1026,848],{"class":246},[173,1028,1030,1032,1035],{"class":175,"line":1029},23,[173,1031,903],{"class":246},[173,1033,1034],{"class":183},"\"learn-spam copy to INBOX\u002Freport_spam_reply\"",[173,1036,848],{"class":246},[173,1038,1040,1042,1044,1046,1048,1050,1052,1054,1056,1058,1060,1063],{"class":175,"line":1039},24,[173,1041,922],{"class":246},[173,1043,925],{"class":222},[173,1045,928],{"class":183},[173,1047,931],{"class":246},[173,1049,934],{"class":183},[173,1051,656],{"class":246},[173,1053,939],{"class":183},[173,1055,656],{"class":246},[173,1057,944],{"class":183},[173,1059,656],{"class":246},[173,1061,1062],{"class":183},"\"INBOX\u002Freport_spam_reply\"",[173,1064,952],{"class":246},[173,1066,1068],{"class":175,"line":1067},25,[173,1069,620],{"class":246},[12,1071,623,1072,627,1075,631,1078,635],{},[42,1073,1074],{},"learn-ham.sieve",[122,1076,1077],{},"ham learning",[42,1079,1080],{},"learn-ham",[134,1082,1084],{"className":638,"code":1083,"filename":1074,"language":640,"meta":142,"style":142},"require [\"vnd.dovecot.pipe\", \"copy\", \"imapsieve\", \"environment\", \"variables\", \"vnd.dovecot.debug\"];\n\n# Exclude messages which were moved to Trash (or training mailboxes) from ham learning\nif environment :matches \"imap.mailbox\" \"*\" {\n    set \"mailbox\" \"${1}\";\n}\nif string \"${mailbox}\" [ \"INBOX\u002FTrash\", \"INBOX\u002FDeleted Items\", \"INBOX\u002FBin\", \"INBOX\u002Ftrain_ham\", \"INBOX\u002Ftrain_prob\", \"INBOX\u002Ftrain_spam\" ] {\n    stop;\n}\n\n# Logging\nif address :matches \"from\" \"*\" { set \"FROM\" \"${1}\"; }\nif address :matches \"to\" \"*\" { set \"TO\" \"${1}\"; }\nif header :matches \"subject\" \"*\" { set \"SUBJECT\" \"${1}\"; }\nif header :matches \"Message-ID\" \"*\" { set \"MSGID\" \"${1}\"; }\nif header :matches \"X-Spamd-Result\" \"*\" { set \"XSpamdResult\" \"${1}\"; }\nif environment :matches \"imap.cause\" \"*\" { set \"IMAPCAUSE\" \"${1}\"; }\ndebug_log \"learn-ham on imap.cause=${IMAPCAUSE}: from=${FROM}, to=${TO}, subject=${SUBJECT}, msgid=${MSGID}, X-Spamd-Result=${XSpamdResult}\";\n\n# Ham-learning by storing a copy of the message into spam@example.com\ndebug_log \"learn-ham copy to INBOX\u002Freport_ham\";\npipe :copy \"dovecot-lda\" [ \"-d\", \"spam@example.com\", \"-m\", \"INBOX\u002Freport_ham\" ];\n",[42,1085,1086,1116,1120,1125,1141,1153,1157,1200,1205,1209,1213,1217,1237,1257,1277,1297,1317,1337,1346,1350,1355,1364],{"__ignoreMap":142},[173,1087,1088,1090,1092,1094,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114],{"class":175,"line":176},[173,1089,647],{"class":293},[173,1091,650],{"class":246},[173,1093,653],{"class":183},[173,1095,656],{"class":246},[173,1097,659],{"class":183},[173,1099,656],{"class":246},[173,1101,664],{"class":183},[173,1103,656],{"class":246},[173,1105,669],{"class":183},[173,1107,656],{"class":246},[173,1109,684],{"class":183},[173,1111,656],{"class":246},[173,1113,679],{"class":183},[173,1115,687],{"class":246},[173,1117,1118],{"class":175,"line":190},[173,1119,505],{"emptyLinePlaceholder":504},[173,1121,1122],{"class":175,"line":204},[173,1123,1124],{"class":498},"# Exclude messages which were moved to Trash (or training mailboxes) from ham learning\n",[173,1126,1127,1129,1131,1133,1136,1138],{"class":175,"line":214},[173,1128,701],{"class":293},[173,1130,821],{"class":246},[173,1132,707],{"class":222},[173,1134,1135],{"class":183}," \"imap.mailbox\"",[173,1137,713],{"class":183},[173,1139,1140],{"class":246}," {\n",[173,1142,1143,1146,1149,1151],{"class":175,"line":232},[173,1144,1145],{"class":246},"    set ",[173,1147,1148],{"class":183},"\"mailbox\"",[173,1150,722],{"class":183},[173,1152,848],{"class":246},[173,1154,1155],{"class":175,"line":243},[173,1156,620],{"class":246},[173,1158,1159,1161,1164,1167,1169,1172,1174,1177,1179,1182,1184,1187,1189,1192,1194,1197],{"class":175,"line":523},[173,1160,701],{"class":293},[173,1162,1163],{"class":246}," string ",[173,1165,1166],{"class":183},"\"${mailbox}\"",[173,1168,931],{"class":246},[173,1170,1171],{"class":183},"\"INBOX\u002FTrash\"",[173,1173,656],{"class":246},[173,1175,1176],{"class":183},"\"INBOX\u002FDeleted Items\"",[173,1178,656],{"class":246},[173,1180,1181],{"class":183},"\"INBOX\u002FBin\"",[173,1183,656],{"class":246},[173,1185,1186],{"class":183},"\"INBOX\u002Ftrain_ham\"",[173,1188,656],{"class":246},[173,1190,1191],{"class":183},"\"INBOX\u002Ftrain_prob\"",[173,1193,656],{"class":246},[173,1195,1196],{"class":183},"\"INBOX\u002Ftrain_spam\"",[173,1198,1199],{"class":246}," ] {\n",[173,1201,1202],{"class":175,"line":528},[173,1203,1204],{"class":246},"    stop;\n",[173,1206,1207],{"class":175,"line":534},[173,1208,620],{"class":246},[173,1210,1211],{"class":175,"line":543},[173,1212,505],{"emptyLinePlaceholder":504},[173,1214,1215],{"class":175,"line":552},[173,1216,696],{"class":498},[173,1218,1219,1221,1223,1225,1227,1229,1231,1233,1235],{"class":175,"line":561},[173,1220,701],{"class":293},[173,1222,704],{"class":246},[173,1224,707],{"class":222},[173,1226,710],{"class":183},[173,1228,713],{"class":183},[173,1230,716],{"class":246},[173,1232,719],{"class":183},[173,1234,722],{"class":183},[173,1236,725],{"class":246},[173,1238,1239,1241,1243,1245,1247,1249,1251,1253,1255],{"class":175,"line":566},[173,1240,701],{"class":293},[173,1242,704],{"class":246},[173,1244,707],{"class":222},[173,1246,736],{"class":183},[173,1248,713],{"class":183},[173,1250,716],{"class":246},[173,1252,743],{"class":183},[173,1254,722],{"class":183},[173,1256,725],{"class":246},[173,1258,1259,1261,1263,1265,1267,1269,1271,1273,1275],{"class":175,"line":572},[173,1260,701],{"class":293},[173,1262,754],{"class":246},[173,1264,707],{"class":222},[173,1266,759],{"class":183},[173,1268,713],{"class":183},[173,1270,716],{"class":246},[173,1272,766],{"class":183},[173,1274,722],{"class":183},[173,1276,725],{"class":246},[173,1278,1279,1281,1283,1285,1287,1289,1291,1293,1295],{"class":175,"line":581},[173,1280,701],{"class":293},[173,1282,754],{"class":246},[173,1284,707],{"class":222},[173,1286,781],{"class":183},[173,1288,713],{"class":183},[173,1290,716],{"class":246},[173,1292,788],{"class":183},[173,1294,722],{"class":183},[173,1296,725],{"class":246},[173,1298,1299,1301,1303,1305,1307,1309,1311,1313,1315],{"class":175,"line":589},[173,1300,701],{"class":293},[173,1302,754],{"class":246},[173,1304,707],{"class":222},[173,1306,803],{"class":183},[173,1308,713],{"class":183},[173,1310,716],{"class":246},[173,1312,810],{"class":183},[173,1314,722],{"class":183},[173,1316,725],{"class":246},[173,1318,1319,1321,1323,1325,1327,1329,1331,1333,1335],{"class":175,"line":598},[173,1320,701],{"class":293},[173,1322,821],{"class":246},[173,1324,707],{"class":222},[173,1326,826],{"class":183},[173,1328,713],{"class":183},[173,1330,716],{"class":246},[173,1332,833],{"class":183},[173,1334,722],{"class":183},[173,1336,725],{"class":246},[173,1338,1339,1341,1344],{"class":175,"line":607},[173,1340,842],{"class":246},[173,1342,1343],{"class":183},"\"learn-ham on imap.cause=${IMAPCAUSE}: from=${FROM}, to=${TO}, subject=${SUBJECT}, msgid=${MSGID}, X-Spamd-Result=${XSpamdResult}\"",[173,1345,848],{"class":246},[173,1347,1348],{"class":175,"line":612},[173,1349,505],{"emptyLinePlaceholder":504},[173,1351,1352],{"class":175,"line":617},[173,1353,1354],{"class":498},"# Ham-learning by storing a copy of the message into spam@example.com\n",[173,1356,1357,1359,1362],{"class":175,"line":999},[173,1358,842],{"class":246},[173,1360,1361],{"class":183},"\"learn-ham copy to INBOX\u002Freport_ham\"",[173,1363,848],{"class":246},[173,1365,1366,1369,1371,1373,1375,1377,1379,1381,1383,1385,1387,1390],{"class":175,"line":1020},[173,1367,1368],{"class":246},"pipe ",[173,1370,925],{"class":222},[173,1372,928],{"class":183},[173,1374,931],{"class":246},[173,1376,934],{"class":183},[173,1378,656],{"class":246},[173,1380,939],{"class":183},[173,1382,656],{"class":246},[173,1384,944],{"class":183},[173,1386,656],{"class":246},[173,1388,1389],{"class":183},"\"INBOX\u002Freport_ham\"",[173,1391,952],{"class":246},[12,1393,1394],{},"Prepare Dovecot and compile global Sieve scripts:",[134,1396,1398],{"className":167,"code":1397,"language":169,"meta":142,"style":142},"$ ln -s \u002Fusr\u002Flib\u002Fdovecot\u002Fdovecot-lda \u002Fusr\u002Flocal\u002Fsbin\u002Fdovecot-lda\n$ sievec \u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-spam.sieve\n$ sievec \u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-ham.sieve\n",[42,1399,1400,1416,1426],{"__ignoreMap":142},[173,1401,1402,1404,1407,1410,1413],{"class":175,"line":176},[173,1403,180],{"class":179},[173,1405,1406],{"class":183}," ln",[173,1408,1409],{"class":222}," -s",[173,1411,1412],{"class":183}," \u002Fusr\u002Flib\u002Fdovecot\u002Fdovecot-lda",[173,1414,1415],{"class":183}," \u002Fusr\u002Flocal\u002Fsbin\u002Fdovecot-lda\n",[173,1417,1418,1420,1423],{"class":175,"line":190},[173,1419,180],{"class":179},[173,1421,1422],{"class":183}," sievec",[173,1424,1425],{"class":183}," \u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-spam.sieve\n",[173,1427,1428,1430,1432],{"class":175,"line":204},[173,1429,180],{"class":179},[173,1431,1422],{"class":183},[173,1433,1434],{"class":183}," \u002Fvar\u002Flib\u002Fdovecot\u002Fsieve\u002Flearn-ham.sieve\n",[12,1436,1437,1438,483],{},"Once this is all set up, monitor ",[42,1439,1440],{},"mail.log",[134,1442,1444],{"className":167,"code":1443,"language":169,"meta":142,"style":142},"$ tail -f \u002Fvar\u002Flog\u002Fmail.log | grep -E 'sieve.*learn'\n",[42,1445,1446],{"__ignoreMap":142},[173,1447,1448,1450,1452,1454,1457,1460,1463,1466],{"class":175,"line":176},[173,1449,180],{"class":179},[173,1451,371],{"class":183},[173,1453,374],{"class":222},[173,1455,1456],{"class":183}," \u002Fvar\u002Flog\u002Fmail.log",[173,1458,1459],{"class":293}," |",[173,1461,1462],{"class":179}," grep",[173,1464,1465],{"class":222}," -E",[173,1467,1468],{"class":183}," 'sieve.*learn'\n",[12,1470,1471,1472,1474,1475,1478,1479,1481,1482,467],{},"Emails are now copied from all mailaccounts to the spam\u002Fham learning mailbox on ",[16,1473,79],{"href":78}," and ",[16,1476,393],{"href":99,"rel":1477},[20]," feeds it to Rspamd for Bayesian learning. If ever you want to reverse learning, simply move the (wrongly learned) emails from any ",[42,1480,156],{}," folder to ",[42,1483,152],{},[110,1485,1487],{"id":1486},"maintenance","Maintenance",[12,1489,1490,1491,1493],{},"Make sure you set quota for the global mailaccount ",[16,1492,79],{"href":78}," high enough, so that you never run out of storage space. Also make sure you protect that account with a strong password and never hand those credentials out to anybody else than the sysadmin of your mail infrastruture (geeky you, as probably you wouldn't have read this article if it was somebody else), as this mailaccount may contain sensible emails from your friends\u002Fcustomers.",[12,1495,1496,1497,1500],{},"And, once in a while, do some cleanup and e.g. remove any learned messages that are older than 90 days, using ",[42,1498,1499],{},"doveadm"," on your Dovecot mailserver:",[134,1502,1504],{"className":167,"code":1503,"language":169,"meta":142,"style":142},"# check number of messages and mailbox size of INBOX\u002Flearned_spam\n$ doveadm mailbox status -u spam@example.com 'messages vsize' INBOX\u002Flearned_spam\n# remove any emails older than 90d from INBOX\u002Flearned_spam\n$ doveadm expunge -u spam@example.com mailbox INBOX\u002Flearned_spam BEFORE 90d > \u002Fdev\u002Fnull 2>&1\n\n# check number of messages and mailbox size of INBOX\u002Flearned_ham\n$ doveadm mailbox status -u spam@example.com 'messages vsize' INBOX\u002Flearned_ham\n# remove any emails older than 90d from INBOX\u002Flearned_ham\n$ doveadm expunge -u spam@example.com mailbox INBOX\u002Flearned_ham BEFORE 90d > \u002Fdev\u002Fnull 2>&1\n",[42,1505,1506,1511,1536,1541,1574,1578,1583,1602,1607],{"__ignoreMap":142},[173,1507,1508],{"class":175,"line":176},[173,1509,1510],{"class":498},"# check number of messages and mailbox size of INBOX\u002Flearned_spam\n",[173,1512,1513,1515,1518,1521,1524,1527,1530,1533],{"class":175,"line":190},[173,1514,180],{"class":179},[173,1516,1517],{"class":183}," doveadm",[173,1519,1520],{"class":183}," mailbox",[173,1522,1523],{"class":183}," status",[173,1525,1526],{"class":222}," -u",[173,1528,1529],{"class":183}," spam@example.com",[173,1531,1532],{"class":183}," 'messages vsize'",[173,1534,1535],{"class":183}," INBOX\u002Flearned_spam\n",[173,1537,1538],{"class":175,"line":204},[173,1539,1540],{"class":498},"# remove any emails older than 90d from INBOX\u002Flearned_spam\n",[173,1542,1543,1545,1547,1550,1552,1554,1556,1559,1562,1565,1568,1571],{"class":175,"line":214},[173,1544,180],{"class":179},[173,1546,1517],{"class":183},[173,1548,1549],{"class":183}," expunge",[173,1551,1526],{"class":222},[173,1553,1529],{"class":183},[173,1555,1520],{"class":183},[173,1557,1558],{"class":183}," INBOX\u002Flearned_spam",[173,1560,1561],{"class":183}," BEFORE",[173,1563,1564],{"class":183}," 90d",[173,1566,1567],{"class":293}," >",[173,1569,1570],{"class":183}," \u002Fdev\u002Fnull",[173,1572,1573],{"class":293}," 2>&1\n",[173,1575,1576],{"class":175,"line":232},[173,1577,505],{"emptyLinePlaceholder":504},[173,1579,1580],{"class":175,"line":243},[173,1581,1582],{"class":498},"# check number of messages and mailbox size of INBOX\u002Flearned_ham\n",[173,1584,1585,1587,1589,1591,1593,1595,1597,1599],{"class":175,"line":523},[173,1586,180],{"class":179},[173,1588,1517],{"class":183},[173,1590,1520],{"class":183},[173,1592,1523],{"class":183},[173,1594,1526],{"class":222},[173,1596,1529],{"class":183},[173,1598,1532],{"class":183},[173,1600,1601],{"class":183}," INBOX\u002Flearned_ham\n",[173,1603,1604],{"class":175,"line":528},[173,1605,1606],{"class":498},"# remove any emails older than 90d from INBOX\u002Flearned_ham\n",[173,1608,1609,1611,1613,1615,1617,1619,1621,1624,1626,1628,1630,1632],{"class":175,"line":534},[173,1610,180],{"class":179},[173,1612,1517],{"class":183},[173,1614,1549],{"class":183},[173,1616,1526],{"class":222},[173,1618,1529],{"class":183},[173,1620,1520],{"class":183},[173,1622,1623],{"class":183}," INBOX\u002Flearned_ham",[173,1625,1561],{"class":183},[173,1627,1564],{"class":183},[173,1629,1567],{"class":293},[173,1631,1570],{"class":183},[173,1633,1573],{"class":293},[12,1635,1636],{},"You might automate this cleanup task with a script that you run in a cronjob or Systemd timer.",[12,1638,1639],{},"Happy learning and never stop fighting spam!",[1641,1642,1643],"style",{},"html pre.shiki code .sQJ0q, html code.shiki .sQJ0q{--shiki-light:#953800;--shiki-default:#953800;--shiki-dark:#FFA657}html pre.shiki code .s-BGO, html code.shiki .s-BGO{--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF}html pre.shiki code .sDkKp, html code.shiki .sDkKp{--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF}html pre.shiki code .s_bOF, html code.shiki .s_bOF{--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s5nWI, html code.shiki .s5nWI{--shiki-light:#CF222E;--shiki-default:#CF222E;--shiki-dark:#FF7B72}html pre.shiki code .s9BHP, html code.shiki .s9BHP{--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E}",{"title":142,"searchDepth":190,"depth":204,"links":1645},[1646,1647,1648],{"id":112,"depth":190,"text":113},{"id":397,"depth":190,"text":398},{"id":1486,"depth":190,"text":1487},[1650],{"link":99,"desc":101},"2020-03-11","Automated Bayes Spam\u002FHam training with Rspamd and Dovecot \u002F IMAPSieve.",{"type":9,"value":1654},[1655,1673],[12,1656,14,1657,22,1660,28,1663,34,1666,40,1669,45,1671,49],{},[16,1658,21],{"href":18,"rel":1659},[20],[16,1661,27],{"href":25,"rel":1662},[20],[16,1664,33],{"href":31,"rel":1665},[20],[16,1667,39],{"href":37,"rel":1668},[20],[42,1670,44],{},[42,1672,48],{},[12,1674,52],{},"md","\u002Fimages\u002Fcovers\u002Frspamd.jpg",{},"\u002Farticles\u002F20200311-rspamd-trainer-bayes",false,null,{"title":6,"description":1652},"articles\u002F20200311-rspamd-trainer-bayes",[1684,1685,1686,1687,1688],"rspamd","dovecot","python","email","sysadmin","suf6fIk7Swg0VBU0JuFZv_rMqCXntumetn2Ygax7--A",[1691,1696],{"title":1692,"path":1693,"stem":1694,"createdAt":1695,"children":-1},"Process hiding in LXC using hidepid capabilities of procfs","\u002Farticles\u002F20180806-lxc-hidepid-process-hiding","articles\u002F20180806-lxc-hidepid-process-hiding","2018-08-06",{"title":1697,"path":1698,"stem":1699,"createdAt":1700,"children":-1},"MySQL MyISAM to InnoDB Conversion","\u002Farticles\u002F20201222-mysql-myisam-to-innodb","articles\u002F20201222-mysql-myisam-to-innodb","2020-12-22",1794781278948]