Jump to content

"SpamCop encountered errors" when Sieve "redirect"


Recommended Posts

I have hesitated to post this question for quite a while, while I gave myself time to search around the forums and other places to see if the question had already been answered somewhere. Unfortunately, I have not found much. I thought for sure this issue might have been brought up before.....but I just could not find the answer...

I use a Fastmail account as my main email, with numerous other addresses all forwarding to this single fastmail account.

I am using custom Sieve filtering rules to handle spam, for example.....

if ..{some conditions}.........

{ fileinto "INBOX.spam";

redirect "{myspamcopaddress}[at]spam.spamcop.net";



The problem is, when I use the above rules, and a spam is forwarded to SpamCop, SpamCop receives the "redirect"ed spam and replies with:

"SpamCop encountered errors while saving spam for processing:

SpamCop could not find your spam message in this email:"

However, I can take the exact same spam email, forward from Fastmail as an attachment, OR cut/paste the full message text into the SpamCop web interface, and SpamCop processes it just fine.

I have read on several forum posts "redirecting doesn't work" and/or "read the FAQ". But no solution?

According to the SpamCop FAQ....

"Forward as an attachment your spam to the personal reporting address shown on your front page. You will get back a reply with already-authorized URLs for reporting the spam at the address you used to register for SpamCop with.

MIME format is best, although normal text/plain format will work fine too. Avoid uuencoding."

So how can I do this with Sieve?

Obviously, it would be most desirable for my Sieve rules to automatically forward the email to SpamCop, then all I have to do is open the SpamCop reply and submit the reports. Instead, now it is a two-step process, and I have to first open the email, manually forward it as an attachment, then wait for the SpamCop reply and go from there. This uses up additional time and resources on both mine and SpamCop's side.

So is there a way, with Sieve, to "forward as attachment" or by some other means redirect in a way such that SpamCop will not encounter errors?

One would think this is not such a difficult problem, so maybe the answer is simple but I am just not smart enough to find it so far?

Thank you...

Link to comment
Share on other sites

I do not know sieve, but you have figured out the problem. A redirect seems to be the same as a server forward where the headers for the trip between your machine and the spamcop machine are a continuous group. In that scenario, it looks to spamcop that the spam was sent directly to your submit address. It seems you should ask in some sieve forum if a "forward as attachment" is a sending option. You have already proved to yourself that forward as attachment works.

I also do not understand your comment

This uses up additional time and resources on both mine and SpamCop's side.
I can see it using more time and resources on your side, but not on spamcop's side.
Link to comment
Share on other sites

Here is the description of what sieve redirect does from RFC 3028:

The redirect command performs an MTA-style "forward"--that is, what

you get from a .forward file using sendmail under UNIX. The address

on the SMTP envelope is replaced with the one on the redirect command

and the message is sent back out. (This is not an MUA-style forward,

which creates a new message with a different sender and message ID,

wrapping the old message in a new one.)

So the message is simply forwarded to your submission address. That will not work. You need to create a new message that wraps the old message in a bit of MIME. SpamCop has examples of how this can be done in Perl and in Python. I do not think that it can be done in sieve, unless you have some non-standard extension that allows you to create a new mail and insert the appropriate headers, MIME, and the spam.

Link to comment
Share on other sites

You are correct in that Proposed Standard Sieve as described in RFC 3028 at the IETF's Site and at the RFC Editor's Site does not include a "forward as attachment" capability, and neither do any of the extensions FastMail.FM is using (as follows because the "View filter source, click done to save changes first (advanced users only)" page I got it from may not be accessible to non-Users): Sieve regular expression extension draft-murchison-sieve-regex-07.txt; Sieve relational extension RFC 3431; Sieve imap flags extension sieve-imapflags-05.txt; and FastMail.FM's own Sieve notify extension.

Also, please bear in mind that FastMail.FM Guest User Accounts (the accounts that don't cost money) are not allowed to use custom Sieve scri_pt per the "Advanced rules (Custom sieve scri_pt)" line on their pricing table.

However, on a positive note, if you have a SpamCop Email System Account, you can use an IMAP Client to drag spam from your FastMail.FM spam Folder to your SpamCop Email System Held Mail mailbox/Folder and mass Quick Report it.

If you don't have a SpamCop Email System Account, you can still use FastMail.FM's Webmail or an IMAP Client to mass forward spams as attachments from your FastMail.FM spam Folder to your submit address (or to your quick address if you are authorized), keeping in mind the per-message forwarding limits (IIRC 100 KBytes or 50 attachments, whichever comes first).

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...