Friday, February 23. 2007What the hell is rotating my mail.log?I want to keep track of the spam scores that show up in my /var/log/mail.log on my Debian Etch machine. My idea was to run a shell script grep’ing the wanted info out of the mail.log right before that file is to be rotated. logrotate provides configuration options for how and when log files should be rotated. This includes a possibility to run a script right before and after the rotation is done. So, I created a configuration /etc/logrotate.d/mail like
CODE: /var/log/mail.log /var/log/mail.info {
...
sharedscripts
prerotate
/usr/local/sbin/extract-spamscores
endscript
postrotate
/etc/init.d/sysklogd reload-or-restart
endscript
}
sysklogd is Debian’s package containing syslogd and klogd. The syslog itself already cares for rotating the basic log files, and this includes /var/log/mail.{log,info,warn,err}. sysklogd contains the cron-jobs /etc/cron.daily/sysklogd and /etc/cron.weekly/sysklogd, both of which contain logic for rotating the system’s log files. To obtain the list of the log files, the command syslogd-listfiles is issued in both of the scripts—the weekly script uses the option --weekly. When I issue syslogd-listfiles, I only get /var/log/syslog as answer, whereas with --weekly I get:
CODE: # syslogd-listfiles --weekly
/var/log/mail.warn
/var/log/uucp.log
/var/log/user.log
/var/log/daemon.log
/var/log/messages
/var/log/debug
/var/log/auth.log
/var/log/mail.err
/var/log/mail.log
/var/log/kern.log
/var/log/lpr.log
/var/log/mail.info
So I have to use the -s switch to exclude mail.log and mail.info such that logrotate can take care of them. As I also have a separate config for /var/log/messages in /etc/logrotate.d/messages, I modified the call of syslogd-listfiles --weekly in /etc/cron.weekly/sysklogd to
CODE: syslogd-listfiles --weekly -s "(messages|mail.(log|info))"
Continue reading "What the hell is rotating my mail.log?"
Posted by Stephan Paukner
in GNU/Linux
at
16:06
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: debian
Wednesday, February 21. 2007192.168.0.951Recently, on the SpamAssassin mailing list, someone was reporting that a newbie spammer seemed to have forgotten to replace variables with values. Someone else noted that the construction
CODE: Received: from 192.168.0.%RND_DIGIT
might lead to weird and impossible IP addresses. Now, I really found that in my spam quarantine:
CODE: Received: from unknown (HELO service3.colo.trueswitch.com) \
([<strong>192.168.0.951</strong>]) (envelope-sender <rvadur@minermail.com>) \
by mail.trueswitch.com (qmail-ldap-1.03) with SMTP for \
<info@xxxxxxxxxxx.com>; Sun, 14 Jan 2007 22:54:12 -0000
Friday, February 16. 2007Counteracting the spammersSpamAssassin is doing a good job on my site. It successfully protects my users’ mailboxes for some years now. However, during the last months spamming has increased significantly around the world. Luckily, only few spam is getting through, but a handful of spam mails a day is already too much for the pampered user. So I searched for current enhancements. So far I had only used Debian Etch’s standard spamassassin and amavisd-new packages. I consider greylisting as a solution for days where I see no other choice. I can imagine my users being confused because they receive an expected mail not immediately. So I installed three enhancements for SpamAssassin: The first one is available from Debian ‘unstable’, whereas the other two simply go into /etc/spamassassin. The SpamAssassin Rules Emporium provides a lot of other rules I haven’t tried yet. The rules are already having some hits adding a lot to the spam score of messages. Here are examples from within 24 hours: FUZZY_OCR=7.000 (twice), FUZZY_OCR=8.000, FUZZY_OCR=9.000 (5 times), FUZZY_OCR=10.000 (twice), BOTNET_OCNNEJP=5 (3 times), BOTNET_SHAWCABLE=5, SARE_STOCK_MSG_ID2=2.22 (5 times), SARE_GIF_ATTACH=0.75 (16 times), SARE_GIF_STOX=1.66 (6 times), SARE_PROLOSTOCK_SYM3=1.66 (8 times), SARE_MLH_Stock1=1.66 (12 times), SARE_RMML_Stock26=1.12, SARE_MLB_Stock1=1.66 (3 times), SARE_MLB_Stock3=0.794 (7 times), SARE_LWOILCO=0.388 (twice), SARE_LWSYMFMT=1.66, SARE_PROLOSTOCK_SYM4=2.66, SARE_PROLOSTOCK_SYM1=1.66, SARE_LWSHORTT=0.794. So, it was worth the no effort. For those who wonder why there are only few hits, Postfix is already doing most of the job by rejecting bad connections.
Posted by Stephan Paukner
in Information Technology
at
09:13
| Comments (0)
| Trackback (1)
Defined tags for this entry: anti-spam
Sunday, February 11. 2007Produkt aus Österreich mit Herkunft FrankreichFriday, February 9. 2007Digital cameras are infrared sensitiveThis is no real surprise, as all sensors simply have this drawback—or, is it a feature? The first video shows the infrared emitter of the remote control for my PicooZ, taken with my Nokia N73—that phone has 2 cameras, one with high resolution and another for video calls. Both show the same behavior. The second video has been taken with my Canon PowerShot A710 IS and shows the same emitter. The third video shows an ordinary TV remote control, taken with the same digital camera.
All sensors of digital cameras or camcorders on the market are covered by an infrared filter. Camcorders with the nightshot feature are able to deactivate it, so, sensors are very sensitive to infrared light in general. Some cameras have a too weak infrared blocker, like the expensive Leica M8, giving a red tint to black surfaces or black clothing. Customers have to use a separate infrared filter. Square-roots of operators
(Q34+44) If an operator S can be written as It remains to show that S−1/2 is a limit of polynomials in S−1 in the strong operator topology.
Posted by Stephan Paukner
in Master's Thesis
at
11:41
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: mathematics
Monday, February 5. 2007The 'Ow!' effectZwischenspülungen
« previous page
(Page 2 of 2, totaling 9 entries)
|
AboutCalendarArchivesCategoriesShow tagged entriesandroid antenna anti-spam apache astronomy austria automobile bash bluetooth bug career cloud collecting comic cooking cw debian diy dreams education electronics fail fashion finance flickr fun gentoo geography german gnu-linux gnucash google google earth graphics guitar hardware history image processing internet kernel kids language lifestyle linkroll literature ltd machine learning making mallorca mathematics matlab microsoft migration movies munich music nautilus numismatics octave pdf perl philately philosophy phone photo gear photography physics podcast politics postfix private programming public transport rant religion review salzburg samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet venice video virtualization wordplay work www yahoo youtube
Syndicate This BlogFollow meBookmarks
Powered by |