Jump to content

IPv6 support for spamcop reports


shentino
 Share

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.

Edited by Knitter
spelling error
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

Edited by petzl
Link to comment
Share on other sites

57 minutes ago, Knitter said:

removed this line

Received: by 2002:aa7:d1d8:0:0:0:0:0 with SMTP id g24-v6csp469345edp;

then it works

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...