1

How can I configure fetchmail to fetch a folder to a specific target folder? Or at least not fetch to inbox? If it would fetch from sent to sent (or any folder to the same folder name) I'd be happy with it.

Fetching sent and putting them in my inbox and marking them as "new mail" would be crazy, now wouldn't it?

1

You might want to have a look at a filtering solution such as procmail.

You can have fetchmail collect the mail from your IMAP or POP (or whatever) server and then specify in your ~/.fetchmailrc configuration that it should deliver with procmail (see the mda setting in the manual). You would then set up procmail to filter the incoming mail into one or several mail boxes.

I'm just mentioning procmail because that's what I've been using for decades. I'm sure there are other mail filtering software out there.

Example fetchmail configuration:

poll mail.example.com
protocol imap
user "me.there" password "password" is "me.here"
mda "/opt/local/bin/procmail -m $HOME/.procmailrc"

Snippet from my ~/.procmailrc (incomplete):

MAILDIR="$HOME/Dropbox/Mail"
DEFAULT="inbox/"
LOGFILE="$HOME/.procmail.log"

# [cut several lines]

:0
* ^List-Id:.*macports-changes.lists.macosforge.org
macports-changes/

:0
* ^List-Id:.*macports-users.lists.macosforge.org
macports-users/

# [etc.]

In your case, you would add a delivery receipt for mail that you've sent yourself. These would go into a separate folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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