Mail-Attachments via Perl über POP3 abrufen und in einem Ordner ablegen

Etwas speziell, kann aber vielleicht der eine oder andere brauchen: Von einem POP3-Server sollen alle Attachments extrahiert werden und danach die Mails gelöscht werden. Die Anforderung ist hier speziell für die Veröffentlichung von Content per E-Mail. Es werden per Cron einmal täglich die Anhänge ausgelesen und veröffentlicht.

Ich habe das ganze mit Perl und den beiden Modulen Mail::POP3Client und Mail::MboxParser umgesetzt. Diese müssen vorher per CPAN installiert werden.
Das geht ganz einfach so:

cpan install Mail::POP3Client
cpan install Mail::MboxParser
cpan install Date::Format

Falls ihr cpan das erste mal startet, will es noch konfiguriert werden. Die meisten Einstellungen können einfach per Return mit dem Standardwert bestätigt werden.

Das Script ist extrem simpel, ohne Fehlerhandling und kann leicht angepasst werden:

#!/usr/bin/perl -w

#Muss vorher per CPAN installiert werden
use Mail::POP3Client;
use Mail::MboxParser::Mail;
use Date::Format;

#USESSL wird z.B. bei GMail gebraucht
my $pop = new Mail::POP3Client (USER => ‚user‘,
PASSWORD => ‚pass‘,
HOST => ‚pop.gmail.com‘,
DEBUG => 1,
USESSL => 1);

print $pop->Message();

for my $i (1 .. $pop->Count) {
my $datetime = time2str(‚%Y%m%d%H%M%S‘, time);
my $msg = Mail::MboxParser::Mail->new( [ $pop->Head($i) ],
[ $pop->Body($i) ] );
#Wo sollen die Attachments hin?
$msg->store_all_attachments( path => ‚/tmp/test‘, prefix => $datetime );

#Auskommentieren, falls die Mails vom Server gelöscht werden sollen
#$pop->Delete($i);

print $pop->Message();
}

$pop->Close();

Update am 20.02.2009: Timestamp-Prefix für die Dateinamen hinzugefügt. Achtung: Jetzt wird das Paket Date::Format gebraucht!

KeePass für das iPhone: iKeepass

Zufällig ist ein Kollege von mir einer der beiden Entwickler von iKeepass, der Portierung von KeePass für das iPhone. Daher durfte ich auch schon in den Genuss der inoffiziellen Beta-Version kommen, und darf sagen dass es schon perfekt funktioniert. Es wurde auch schon in den Appstore eingereicht, aber momentan gibt es noch etwas Probleme bzw. Unklarheiten wegen der starken Verschlüsselung die verwendet wird. Sollte das geklärt sein, dürfte iKeepass die nächsten Tage im Appstore zu finden sein! Natürlich kostenlos und als OpenSource veröffentlicht. Was will man mehr?

Foldershare ist jetzt Microsoft LiveSync

Eben hat mich mein Folderhare mit der Meldung begrüsst, dass der Client zu alt sei um sich zu verbinden. Und siehe da: Was schon vor längerem angekündigt wurde, ist nun passiert: Foldershare.com gibt es nicht mehr und Microsoft hat LiveSync aktiviert. Leider kann man anscheinend den alten Account nicht migrieren, sondern muss einen Passport Account nutzen. Egal. Gleich die Mac Software runtergeladen und installiert UND SIEHE DA: Es ist ein Universal Binary. Damit hat auch meine letzte PPC-Anwendung, nämlich der Foldershare Satellit ausgedient!
Ansonsten bleibt alles beim Alten. Sogar die Symbole auf der Webseite sind die selben…

Parallels Desktop 4.0 Closed Beta

Parallels lässt auch mal wieder von sich hören. Für mich allerdings uninteressant. VMWare Fusion hat sich gegenüber Parallels um einiges stabiler erwiesen. Von den Features her hat es Parallels ja schon länger überholt…

„Parallels Desktop 4.0 for Mac Features:

More features will be added soon! Bookmark this page in your web browser to stay up-to-date on the latest Parallels Desktop 4.0 for Mac Beta developments!
Enhanced Performance

The new generation high performance lightweight hypervisor engine allows Parallels Desktop for Mac beta to deliver the industry’s best performance with:

* 2-way SMP per VM (4-way to come)
* 8 GB RAM per VM
* 64-bit guest OS support
* Up to 2 TB virtual hard drives inside a VM
* Full ACPI support

Seamless OS Integration

More of today’s leading OSs means greater flexibility and a more seamless user environment.

* Run Mac OS X Server as a Guest virtual machine
* Experimental Snow Leopard support
* Migration support for VirtualBox VMs via Parallels Transporter
* Support for several Boot Camp partitions on external hard drives

Advanced Video and 3D Graphics

The first to bring Windows-only 3D graphics to the Mac desktop, Parallels continues to drive enhanced performance and 3D support.

* Includes experimental support for DirectX 9.0 and OpenGL 2.0, including DirectX Pixel Shaders 2.0 support
* Up to 128 MB video memory support

Enhanced Enterprise and Developer Support

Smoother, more flexible development for seamless inclusion into an enterprise’s infrastructure and IT environment.

* SDK and open API support to extend manageability
* Scripting support for automation
* Command Line Interface support
* PXE support to boot from the network
* Virtual Machine templates“

Meine Firefox AddOns – Nicht nur für Maxthon-Umsteiger

Da ich selbst solche Listen liebe und schon bei vielen das ein oder andere Juwel gefunden habe, gibts jetzt auch mal eine Liste von mir. Alle meine Firefox-AddOns. Diese habe ich auf all meinen Rechnern (grösstenteils auch auf meinem Mac) installiert. Genau die AddOns, die man als ehemaliger verwöhnter Maxthon/MyIE User braucht!

Aktivierte Erweiterungen: [38]
– Adblock Plus 0.7.2.2: http://adblockplus.org/ – Ohne bunte Werbung isses doch schöner. Aber bitte beachtet zu diesem Plugin unbedingt diese Seite.

– Adsense Notifier 0.9.2: http://code.mincus.com – Adsense-Stats jederzeit aktuell in der Statuszeile

– AI Roboform Toolbar for Firefox 6.8.1: http://www.roboform.com – Bereits drei Lizenzen davon erworben. Kann nicht mehr ohne sein. Zuviele Zugangsdaten und Formulare. Vermisse ich tierisch auf dem Mac.

– Allow Right-Click 0.4: http://roachfiend.com – Manche Seiten wollen nicht, dass man die Maustaste nutzt. Das sollte man immer noch selbst bestimmen können…

– BugMeNot 1.3: http://roachfiend.com – Wenn man auf einer Webseite schnell einen User braucht und sich nicht registrieren will. Funktioniert nicht immer.

– ChatZilla 0.9.76: http://chatzilla.hacksrus.com/ – Ein IRC Client gehört einfach dazu.

– Check4Change 1.6: http://check4change.mozdev.org/ – Überprüft offene Tabs auf Änderung und gibt Meldung wenns soweit ist. Tipp für die nächste Bestellung bei Apple 🙂

– CustomizeGoogle 0.54: http://www.customizegoogle.com/ – Google den eigenen Bedürfnissen anpassen

– CuteMenus – Crystal SVG 1.7.2: http://www.cutemenuproject.com/ – Ein paar nette Icons in den Menüs

– DOM Inspector 1.8.1: http://www.mozilla.org/projects/inspector/ – Zum Entwickeln toll

– Download Statusbar 0.9.4.5: http://downloadstatusbar.mozdev.org/ – Kein extra Fenster für Downloads. Endlich EIN Fenster für alles

– DownThemAll! 0.9.9.7: http://www.downthemall.net – Ein passabler Downloadmanager

– ErrorZilla 0.2: http://roachfiend.com – Anstelle von schnöden „Page not Found“ bekommt man eine Seite mit Retry, Google Cache, Wayback, Ping, Trace, Whois…. – Genial

– Fasterfox 2.0.0: http://fasterfox.mozdev.org/ – Ein paar Einstellungen tweaken. Ginge zwar anders auch aber egal. Bitte deaktivert das Pre-Fetching. Das ist böse.

– FireBug 0.4.1: http://www.joehewitt.com/software/firebug/ – JS Debugger

– Firefox Extension Backup Extension (FEBE) 4.0: http://customsoftwareconsult.com/extensions – Wenn man schon so ne schöne Sammlung an AddOns hat, sollte man sie überall haben können.

– Go Up 1.0: http://clav.mozdev.org/ – Ein Verzeichnis höher

– IE Tab 1.2.0.20061113: http://ietab.mozdev.org/ – Ab und zu braucht man ihn einfach

– InspectThis 0.2.8.1: http://firefox.mackay-it.com/extensions/inspectthis/ – Auch zum entwickeln

– keyconfig 20060828: http://mozilla.dorando.at/ – Shortcuts anpassen wie man will – Ideal für Maxthon-Umsteiger

– Linkification 1.3.0: http://yellow5.us/firefox/ – Alle Links klickbar aber frisst Performance. Besser auf manuell schalten und bei bedarf laufen lassen.

– Menu Editor 1.2.3: http://menueditor.mozdev.org/ – Zum entmisten

– MR Tech Local Install 5.3.1.1: http://www.mrtech.com/extensions/local_install/ – Alles was man zur Übersicht bei den AddOns braucht. Erzeugt auch diese Liste.

– PDF Download 0.7.6: http://www.pdfdownload.org – PDF direkt anzeigen, downloaden und anzeigen, nur downloaden oder in HTML umwandeln bei Klick auf PDF

– Performancing 1.3.5: http://performancing.com/ – Damit poste ich gerade ins Blog

– RefControl 0.8.8: http://www.stardrifter.org/refcontrol/ – Referer kontrollieren und bei Bedarf nicht übermitteln

– SmoothWheel 0.44.7.20050605: http://smoothwheel.mozdev.org/ – Damit funktioniert auch das Wheel wieder wie vom InternetExplorer gewohnt

– Stop-or-Reload Button 0.2: http://v2studio.com/k/moz/ – Warum zwei Buttons? Safari lässt grüssen.

– StumbleUpon 2.89: http://www.stumbleupon.com/ – Absolut geniale Linkcommunity. Meine Bookmarkverwaltung. Füttert zugleich dieses Blog.

– StumbleUpon Addon 1.91: http://strangej.stumbleupon.com/ – Kleines Addon für oben

– Super DragAndGo 0.2.6.1: http://forums.mozillazine.org/viewtopic.php?t=90011 – Wieder etwas für Maxthon-Umsteiger. Das hatte ich auch schmerzlich vermisst. Dazu muss man allerdings noch in den about:config die Keyword URL umbiegen. Dann klappts mit Drag-and-Search.

– Tab Mix Plus 0.3.5: http://tmp.garyr.net- Das erste was man braucht. Dann hat man einen echten Tab-Browser. Reduziert auf ein Fenster. So solls sein.

– Talkback 2.0: http://talkback.mozilla.org/ – Gebt ihnen Feedback

– Tamper Data 9.8.1: http://tamperdata.mozdev.org – Um Formulardaten zu manipulieren. Ideal für Developer und Security-Tester 🙂

– TinyUrl Creator 1.0.2: http://mozmonkey.com/ – Tinyurl auf Knopfdruck gleich in die Zwischenablage

– Update Notifier 0.1.5.2: http://www.longfocus.com/firefox/updatenotifier – Natürlich alle Updates sofort prüfen und Installieren.

– View Source Chart 2.5.02: http://jennifermadden.com – Source-Code etwas bunter

– Web Developer 1.0.2: http://chrispederick.com/work/webdeveloper/ – Die All-Inclusive-Lösung für Web-Developer

So. Vielleicht gefällt euch die Liste. Ich würde mich über interessante Tipps freuen!

Technorati Tags: , , ,

StyleTap Platform & Main page

„StyleTap® Platform allows you to run applications (and games!) originally written for Palm OS handhelds on your Windows Mobile Pocket PC. With more than 20,000 applications for the Palm OS platform available – many of them free – you will be able to do so much more with your Windows Mobile device.

StyleTap Platform is fast, compact and comes with everything you need. Just add your favorite third-party applications for Palm OS platform and you’re ready to go!“

StyleTap Platform & Main page

StyleTap Platform & Main page

The five top used Freeware Apps on my Mac

Freemacware.com started a little contest for Bloggers. You have to post your favorite Freeware Apps for Mac OS.

Here is my list:

Place #5 – Adium

The best instant Messaging Application

Place #4 – iTerm

The best Terminal Replacement

Place #3 – VLC

Must-Have Mediaplayer

Place #2 – Remote Desktop

For working remotely on Windows PCs

Place #1 – ClearDock

Why didn’t Apple include this Feature with the OS? The Dock lucks so ugly without it…

Neue Version von PearPC veröffentlicht

Von PearPC wurde gestern eine neue Version 0.4.0 veröffentlicht.

It took a while but here is finally the long awaited 0.4.0 release. This is the first release with G4 support by Daniel Foesch (you have to enable it in your config). Other feature include support for native CD-ROMs (no need for images) and endianess safety (i.e. you can run PearPC on big-endian systems).

version 0.4 (released 20. December 2005):
– CPU: stfiwx implemented
– config: „ppc_start_fullscreen“ for starting in fullscreen mode
– POSIX: allow bridging of tun device
– use FISTTP instruction on SSE3 aware processors
– merged native_cd branch from Alexander Stockinger
– endianess fixes
– warn that the generic CPU is slow
– better detection of HFS+ volumes
– support for DVD-Drives
– correctly check for NASM
– Work-around for graphic errors in Mac OS X 10.1
– POSIX/Linux: fall back to 1 GHz if /proc/cpuinfo doesn’t provide cpu frequency
– 3c90x emulation fixed
– some PROM fixed for yaboot
– alteration of x86asm interface to be more programmer friendly
– use transparent cursors instead of altering cursor visibility (hack for using PearPC
with remote desktop)
– DVD emulation implemented. Fixes problems with Tiger installation
– Updated the read_effective_* commands to be faster !!! REGRESSED !!!
– fixed lvalue casts (compiles now with gcc 4.x)
– booting from disks with bootfile about 4 GiB limit fixed