Sunlounger – White Sand / Armin Van Buuren – Zocalo
Entrou directamente para o top das preferidas! Sem palavras… é à minha medida. Awesome!
By pcabido in music No Comments Tags: Armin Van Buuren, Eller, PT, Sunlounger, White Sand, Zocalo
Entrou directamente para o top das preferidas! Sem palavras… é à minha medida. Awesome!
By pcabido in linux No Comments Tags: EN, grep, maildir, postfix, 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.