I'm getting a huge amount of SPAM. I have a lot of filters, but it
looks like my system performance is actually now being impacted by
the work my filters are doing.
This came to a head when I was debugging an email problem on another
system. I sent email to myself from that system while watching
my /var/log/maillog. I kept missing what I was looking for
because of all of the darn SPAM hammering my system.
The thing that is annoying me right now is all of the spam send
to accounts that don't exist on my system. Running this command
shows me attempts to send mail to non-existent accounts:
sudo tail -f /var/log/maillog | grep reject
Using iptables to count bandwidth usage
This command will use iptables to log bandwidth of web traffic:
sudo /sbin/iptables -A OUTPUT -p tcp --dport 25 -j LOG
or this adds a label so you can see what is what
sudo /sbin/iptables -A OUTPUT -p tcp --dport 80 -j LOG --log-prefix 'www'
and then this shows that usage:
sudo /sbin/iptables -L OUTPUT -v
This works if I stop my default firewall rules...so I need to clean
my default rules...
sudo /sbin/iptables -A INPUT -p tcp --dport 25 -j LOG --log-prefix 'mail'
This also works, to at catch the responses (ie. source port)
sudo /sbin/iptables -A OUTPUT -p tcp --sport 25 -j LOG --log-prefix 'mail'
I wrote a program to look at reject'ed emails in my maillog
sudo tail -20000 /var/log/maillog | grep reject | ./maillog.pl
maillog.pl just groups by ip address.
So this is quasi interesting to show the current attempts:
watch 'sudo tail -20000 /var/log/maillog | grep reject | ./maillog.pl'
maillog.pl (this is of course ugly,
code but you can see what it is doing)
So watching that gives me the most recent abusers, who I can add to
my kill file with:
sudo /sbin/iptables -A INPUT --source 192.168.0.8 -j DROP
But I do have the default firewall rules running, so to log things with
the firewall running:
sudo /sbin/iptables -A RH-Firewall-1-INPUT -p tcp --dport 25 -j LOG
The firewall config lives in /etc/sysconfig/iptables and can be
edited by /usr/bin/system-config-securitylevel
This is quasi interesting:
watch 'sudo /sbin/iptables -L INPUT -v'
When I was in high school for a year in Minnesota in 78/79 I remember
buying gas for 99 cents/gallon. It was a noteworthy amount, because
it was near to a buck a gallon.
Today in California Gas is $2.25 plus or minus, it has been higher
and lower recently, and is likely to get higher soon.
Basically a 2.25 increase in gas prices in 26 years.
So 99 cents a gallon in 1979, but what is that worth today?
Economic History Services has a 'What is
its Relative Value' service. According to it:
In 2003, $0.99 from 1979 is worth:
$2.51 using the Consumer Price Index
$2.11 using the GDP deflator
$2.46 using the unskilled wage
$3.29 using the GDP per capita
$4.24 using the relative share of GDP
So it sort of looks like unskilled workers who paid a buck a gallon for gas in
1979 could pay $2.46 today.
But I'm sort of picking on 1979. Gas prices jumped a lot in there. They were
about 60 cents a gallon from July 1975, up to about 66 cents in Dec 1978,
and then at $1.02 in Dec 1979, then they were more stable for quite a while
(well, 'stable' is an odd word to apply to gas prices, but bear with me...).
In 2003, $0.66 from 1978 is worth:
$1.86 using the Consumer Price Index
$1.52 using the GDP deflator
$1.78 using the unskilled wage
$2.42 using the GDP per capita
$3.16 using the relative share of GDP
So picking a slightly different base price provides a less optimistic view, but
cars get better mileage today then in 1978, so that 1.78 equivelent in the
unskilled wage can be bumped up a bit to account for higher mileage.
Here is my thesis: Gas prices are not nearly high enough to serve as a
significant disincentive to driving.
Misc Poking at Statistics with little meaning...
(you can probably stop reading here because I am thrashing
through some numbers)
According to the 'Monthly Energy Review' at
Energy Information Administration in the US Department of Energy
the 'U.S. City Average Retail Price' varied between 64.4 and 85 cents per
gallon. That is an all city average, and I suspect Minnesota prices
could easily have been a tad higher then the national average.
Gas prices have varied quite a bit, the
US City Average Price was 99.4 cents/gallon
by November 1978. And it went up, and then was under a buck a gallon
from March 1986-March 1989, and Nov and Dec 1989, and then a decade
later from Jan 1999-Mar 1999. It was as low $1.13 in Jan 2002.
But that isn't my story :-) My story is that based on a hazily
recollected price from a snowy St. Paul night in winter of 1979 that
current gas prices, adjusted for inflation, are not out of line.
We pay more in California, but the nationwide average in Dec 2004 was $1.88
But is this just an example of picking optimal times? Yeah...probably. That 1.13
in Jan of 2002 maps to $1.20 today, so in today's terms gas was much cheaper, but
it was $1.60 in June of 1999, so perhaps that 1.20 in Jan 2002 should be considered
a discount on gas for a short period, I don't know.
On the other hand, in 1976 gas was 60 cents a gallon, which in today's
(well, 2003) dollars is 1.91, or about what gas cost at the end of the year in 2004
(yes, there is an extra year in there, but inflation has been low recently).
Which all speaks for a series comparing historic gas prices in today's dollars
(however you want to define 'today'). But again, while the prices vary, the upshot
is that they just are not enough to have a big impact on consumer behavior.
I've read sources who treat demand for gas as being inelastic in respect to price,
but I just don't buy that. I think demand for gas is inelastic in respect to
price while gas prices are within a comfort zone for consumers.
I don't know the true limits of that comfort zone, but I do know that I consider
the cost of transportation to be a bargain!