How to move mail from /var/mail into imap

André Böhm andre at abtime.de
Fri Apr 7 21:02:19 EDT 2006


Hello Caleb,

I use formail for that purpose:

cat /var/mail/username | \
  formail -b -f -s /usr/local/cyrus/bin/deliver -a username username

(Only Return-Path gets lost this way, but this probably doesn't matter.)

formail is part of the procmail package.

Look at "man formail" to check if you need -b and -f, and most
importantly, always remember that the -s parameter has to be the last one!

Should you ever need to remove From-lines you can add sed in the command
line to throw them away.


Caleb Walker schrieb:
> Caleb Walker wrote:
> 
>> My server uses procmail to process mail through spamassassin and then
>> into the users mailbox.  In Debian I have found that for deliver
>> (cyrdeliver) to work I have to set the sticky bit.  I did an update
>> recently and it removed the sticky bit on cyrdeliver and therefore mail
>> began to be delivered to /var/mail.  Procmail also removes the From line
>> because cyrus doesnt seem to like that.  Now mail is in /var/mail
>> without the From line and I cannot seem to get the mail from /var/mail
>> back into the Cyrus database because every program I try to use doesnt
>> see the mail in that file as actual mail due to the missing From line. 
>> What can I do to get the mail into the users mailboxes?
>> I have tried to set up pop access to it, it sees it as messed up mail. 
>> I tried to use mutt to see the mail in it.  It sees it is screwed up
>> mail.  I tried to use formail to readd the From but it only does it on
>> the top line and not each message in the file.
>>
>> Thanks in advance,
>> Caleb
>> ----
>> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
>> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>
>>  
>>
> I have asked a handful of questions and most, if not all of the time, I
> do not get a response.  Is it because I ask in a rude way?  Do I not
> provide enough info?  Are my questions about things that are impossible
> or too difficult?

I am fairly new on this list, I hope this was helpful to you.



Regards,

André Böhm




More information about the Info-cyrus mailing list