{"id":55,"date":"2004-09-16T15:37:14","date_gmt":"2004-09-16T14:37:14","guid":{"rendered":"http:\/\/www.wrigley.me.uk\/wp\/?p=55"},"modified":"2004-09-16T15:37:14","modified_gmt":"2004-09-16T14:37:14","slug":"getmail-spamassassin-and-procmail","status":"publish","type":"post","link":"https:\/\/www.wrigley.me.uk\/2004\/09\/getmail-spamassassin-and-procmail\/","title":{"rendered":"Getmail, Spamassassin and Procmail"},"content":{"rendered":"

I got a new server machine recently and spent quite a while getting it back to the same state as my old one. The thing that I found most difficult was getting my mail properly and dealing with it nicely.<\/p>\n

I used to use spamassassin run via procmail from getmail version 3 on my P75, but it made it crawl so badly I gave up. When I came to install it this time on a 1GHz Duron, I found getmail had changed a lot and my old config no longer worked. I’d also heard about spamd\/spamc and thought it sounded better. I had a lot of problems getting a working system, mainly due to annoying little things so I’ll briefly document them here for the great good (ha!).<\/p>\n

Getmail<\/a> is a much nicer replacement for the evil fetchmail and although it took a bit of getting my head around, version 4 seems even better.<\/p>\n

There are examples for all sorts of different uses. I use it to get my email from a pop3 box and then pass it to spamassassin before passing it on to procmail to filter into various folders.<\/p>\n

My getmailrc is below
\n
\n[options]
\nverbose = 2
\nread_all = true
\ndelete = true
\nmessage_log = ~\/.getmail\/log
\n<\/code>
\n
\n[retriever]
\ntype = SimplePOP3Retriever
\nserver = mail.wrigley.me.uk
\nusername = joe
\npassword = password
\n<\/code>
\n
\n[filter]
\ntype = Filter_external
\npath = \/usr\/bin\/spamc
\n<\/code>
\n
\n[destination]
\ntype = MultiDestination
\ndestinations = (\"[procmail-as-joe]\",)
\n<\/code>
\n
\n[procmail-as-joe]
\ntype = MDA_external
\npath = \/usr\/bin\/procmail
\narguments = ('~joe\/.procmailrc', )
\nuser = joe
\n<\/code><\/p>\n

The main problem I had was with getting spamd to work. It was largely down to overlooking the fact that I hadn’t enabled it. D’oh!<\/p>\n

In \/etc\/default\/spamassassin (or somewhere similar if not Debian Sarge) make sure that you set ENABLED=1<\/p>\n

Then \/etc\/init.d\/spamassassin restart<\/p>\n

I can’t be bothered to fully write this up right now. If you think I might know the answer to a question about it all, drop me a line (or leave a comment or something)<\/p>\n","protected":false},"excerpt":{"rendered":"

Getting Getmail, Spamassassin and Procmail working together.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[9],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9qMPF-T","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/posts\/55"}],"collection":[{"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":0,"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wrigley.me.uk\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}