Sunday, November 19, 2017

Quick weight loss update

So it's just a few days before Thanksgiving and I got on the scales to find I am now down to 318. Recall I started at 344 so that's 26 lbs to date.
I've been having to walk my mom's dog, as she's been out of town, so I have been hitting my step goal in Garmin Connect for the past seven days. 
Plus continuous calorie tracking in MyFitnessPal seems to be helping me make sure I keep my self on track to lose weight.
That's it for now, just a quick update.

Wednesday, November 08, 2017

freebsd postfix python policyd-spf ip addres validation error

The solution to my Problem was (for now) to add the following lines to the function _cidrmatch in /usr/local/bin/policyd-spf
def _cidrmatch(ip, netwrk)
  netwrk = unicode(netwrk)
  ip = unicode(ip)
    address = ipaddress.ip_address(ip)
This is done so that the python module ipaddr only has to deal with unicode string (as requested by the error message)
switching to python3 as suggested by other posts on the web did not work for me (maybe some missing dependencies?)

 Stolen from here, but it worked:

So for whatever reason the file uses on my FreeBSD setup doesn't work for MailScanner.
II had to comment out these croak lines and now it works just fine
diff  /root/ /usr/local/lib/perl5/site_perl/Net/
< The result is a two-element array: 
> The result is a two-element array:
<           #croak "Invalid netblock range: $r[$i]"
<               #unless $isipv6_1 && $isipv6_2;
>           croak "Invalid netblock range: $r[$i]"
>               unless $isipv6_1 && $isipv6_2;
<     my $mismatch = shift;
<     if (!$isipv6_1 != !$isipv6_2)
>     if ($isipv6_1 || $isipv6_2)
<       return $mismatch if defined $mismatch;
<       #croak "Invalid netblock: $aa-$bb";
<    }
>       croak "Invalid netblock: $aa-$bb"
>           unless $isipv6_1 && $isipv6_2;
>     }
<     #croak "Different number of octets in IP addresses" unless $#a == $#b;
>     croak "Different number of octets in IP addresses" unless $#a == $#b;
<       next if _ipcmp($b[$i], $lo, -1) < 0;
<       next if _ipcmp($hi, $a[$i], -1) < 0;
>       next if _ipcmp($b[$i], $lo) < 0;
>       next if _ipcmp($hi, $a[$i]) < 0;
>     $v =~ s/([0-9A-Fa-f]+)/_triml0($1)/ge;
> sub _triml0 {
>     my ($a) = @_;
>     $a =~ s/^0+//g;
>     return $a
> }

Sunday, November 05, 2017

Gym Time

This morning I spent over an hour at the gym. 
I actually enjoyed it a lot, I noticed that I hard time not smiling.
I spent the entire on the treadmill and after 65 minute I covered 3.9 miles.
It was, according to myWellness cloud, my fastest pace for 3 and 5 kilometers, at 16:41 per mile.
At the end I was totally drenched in sweat, my shirt on the front and back, was totally soaked.
I also logged just over 8,000 steps on Garmin Connect.
I guess that's it really, but I just thought I would share.
See not everything I post is stupid work stuff, sometimes its also stupid me stuff.