Jump to content
shentino

IPv6 support for spamcop reports

Recommended Posts

I've been getting a lot of spam lately in my inbox that can't be reported because spamcop appears to be choking on IPv6 style addressess in the headers.

Share this post


Link to post
Share on other sites

I dealt with this problem years ago by 'simply' renaming any Received: fields that contained ipv6 addresses to "X-Received-ipv6:" before submitting.

Spamcop then accepts and processes it normally, and the information is preserved.

Share this post


Link to post
Share on other sites

Using perl:

use Regexp::IPv6 qw($IPv6_re);

# prototype
sub filteripv6($);

# get your mail msg into $mail via stdin or open file, then
...
my $newmail = filteripv6($mail);

# do submit or save for submit as you like...
...

exit;
# ~~~~~~~~~~~~~~~~~~~
# replace received fields if ipv6 for spamcop
sub filteripv6($) {
    my $msg=shift;
    my ($header,$body) = split (/\r?\n\r?\n/, $msg, 2);
    $header=~s/\r\n/\n/gs;
    $header=~s/\n[ \t]+/\t/gs; # unwrap
    my $NewHeader="";
    foreach my $line (split(/\n/, $header)) {
        if ($line =~ /^Received:/i && $line =~ /$IPv6_re/) {
            $line =~ s/^Received:/X-Received-ipv6:/i;
        }
        $line=~s/\t/\n\t/sg; # rewrap
        $NewHeader.=$line. "\n";
    }
    $msg=$NewHeader."\n".$body;
    return($msg);
}

 

Share this post


Link to post
Share on other sites

I'm using the "show original" button in my gmail on a spam, and copypasting that into the spamcop report.  That part is where the error shows up.

Share this post


Link to post
Share on other sites
On 6/15/2018 at 1:46 PM, shentino said:

I'm using the "show original" button in my gmail on a spam, and copypasting that into the spamcop report.  That part is where the error shows up.

Gmail seem to be the ONLY loons doing this?
 

presently gmail headers 2nd line needs deleting before submitting. Trouble is ISP's need FULL headers as evidence so past deleted line in comments

Delivered-To: x
Received: by 2002:a9d:21b7:0:0:0:0:0 with SMTP id s52-v6csp2028874otb; DELETE
        Sat, 28 Apr 2018 09:00:41 -0700 (PDT)

Share this post


Link to post
Share on other sites

When I delete the line suggested, then I get the following:

Quote
Parsing header:
This header is incomplete. Please supply the full headers of the spam you're trying to report.
No source IP address found, cannot proceed.

Add/edit your mailhost configuration
Finding full email headers
Submitting spam via email (may work better)
Example: What spam headers should look like

 

No tracking information found in header:

Probably not full headers - see FAQ:

Email software FAQ

 

no header

What to do?  My gmail-spam is increasing. :-(

Share this post


Link to post
Share on other sites

Knitter have you used the search tool in the upper right of this screen to look for "gmail" or "IPv6"

Share this post


Link to post
Share on other sites
Quote

Knitter have you used the search tool in the upper right of this screen to look for "gmail" or "IPv6"

Yes, I have, several times, and I found that the problem has existed at least since 2004. I have tried the suggestions that I found, but till now nothing has worked.

Sorry, if I did something wrong by posting here.

Edited by Knitter
spelling error

Share this post


Link to post
Share on other sites

I suggest you start a thread in "Reporting Help" and provide a Tracking URL for a spam that has this problem. That way others who use gmail will be able to make better suggestions. (I will then move you OP to the new thread.

Share this post


Link to post
Share on other sites
9 hours ago, Knitter said:

Yes, I have, several times, and I found that the problem has existed at least since 2004. I have tried the suggestions that I found, but till now nothing has worked.

Sorry, if I did something wrong by posting here.

Works for me yesterday? You have done nothing wrong.the Gmail parsing has only become a problem this year?

A tracking URL would show whats wrong  found at top of page BEFORE you submit. Removed 2nd line from headers

https://www.spamcop.net/sc?id=z6474077628zfbc461f2acdbedd8a76aa4c91fdd30d1z

Edited by petzl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×