{"id":2726,"date":"2013-12-30T17:25:47","date_gmt":"2013-12-30T16:25:47","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/?p=2726"},"modified":"2013-12-30T17:25:47","modified_gmt":"2013-12-30T16:25:47","slug":"extended-my-procmail-logfile-converter","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2013\/12\/30\/extended-my-procmail-logfile-converter\/","title":{"rendered":"extended my procmail LOGFILE converter"},"content":{"rendered":"<p>\t\t\t\tI have dozens of IMAP folders, that my <em>~\/.procmailrc<\/em> at my Internet provider&#8217;s site routes incoming messages to.\u00a0In order to see, what&#8217;s new, I find it more reasonable to look at my procmail LOGFILE. I rather (&#8220;constantly&#8221;) watch my\u00a0procmail LOGFILE with &#8220;<em>tail -f<\/em>&#8221; though.<\/p>\n<p>I really find it rather useful, to copy an entry from that log to my emacs diary once in a while. That&#8217;s why I have a converter from &#8220;procmail LOGFILE&#8221; to &#8220;emacs diary&#8221;. I pipe the &#8220;<em>tail -f ~\/procmail-from<\/em>&#8221; into my\u00a0<em>procmail-from2diary.pl<\/em>:<\/p>\n<p style=\"padding-left: 30px\"><em>ssh &#8230; -n tail -f procmail-from | procmail-from2diary.pl<\/em><\/p>\n<p>Once in a while I want to create an <em>.procmailrc<\/em> entry from a message, that I just received, resp. from the e-mail address therein. Now my <em>procmail-from2diary.pl<\/em>\u00a0also creates a secondary file with &#8220;raw&#8221; <em>.procmailrc<\/em> entries. E-mail addresses are getting properly backslashed, before they get written to there, so I just need to select the right IMAP target folder within the respective <em>.procmailrc<\/em> rule. And, yes, rather often I replace part of the e-mail address with a wildcard.<\/p>\n<p>Of course, &#8220;From:&#8221; and &#8220;Subject&#8221; need to get converted from the\u00a0<em>MIME-Header<\/em>\u00a0format to UTF-8 by a utility within my <em>.procmailrc<\/em>. Otherwise you can&#8217;t really read them.<\/p>\n<p>I really don&#8217;t know, why I did not create that feature 15 years ago. Creating <em>.procmailrc<\/em> entries really is a PITA. But copy+pasting them with only little manual work is fun (I hope). You need holidays to recognise and implement this kind of optimisation of your daily work.\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have dozens of IMAP folders, that my ~\/.procmailrc at my Internet provider&#8217;s site routes incoming messages to.\u00a0In order to see, what&#8217;s new, I find it more reasonable to look at my procmail LOGFILE. I rather (&#8220;constantly&#8221;) watch my\u00a0procmail LOGFILE with &#8220;tail -f&#8221; though. I really find it rather useful, to copy an entry from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-2726","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-HY","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/2726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=2726"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/2726\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=2726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=2726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=2726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}