{"id":293,"date":"2015-06-29T02:27:10","date_gmt":"2015-06-29T02:27:10","guid":{"rendered":"https:\/\/www.eskimo.com\/support\/?page_id=293"},"modified":"2015-12-31T18:31:19","modified_gmt":"2015-12-31T18:31:19","slug":"procmail-system-rules","status":"publish","type":"page","link":"https:\/\/www.eskimo.com\/support\/mail\/procmail-system-rules\/","title":{"rendered":"Procmail System Rules"},"content":{"rendered":"<p style=\"text-align: center;\"><span style=\"font-family: arial,helvetica,sans-serif; font-size: 20pt; color: #008000;\">System Procmail Rules<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 Procmail is used as the local mail delivery agent and also to invoke <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">SpamAssassin to tag suspected spam<\/span><span style=\"font-family: arial,helvetica,sans-serif;\">. Because it is the default local delivery agent, <strong>a .forward is not required to invoke procmail rules<\/strong>. For those of you who are already <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">familiar with procmail, here are the system-wide rules:<\/span><\/span><\/p>\n<pre style=\"color: #402020;\"><span style=\"font-size: 12pt;\">     DROPPRIVS=yes\r\n     MAILDIR=$HOME\/mail\r\n     INCLUDERC=\/etc\/mail\/spamassassin\/spamassassin-default.rc\r\n     :0:\r\n     * ? test ! -f $HOME\/.procmailrc\r\n     * ^X-Spam-Status: Yes\r\n     spam\r\n<\/span><\/pre>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 The first rule causes procmail to execute with the recipients <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">permissions for security reasons and also to ensure that spamassassin <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">reads your user preferences and creates files with your ownership so you <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">can edit them.<\/span><\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 The next rule tells procmail that your mail folders are located in a <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">subdirectory called &#8220;mail&#8221; in your home directory. Then <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">procmail calls spam assassin to evaluate mail as spam or non-spam and add <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">an X-Spam-Status: line with a Yes\/No result.<\/span><\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 Next, we check to see if you have your own &#8220;.procmailrc&#8221; <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">file. If you do not, we place any mail tagged as spam in your <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">&#8220;spam&#8221; mail folder. If you do have your own <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">&#8220;.procmailrc&#8221; file, then we only tag the spam and leave it up to <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">your rules to determine what to do with it.<\/span><\/span><\/p>\n<p><strong><span style=\"font-family: arial,helvetica,sans-serif; font-size: 14pt;\">Simple Examples<\/span><\/strong><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 If you want to send all e-mail that is scored as spam by spamassassin <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">to your spam folder, the following rule would do it. This is also the <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">default behavior if you have no .procmailrc at all.<\/span><\/span><\/p>\n<pre style=\"color: #402020;\"><span style=\"font-size: 12pt;\">     :0:\r\n     * ^X-Spam-Status: Yes\r\n     spam\r\n<\/span><\/pre>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 If you are <strong>extremely trusting<\/strong> and just want to discard all e-mail that <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">spamassassin determines to be spam, the following rule would do that.<\/span><\/span><\/p>\n<pre style=\"color: #402020;\"><span style=\"font-size: 12pt;\">     :0:\r\n     * ^X-Spam-Status: Yes\r\n     \/dev\/null\r\n<\/span><\/pre>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 On Linux and other Unix-like operating systems, \/dev\/null is a data <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">sink. That is any data sent to it is discarded.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>System Procmail Rules \u00a0\u00a0\u00a0\u00a0 Procmail is used as the local mail delivery agent and also to invoke SpamAssassin to tag suspected spam. Because it is the default local delivery agent, a .forward is not required to invoke procmail rules. For &hellip; <a href=\"https:\/\/www.eskimo.com\/support\/mail\/procmail-system-rules\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":270,"menu_order":0,"comment_status":"open","ping_status":"open","template":"showcase.php","meta":{"footnotes":""},"class_list":["post-293","page","type-page","status-publish","hentry","wpautop"],"_links":{"self":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":0,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/293\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/270"}],"wp:attachment":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/media?parent=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}