Jump to content

IPv6 support for spamcop reports


shentino

Recommended Posts

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);
}

 

Link to comment
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)
Link to comment
Share on other sites

  • 4 weeks later...

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. :-(

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...