I've been running dovecot on a CentOS-5.7 server. Now I'm moving over to another server running CentOS-6.2. I thought I was running dovecot on the new server, but in fact there was an error during the setup, with the result that incoming mail finished up in /var/spool/mail/ rather than in ~/Maildir , where I wanted it to go.
Now I'm wondering if there is some way that I can re-direct the mail in /var/spool/mail/<mymbox> so that it goes through the system as though it were just arriving? I mean, so that it gets distributed into the correct folders under ~/Maildir , as specified in .procmailrc .
Any suggestions gratefully received.
On 01/23/2012 05:25 PM, Timothy Murphy wrote:
I've been running dovecot on a CentOS-5.7 server. Now I'm moving over to another server running CentOS-6.2. I thought I was running dovecot on the new server, but in fact there was an error during the setup, with the result that incoming mail finished up in/var/spool/mail/ rather than in ~/Maildir , where I wanted it to go.
Dovecot isn't your MTA. You also need to duplicate your sendmail/postfix service on the new host.
Gordon Messmer wrote:
I've been running dovecot on a CentOS-5.7 server. Now I'm moving over to another server running CentOS-6.2. I thought I was running dovecot on the new server, but in fact there was an error during the setup, with the result that incoming mail finished up in/var/spool/mail/ rather than in ~/Maildir , where I wanted it to go.
Dovecot isn't your MTA. You also need to duplicate your sendmail/postfix service on the new host.
OK, I assume there was something wrong with my sendmail/procmail setup, so that all mail went to /var/spool/mail/~ .
The fact remains that I want to filter this email as I would if it were arriving from outside.
I installed mutt on the new server, and found that 95% of the messages in /var/spool/mail were basically locally sent error messages.
But about 40 messages remain.
To repeat my original query: ---------------------------------- Now I'm wondering if there is some way that I can re-direct the mail in /var/spool/mail/<mymbox> so that it goes through the system as though it were just arriving? I mean, so that it gets distributed into the correct folders under ~/Maildir , as specified in .procmailrc .
Any suggestions gratefully received. ----------------------------------
On Tue, Jan 24, 2012 at 9:36 AM, Timothy Murphy gayleard@eircom.net wrote:
OK, I assume there was something wrong with my sendmail/procmail setup, so that all mail went to /var/spool/mail/~ .
The fact remains that I want to filter this email as I would if it were arriving from outside.
I installed mutt on the new server, and found that 95% of the messages in /var/spool/mail were basically locally sent error messages.
But about 40 messages remain.
To repeat my original query:
Now I'm wondering if there is some way that I can re-direct the mail in /var/spool/mail/<mymbox> so that it goes through the system as though it were just arriving? I mean, so that it gets distributed into the correct folders under ~/Maildir , as specified in .procmailrc .
Any suggestions gratefully received.
Any imap client can move mail between folders, whether local or on different hosts/accounts. Connect with one, move the existing messages somewhere else (a local client folder if you don't have another imap account where you can make a folder to park them), then reconfigure your procmail and dovecot to use maildir format, and move them back. With a GUI mail agent this is normally a select/drag/drop operation. Not sure how/if you can do it in mutt.
On 01/24/2012 07:36 AM, Timothy Murphy wrote:
Now I'm wondering if there is some way that I can re-direct the mail in/var/spool/mail/<mymbox> so that it goes through the system as though it were just arriving? I mean, so that it gets distributed into the correct folders under ~/Maildir , as specified in .procmailrc .
Ah, yes. I apologize for not reading that more comprehensively.
You want "formail", a part of the procmail package. I think something like this:
su <user> -c "formail -s procmail" < /var/spool/mail/<user>
On Jan 23, 2012, at 6:25 PM, Timothy Murphy wrote:
I've been running dovecot on a CentOS-5.7 server. Now I'm moving over to another server running CentOS-6.2. I thought I was running dovecot on the new server, but in fact there was an error during the setup, with the result that incoming mail finished up in /var/spool/mail/ rather than in ~/Maildir , where I wanted it to go.
Now I'm wondering if there is some way that I can re-direct the mail in /var/spool/mail/<mymbox> so that it goes through the system as though it were just arriving? I mean, so that it gets distributed into the correct folders under ~/Maildir , as specified in .procmailrc .
Any suggestions gratefully received.
---- easiest way to handle is to copy the files to your client computer, open them with your normal mail client and move them into folders (assuming your ~/Maildir is IMAP). If there is only 1 or 2 users, this is much easier.
Craig