[Dovecot] put procmail between postfix and dovecot
Hello,
a couple of months ago, also thanks to help from this list, I set up postfix and dovecot for virtual domains on a Centos 4 remote server.
I have postfix set up to deliver all email for marco@domain1.net to
/var/mail/vhosts/marco_domain1.net/
Everything is fine, as far as postfix is concerned: all email to marco@domain1.net goes in that mailbox, dovecot sees it, etc...
Now I need to add sorting all incoming email in subfolders:
mail from SOME_LIST to marco_domain1.net/SOMELIST/ (lots of other rules for custom folders) all else to main inbox
I have to do all this sorting with procmail for two reasons:
I want to have as little sw as possible on that server, and update it semi-automatically, if possible only from the official repositories: procmail has these characteristics
I want to reuse as is, with the smallest possible amount of translation, filtering, etc, the very long and complicated procmailrc files I have built over the years on several servers.
My question is how do I have to modify (with a perl or similar script) the procmail rules so that they sort messages in maildir folders which:
are fully compatible with dovecot (and Squirrelmail)
(very useful, but not mandatory) can be viewed in categories and subcategories from Squirrelmail:
personal/ friends/ family/ mailing_lists/ postfix/ dovecot/ .... work/
*all* the messages, no matter how they were sorted on the server, can still be downloaded with fetchmail from home
Note that I am not asking anybody to write the script for me (if you want to share a ready one, of course, I'll be glad). I just need to know what is the exact syntax/ folder naming conventions I have to follow to make all I wrote above happen.
TIA, Marco
-- Marco Fioretti mfioretti, at the server mclink.it Fedora Core 5 for low memory http://www.rule-project.org/
Everyone is entitled to their own opinion, but not their own facts Daniel Patrick Moynihan
You can try my procmail patch posted on this list,
Ciao, Gerhard
On Sat, 16 Sep 2006, M. Fioretti wrote:
Hello,
a couple of months ago, also thanks to help from this list, I set up postfix and dovecot for virtual domains on a Centos 4 remote server.
I have postfix set up to deliver all email for marco@domain1.net to
/var/mail/vhosts/marco_domain1.net/
Everything is fine, as far as postfix is concerned: all email to marco@domain1.net goes in that mailbox, dovecot sees it, etc...
Now I need to add sorting all incoming email in subfolders:
mail from SOME_LIST to marco_domain1.net/SOMELIST/ (lots of other rules for custom folders) all else to main inbox
I have to do all this sorting with procmail for two reasons:
I want to have as little sw as possible on that server, and update it semi-automatically, if possible only from the official repositories: procmail has these characteristics
I want to reuse as is, with the smallest possible amount of translation, filtering, etc, the very long and complicated procmailrc files I have built over the years on several servers.
My question is how do I have to modify (with a perl or similar script) the procmail rules so that they sort messages in maildir folders which:
are fully compatible with dovecot (and Squirrelmail)
(very useful, but not mandatory) can be viewed in categories and subcategories from Squirrelmail:
personal/ friends/ family/ mailing_lists/ postfix/ dovecot/ .... work/
*all* the messages, no matter how they were sorted on the server, can still be downloaded with fetchmail from home
Note that I am not asking anybody to write the script for me (if you want to share a ready one, of course, I'll be glad). I just need to know what is the exact syntax/ folder naming conventions I have to follow to make all I wrote above happen.
TIA, Marco
-- Marco Fioretti mfioretti, at the server mclink.it Fedora Core 5 for low memory http://www.rule-project.org/
Everyone is entitled to their own opinion, but not their own facts Daniel Patrick Moynihan
On Sat, Sep 16, 2006 12:07:31 PM +0200, Gerhard Wiesinger (lists@wiesinger.com) wrote:
You can try my procmail patch posted on this list,
Er... sorry, but why is a patch needed for this? I was expecting to find just some folder naming rule. Aren't both dovecot and procmail maildir compatible?
Apart from this, running patched software would go against this:
I have to do all this sorting with procmail for two reasons:
- I want to have as little sw as possible on that server, and update it semi-automatically, if possible only from the official repositories
and "I want" isn't really correct, I basically "have to", for reasons irrelevant here, make the maintainance of that server as automatic as possible, without installing compilers or using anything else but the local (intranet) mirrors of the official repositories.
So unfortunately this patch isn't for me, not this time at least, but thanks.
Ciao, Marco
(still interested to know if there are solutions not involving
patches)
-- Marco Fioretti mfioretti, at the server mclink.it Fedora Core 3 for low memory http://www.rule-project.org/
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. R. A. Heinlein
M. Fioretti wrote:
My question is how do I have to modify (with a perl or similar script) the procmail rules so that they sort messages in maildir folders which:
For storing a message to the maildir folder, just use the "some/path/to/mailbox/" format (see the trailing slash).
- *all* the messages, no matter how they were sorted on the server, can still be downloaded with fetchmail from home
Tell fetchmail to use IMAP. I don't see much benefit in such a setup, but hey, it's your choice.
Note that I am not asking anybody to write the script for me (if you want to share a ready one, of course, I'll be glad). I just need to know what is the exact syntax/ folder naming conventions I have to follow to make all I wrote above happen.
Can't get what are you asking about, tbh. Everything is just a standard setup...
Cheers, -jkt
-- cd /local/pub && more beer > /dev/mouth
On Sep 16, 2006, at 12:30 PM, Jan Kundrát wrote:
M. Fioretti wrote:
My question is how do I have to modify (with a perl or similar
script) the procmail rules so that they sort messages in maildir folders
which:For storing a message to the maildir folder, just use the "some/path/to/mailbox/" format (see the trailing slash).
For procmail to deliver to a maildir/, make sure you have version
3.22 or later of procmail.
participants (4)
-
Gerhard Wiesinger
-
Jan Kundrát
-
M. Fioretti
-
Morgan Nightbear