Download only certain POP messages

From MozillaZine Knowledge Base
Jump to navigationJump to search

Automating which message bodies are downloaded

Normally when you check for new messages in a POP3 account, all new messages are downloaded. However, you may want to only retrieve messages meeting certain criteria. One way to do this is to fetch only the headers and then set up a message filter to determine which should be downloaded.

You can configure Thunderbird to download only the message headers via "Tools → Account Settings → Server Settings → Fetch headers only." You can then create a message filter that tests (for example) whether the sender was in your address book, and checkmark the "fetch body from POP server" action for the filter. If you have a slow internet connection and don't want to automaticly download large messages you could also test whether the size is less than some limit. In this way, any valid message filter rule can be used to determine whether you want to download the message body.

Any messages whose message body wasn't downloaded will display "Only the headers for this message were downloaded from the mail server. Click here to download the rest of the message." instead of the actual message body. If you click on that link it will cause Thunderbird to download the message body.

Integrating it with Spam detection

Tools -> Junk Mail Controls has a setting to tell Thunderbird to trust junk mail headers set by either SpamPal or SpamAssassin. SpamPal checks the senders address against DNSBL lists so it doesn't need to download the message body to decide if a message is Spam or not. One way to filter Spam without having to download it would be to:

  • Install SpamPal and configure it to connect to your POP account. Then configure Tools -> Account Settings -> Server Settings to use the SpamPal proxy rather than your POP3 server.
  • Check the Tools -> Junk Mail Controls -> "Trust junk mail headers set by: SpamPal" checkbox, and tell it what it should do with Spam messages.
  • Check the checkbox for Tools -> Account Settings -> Server Settings -> Fetch headers only.
  • Configure the message filters to "fetch body from POP server" for the remaining messages. You could also enable the adaptive filter in the junk mail controls for that account.

Troubleshooting

"Delete from Pop3 server" in the message filter will not delete the message from the POP server if you enable Tools -> Options -> Privacy -> Antivirus -> Allow anti-virus clients to quarantine individual incoming messages . See this bug report for more information.

Note: If you are using the RegExFilter plugin with SpamPal, if only message headers are downloaded, the SpamPal header comes through, but the RegEx headers do not. If you need to filter off of RegEx header lines, the entire message must be downloaded (i.e., your RegEx header filters generally will not work with "Fetch headers only" checked).

See also