Can I take mail from Maildir mailbox and deliver it as new?

James Pryor pryor at bnl.gov
Tue Nov 4 22:12:35 UTC 2014


Hello list,
I have a need for someone to point me in the right direction.

Our old email system (system A) had an account that acted as a mailing 
list accumulator/archiver. This account was a member of every list and 
mail would be sent to it's address. The strange part is that email was 
not delivered to system A because there was a . (dot) forward alias to 
another machine (system B) that runs sendmail. System B's sendmail then 
slurped up the incoming mail and processed it in some fashion which I do 
not care about.

On our new mail server (system C (OS is RHEL6.5, 
dovecot-2.0.9-7.el6_5.1.x86_64, postfix-2.6.6-6.el6_5.x86_64)), I 
performed a bulk Linux account and mailbox migration from system A to 
system C using postfix/dovecot/imapsync. But I forgot to put the alias 
in place on system C to send all incoming that special account's mail on 
system B. So mail started to get delivered to local user ar_list on 
system C.

So now I have a Maildir format mailbox on system C that has mail in it 
and I want to be able to manipulate and/or re-send those emails as new 
mail to system B. Once it is received by sendmail on system B, then I 
don't care about it any more.

Is there a way to take mail sitting on disk in a mailbox and deliver it 
as if it was new mail to some other machine?
Thanks,
James

-bash-4.1$ ls -l
total 566
drwx------ 2 ar_list users   2048 Aug  7 21:29 cur
-rw------- 1 ar_list users  12556 Oct  8 17:09 dovecot.index
-rw------- 1 ar_list users 378880 Oct  9 14:41 dovecot.index.cache
-rw------- 1 ar_list users   2580 Oct  9 14:41 dovecot.index.log
-rw------- 1 ar_list users  65549 Oct  9 14:41 dovecot-uidlist
-rw------- 1 ar_list users      8 Aug  7 19:38 dovecot-uidvalidity
-r--r--r-- 1 ar_list users      0 Aug  7 19:38 dovecot-uidvalidity.53e40ddc
drwx------ 2 ar_list users 100352 Oct  9 14:41 new
drwx------ 2 ar_list users   2048 Oct  9 14:41 tmp


-bash-4.1$ ls new/ | wc -l
1020

-bash-4.1$ ls cur | wc -l
25


More information about the dovecot mailing list