Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

At the moment, I have my .fetchmailrc configured to keep a copy on the mailserver. However, it would be nice to move these copies to an imap folder on the server.

I believe this would not be possible within fetchmail, am I right?

My question is: what would be the best way to accomplish this task?

share|improve this question
    
Correct, fetchmail doesn't have any way of doing that. –  Cry Havok Aug 19 '11 at 14:56
add comment

2 Answers

getmail support this function. I don't know if fetchmail also support this or not.

From documentation:

If you have an IMAP mail account and want to retrieve messages from several mail folders under that account, and you want to move messages to a special folder when deleting them, you would use a retriever configuration like this:

[retriever]
type = SimpleIMAPRetriever
server = imapmail.isp.example.net
username = account_name
password = my_mail_password
mailboxes = ("INBOX", "lists.unix", "lists.getmail")
move_on_delete = mail.deleted
share|improve this answer
add comment

erm....so you want your mail to go into the imap inbox, and a copy to go into a different imap folder? IIRC, fetchmail doesn't really understand about imap folders - so this would need to be implemented on the imap server (you didn't say which imap server you are using). OTOH you could configure procmail to copy all your incoming mails to another email address - which might also be controlled by the same imap server. But if the objective is to keep backups, then there's a very compelling argument for keeping the backups outside the imap server.

If you were a bit more specific about what you were trying to achive then perhaps we could be more specific in the advice - potentially even giving you the right recipes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.