linux

Maildir – Resending emails via formail and procmail

I’m sharing this because someone might find it as being useful info…

Earlier today I had to resend some emails from a users Maildir folder to an external email account. The idea is to forward the existing email in a certain Maildir folder.

To do this I used formail and procmail.

I added some basic settings to the .procmailrc so that all filtered email will be forwarded to the email I want. I looks like this:

MAILDIR=$HOME/Maildir

:0
! user@example.com

From inside the folder (Maildir folder) that contains the email that I wanted to send, I executed the command:

grep -v ^Delivered-To FILE | formail -ds /usr/bin/procmail

The grep -v ^Delivered-To instead of a cat is done to remove the Delivered-To line in the begining of any line.

And what if there are thousands of emails in the folder?

for file in *; do grep -v ^Delivered-To $file | formail -ds /usr/bin/procmail;
done

There are many tweaks that can be applied to this solution, I just didn’t need them.

I moved on to Fedora

It happened. After years of Debian and Ubuntu I changed my personal laptop’s Linux distribution to Fedora.

Why I changed to Fedora

  • GNOME 3! GNOME 3′s integration in Fedora 15 (beta) was the best around, in my humble opinion. The Ubuntu + GNOME 3 ppa wasn’t a satisfying solution;
  • I needed the challenge. For sure that I can still learn with a debian based system but I have much more to learn with a rpm based system at the moment;
  • Fedora package upstream;
  • It wasn’t because Ubuntu is a bad Linux distribution. I still think it’s great, I still use it on my work laptop and I will still advise people to use it.

Two days have passed since I changed to Fedora and I can say that yum doesn’t let me miss apt-get. It seams like a very complete and robust package manager.

In Ubuntu things were kind of automatic, I knew which files I had to tweak after each install, how to add repositories, etc.

Things I usually do after a fresh install:

  • Update the system;
  • Install the usual apps;
  • Tweak the system to my needs.

Here’s a detailed guide of what I did in Fedora, might come in handy for some other newb like me:

  • System update using Software Update (Apps, System Tools in GNOME Shell);
  • Install extra repositories (Free and Nonfree);
    • RPM Fusion
    • Install the downloaded rpm’s (rpm -ivh FILE.rpm)
  • I use Chromium (Google Chrome) so I installed it next. Followed the guide available in the Fedora Project wiki;
  • I also followed the guide available in the wiki to install Flash Player;
    • The page has lots of info, so for you lazy guys on a x86_64 system, follow this link
  • Installing the equivalent to ubuntu-restricted-extras package;
    • I followed the info available in this page (it’s in Portuguese)
    • Getting the fonts right. Specially in the browser.
      • yum localinstall http://fedora.missingbox.co.nz/core-fonts.rpm –nogpgcheck
      • yum install freetype-freeworld
      • I also had to add to .fonts.conf (~/.fonts.conf) some lines. Because it’s a XML file, it’s easier for you to download it: .fonts.conf
  • Installed all the software I normally use…

And that was all. Everything after was absolutely normal…

My GNOME 3 experience on Ubuntu 11.04

I’m addicted to gnome-shell!

A week has passed since I installed GNOME 3 on Ubuntu 11.04 “Natty Narwhal”, from the official GNOME 3 PPA.

I remember thinking something like “Looks nice, feels good but lots of things are missing… going back to classic GNOME…” but for some unexplained reason I didn’t make the purge and kept using GNOME 3 and the mighty gnome-shell.

Here’s my GNOME 3 sceeen shot:

 

 

 

 

 

 

 

This isn’t a GNOME 3 review, Ars Technica already made one that you can read here. It’s just my two cents about some things.

Problems, bugs, weird stuff and a whish list

  • Ubuntu 11.04 doesn’t have official GNOME 3 support. You have to use the PPA. I almost went Fedora because of this. Still thinking about that…
  • The window decorator couldn’t be more ugly, but I saw lots of screen shots around the web with a great looking interface. Why wasn’t mine good looking?! Seams that the problem was that the theme (Adwaita) wasn’t there. After a quick search, I found out that the theme was in a package called gnome-themes-standard that wasn’t in the GNOME 3 dependency list and that I couldn’t install because the package itself is broken. The solution was to extract the contents of the package and place the Awaita theme where it should be (/usr/share/themes) manually.
  • I also remember thinking “where the *FWORD* are my desktop icons?!” and after taking after a deep breath I read all about the philosophy of GNOME 3/gnome-shell and it kind of made some sense, although I am/was too used to having stuff all around my desktop. This was only the first weird thing I had to adapt to.
  • There are no applets in gnome-shell, the nice panel (top bar) isn’t customizable. I have a trillion passwords to memorize and I have been using revelation until now (GNOME 2) because of the nice applet that it has. I used it exhaustively because it allowed me to search within my passwords very quickly. I really miss that applet.
  • The notifications changed. In a general way I like the new notification system, it’s cool and really doesn’t bother you when your’re working and it’s a complete WIN to be able to check the notifications some time after they occurred. Yet, another habit, I use pidgin as my default IM client and I want to be able to stick the icon somewhere visible (top bar) and see when the icon changes it’s status. I liked the way that worked out in GNOME 2. It’s just weired not to have it there now.
  • Keyboard has lot’s of shortcuts. WIN! But hey some of us have razors, mx 5xx or some other mouse that has more buttons than we have fingers. There should be mouse shortcuts as well! With compiz I used two useful shortcuts within the desktop wall. I used the two buttons placed on the left side of my mouse to change to the previous and to the next workspace. This is another thing I really miss.
  • Nautilus changed the shortcuts. Now I have to press two keys to delete a file. I liked it better when I only had to press del for that.
  • Mutter breaks transparency in non-maximized windows, like gnome-terminal that I use allot. It’s a known bug but still no solution.
  • As well as some other users, I haven’t figured out how to remove the unnecessary accessibility menu from the top bar.
  • Another “philosophy” issue is that by default window controls only have the close button. No minimize or maximize. That’s because you can maximize windows with a double-click on the title bar and because you don’t have anything to see (besides your wallpaper) on your desktop, so you don’t need to minimize windows, only switch between them. That was weired at first and I added both missing controls, but sincerely after a week of using gnome-shell I don’t use them at all.
  • Lack of customization. This is a problem. I like to tweak my desktop and so do other users. I think future success depends on this issue.
  • Places should also have the option to be added as a Favorite. I have the sensation that  nautilus alone isn’t enough.

Things that keep me hooked in!

  • The coolness factor! I don’t know why neither can I explain it… but it just feels right to use gnome-shell! Almost as if it was cool to use it and if you don’t.. you’re not just cool anymore.
  • Gnome-shell. I’m still adapting but I like the changes.
  • The application switcher.
  • The workspace management is just awesome. The way they extend one after another or how they are removed when no longer necessary is just how they should always have worked.
  • I use a laptop + a LCD screen at home. The second screen, the LCD, doesn’t change when I switch workspaces. When I switch workspaces only the laptop screen workspace changes. The LCD workspace is always the same. I don’t really know if this is the default behavior, but I love this. I can put my “always showing apps” in the LCD “always showing” workspace and move throe the laptop workspaces.

  • I’m more focused on my work. Congratulations to  the GNOME 3 team because this is one of gnome-shell’s objectives and I really feel it.

I’ll keep posting my GNOME3 experience and who knows, some extensions of my own.

I am GNOME

WD Scorpio Black 320GB

I didn’t buy myself any birthday present this year and since Google has been so generous with me, accepting me for SoC and paying the first $505… I bought a new hard drive for my laptop (sony vaio fw). What I really needed was a external hard drive but I thought to myself, what the heck, I’ll buy a new hard drive for the laptop and pass the old drive to a external case. That was exactly what I did! I bought the WD Scorpio Black 320GB, a 320 GB, SATA 3 Gb/s, 16 MB Cache, 7200 RPM hard drive!
I’m not expecting any miracle, it’s just a nice upgrade. :)
Here’s a picture of the new and the old hard drive:

DSC00751

The bad part of this history:
It took two days for the hard drive to arrive at my home, It arrived today by 08:45 (am). I had a all morning battle with Windows Vista/7. The f* thing just wouldn’t install! I always got the error code 0×80070017, I burned 4 DVDs at different speeds, 2 at the lowest speed possible. It reminded me of my first CD burner.. anyway, no go! The solution was to install unetbootin on Ubuntu and burn a Windows ISO to my pen drive. Then it worked. Once again linux proves it self to be a life savior!

By the way, you may be thinking “WTF! Why spend any time installing Windows?!”. Sometimes I join a group of friends (about 10 of them) to play some lan games and relax a bit. This is the only reason for me to have windows on my machine and spending all morning trying and trying…

PS: Thanks to Google