{"id":2539,"date":"2010-02-16T22:00:42","date_gmt":"2010-02-17T03:00:42","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=2539"},"modified":"2010-02-16T22:00:42","modified_gmt":"2010-02-17T03:00:42","slug":"whitelisting-a-user-in-spamassassin","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/","title":{"rendered":"Whitelisting a user in Spamassassin"},"content":{"rendered":"<p>Adding a user to your whitelist gives them a -100 score, which has the effect of always marking their mail as non-spam. To manually whitelist a particular address, say <code>d.cary@sparkingwire.com<\/code> edit your local user prefs file<br \/>\n<code><br \/>\nvim ~\/.spamassassin\/user_prefs<br \/>\n<\/code><br \/>\nor globally<br \/>\n<code><br \/>\nvim \/etc\/mail\/spamassassin\/local.cf<br \/>\n# whitelist David Cary:<br \/>\nwhitelist_from  d.cary@sparkingwire.com<br \/>\n<\/code><\/p>\n<p>Whitelist and blacklist addresses are file-glob-style patterns, so <code>friend@somewhere.com<\/code>, *@isp.com, or *.domain.net will all work.<br \/>\n<code><br \/>\n# whitelist everyone at sparkingwire.com:<br \/>\nwhitelist_from  *@sparkingwire.com<br \/>\n<\/code><\/p>\n<h3>To manually blacklist, use blacklist_from to add an address to your blacklist.<\/h3>\n<p>If the sender is at all well known (such as a mailing list), you should use whitelist_from_rcvd instead so that a spammer can&#8217;t forge their mail to look like it&#8217;s from the whitelisted address. More info on whitelist_from, whitelist_from_rcvd, and blacklist_from is on the web or can be accessed from your local man pages by typing<br \/>\n<code><br \/>\nperldoc Mail::SpamAssassin::Conf.<br \/>\n<\/code><br \/>\n(you may need to install the perl-doc package to use this program.)<\/p>\n<p>Some good, free web-based tools are available to put a friendly user interface on whitelists (and blacklists) and allow users to edit their own. See <a href=\"http:\/\/wiki.apache.org\/spamassassin\/WebUserInterfaces\" target=\"_blank\" rel=\"noopener noreferrer\">WebUserInterfaces<\/a>.<\/p>\n<h3>What is AutoWhitelist?<\/h3>\n<p>Another feature of spamassassin is &#8220;auto-whitelist&#8221;. But the name is a misnomer. The AutoWhitelist is designed as an automatic score averaging system, and is just as likely to penalize or blacklist an address as it is to benefit or whitelist it. If you want to whitelist, you should use the directions above.<\/p>\n<h3>Automatically whitelisting people you&#8217;ve emailed<\/h3>\n<p>To extract a unique list of e-mail addresses from your &#8216;Sent&#8217; folder (in mbox format), you could use something like this:<br \/>\n<code><br \/>\nSADIR=~\/.spamassassin<br \/>\nSENTMAIL=~\/mail\/Sent<\/p>\n<p>rm -f $SADIR\/sent_whitelist<br \/>\nfor x in `grep \"^To:\" $SENTMAIL |<br \/>\n        grep -o \"[[:alnum:]\\.\\+\\-\\_]*@[[:alnum:]\\.\\-]*\" |<br \/>\n        tr \"A-Z\" \"a-z\" |<br \/>\n        sort -u` ;<\/p>\n<p>        do echo \"whitelist_from $x\" >> $SADIR\/sent_whitelist<br \/>\ndone<\/p>\n<p>cat $SADIR\/user_prefs.base $SADIR\/sent_whitelist > $SADIR\/user_prefs<br \/>\n<\/code><br \/>\nThis can be adapted as necessary, and executed as a cron job. Note, this requires you to store\/rename your user_prefs file to user_prefs.base! Make sure you do this before running the script or you&#8217;ll lose your preferences. Of course if there is some way I&#8217;m not aware of to include files from within a user_prefs file, please someone make the necessary changes.<\/p>\n<p>(There is a way: include filename &#8211; Include configuration lines from &#8220;filename&#8221;. Relative paths are considered relative to the current configuration file or user preferences file.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding a user to your whitelist gives them a -100 score, which has the effect of always marking their mail as non-spam. To manually whitelist a particular address, say d.cary@sparkingwire.com edit your local user prefs file vim ~\/.spamassassin\/user_prefs or globally vim \/etc\/mail\/spamassassin\/local.cf # whitelist David Cary: whitelist_from d.cary@sparkingwire.com Whitelist and blacklist addresses are file-glob-style patterns,&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2539","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Whitelisting a user in Spamassassin - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Whitelisting a user in Spamassassin - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Adding a user to your whitelist gives them a -100 score, which has the effect of always marking their mail as non-spam. To manually whitelist a particular address, say d.cary@sparkingwire.com edit your local user prefs file vim ~\/.spamassassin\/user_prefs or globally vim \/etc\/mail\/spamassassin\/local.cf # whitelist David Cary: whitelist_from d.cary@sparkingwire.com Whitelist and blacklist addresses are file-glob-style patterns,... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2010-02-17T03:00:42+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Whitelisting a user in Spamassassin\",\"datePublished\":\"2010-02-17T03:00:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/\"},\"wordCount\":350,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/\",\"name\":\"Whitelisting a user in Spamassassin - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2010-02-17T03:00:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/whitelisting-a-user-in-spamassassin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Whitelisting a user in Spamassassin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Whitelisting a user in Spamassassin - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/","og_locale":"en_US","og_type":"article","og_title":"Whitelisting a user in Spamassassin - Linux Shtuff","og_description":"Adding a user to your whitelist gives them a -100 score, which has the effect of always marking their mail as non-spam. To manually whitelist a particular address, say d.cary@sparkingwire.com edit your local user prefs file vim ~\/.spamassassin\/user_prefs or globally vim \/etc\/mail\/spamassassin\/local.cf # whitelist David Cary: whitelist_from d.cary@sparkingwire.com Whitelist and blacklist addresses are file-glob-style patterns,... Read More","og_url":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2010-02-17T03:00:42+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Whitelisting a user in Spamassassin","datePublished":"2010-02-17T03:00:42+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/"},"wordCount":350,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/","url":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/","name":"Whitelisting a user in Spamassassin - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2010-02-17T03:00:42+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/whitelisting-a-user-in-spamassassin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Whitelisting a user in Spamassassin"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/2539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=2539"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/2539\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=2539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=2539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=2539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}