{"id":340,"date":"2011-01-03T21:32:36","date_gmt":"2011-01-03T21:32:36","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=340"},"modified":"2011-10-03T21:34:14","modified_gmt":"2011-10-03T21:34:14","slug":"using-fetchmail-with-exchange-at-the-wellcome-trust-sanger-institute","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2011\/01\/using-fetchmail-with-exchange-at-the-wellcome-trust-sanger-institute\/","title":{"rendered":"Using fetchmail with Exchange at the Wellcome Trust Sanger Institute"},"content":{"rendered":"<p>This a post migrated from my old blog at Linuxjunk:<\/p>\n<p>If you ever go work at Sanger and you&#8217;re a UNIX\/mutt\/pine user get them to put you on the UNIX mail server not the Exchange server, once they&#8217;ve set you up on one they&#8217;ll never change it&#8230; If you&#8217;re on exchange it&#8217;ll be a world of pain and mutt will take 30mins to open your mailbox over IMAP (fact).<\/p>\n<p>However, if you do find yourself on an exchange server you can use fetchmail to grab your mail and filter it in to a mailbox using procmail. Here&#8217;s the fetchmail config I use at Sanger, put this in .fetchmailrc:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nset postmaster YOURUSERNAME\r\n\r\npoll exchsrv2 with proto imap user &quot;YOURUSERNAME&quot; there with password &quot;YOURPASSWORD&quot; is &quot;YOURUSERNAME&quot; here keep options stripcr\r\nmda &quot;procmail -f %F&quot;\r\n<\/pre>\n<p>This is my .procmailrc it also forwards to an external address as well as delivering to a local mailbox:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nset postmaster YOURUSERNAME\r\nSHELL=\/bin\/sh\r\nDEFAULT=\/var\/mail\/YOURUSERNAME\r\nLOGFILE=\/Users\/YOURUSERNAME\/procmail.log\r\n\r\nMAILDIR=$HOME\/mail\r\nDEFAULT=$MAILDIR\/inbox\r\n\r\nPMDIR=$HOME\/Procmail\r\n\r\nINCLUDERC=$PMDIR\/rc.subscriptions\r\n\r\n:0c                     # That's colon, zero, lowercase cee\r\n! AFORWARD@ADDRESS.COM     # That's exclamation mark, address to forward to\r\n<\/pre>\n<p>You&#8217;ll need to configure postfix or whatever (I&#8217;m on a Mac) to relay mail via the local SMTP server as well. For postfix\/max stick this in main.cf:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nrelayhost = mail.internal.sanger.ac.uk\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This a post migrated from my old blog at Linuxjunk: If you ever go work at Sanger and you&#8217;re a UNIX\/mutt\/pine user get them to put you on the UNIX mail server not the Exchange server, once they&#8217;ve set you up on one they&#8217;ll never change it&#8230; If you&#8217;re on exchange it&#8217;ll be a world [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-340","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-5u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=340"}],"version-history":[{"count":1,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}