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 at domain1.net to /var/mail/vhosts/marco_domain1.net/ Everything is fine, as far as postfix is concerned: all email to marco at 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
Gerhard Wiesinger
2006-Sep-16 10:07 UTC
[Dovecot] put procmail between postfix and dovecot
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 at domain1.net to > > /var/mail/vhosts/marco_domain1.net/ > > Everything is fine, as far as postfix is concerned: all email to > marco at 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 >
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 homeTell 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20060916/080b8334/attachment.bin>
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.