Monthly Archive for October, 2005Page 4 of 6

Attack of the Mutant Zombie Flesh-eating Marios from Mars

For some reason, I found this page absurdly funny. Saw the link on The Tao of Mac.

Try to identify as many of them as you can. Or find them by name. Have you found the Spock Mario yet? The Kill Bill Mario? The Vampire Mario? :)

OK, I’ll stop now. :)

Blogging tips 4.5: The importance of titles

(NOTE: this is part of the “Blogging tips” series)

I’ve already mentioned this in part 4: Making your blog search engine-friendly, but this is an important, and usually ignored part of search engine optimization, which deserves an article of its own.

Continue reading ‘Blogging tips 4.5: The importance of titles’

An Anti-Spam gateway #5: SpamAssassin

(NOTE: this is part of the “An Anti-Spam gateway” series)

Installing SpamAssassin isn’t too hard, thanks to Perl’s CPAN.

First, type the following:
perl -MCPAN -e shell

If it’s the first time you do that, it will ask you a bunch of questions. Accept the defaults, and when asked about where to download from, try to pick a couple of places near you. When you finally get to the command prompt, it’s time to install the modules.

Now, we could simply tell it to install SpamAssassin, and it would install all the required modules for it. But we’ll want to install some optional ones as well, so, do the following (one at a time, naturally), saying “yes” whenever it asks you if you want to install a pre-requisite (note, also, that some of the modules may already be installed - if so, just move on to the next one):

install MIME::Base64
install DB_File
install Net::DNS
install Net::SMTP
install DBI
install LWP
install Compress::Zlib
install IO::Zlib
install Archive::Tar
install Mail::SpamAssassin

There are 2 still missing, related to MySQL, but we haven’t installed MySQL yet, so… just type quit to exit the CPAN shell.

Onward to Razor, in the next part.

Blogging tips #2.5: Finding stuff to write about using Search Feeds

(NOTE: this is part of the “Blogging tips” series)

If your blog isn’t a personal one, it’s very likely that it has one or more subjects you write about, such as software, fishing, cheese dip… :) And it’s likely as well that you need to stay current - that is, if your blog is about cheese dip, you want to stay informed about any cheese dip-related news, developments, and such. One way, of course, is by reading other blogs about cheese dip (assuming, of course, there are any…) - sometimes you’ll just link to their articles with a comment or two, sometimes you’ll get an idea for a brilliant new opinion piece about the current state of cheese dip in the world… you get the idea.

And, if you’re smart, you have already subscribed to some blogs about the subject. And I advise you to keep doing so.

However, there’s another way - not to replace the above, but to complement it: search feeds. Instead of subscribing to a blog, you subscribe to the results of a search query, and then, it appears in your feed aggregator as if it was another blog. But it’s not a blog, it’ll have articles from (possibly) every blog in the world. As long as they talk about cheese dip, of course.

Let’s try it now. I’ll use Google Blogsearch, although there are other ways - possibly better ones. If so, please let me know. :)

  1. browse to http://blogsearch.google.com
  2. type "cheese dip" (between quotes, to get only references to cheese dip, instead of a page which mentions “cheese” and “dip” unrelated to each other), and click on the button or press Enter
  3. after you get the results, switch to “Sort by Date” by clicking on it, on the top right
  4. scroll to the bottom of the page. Look, nice Atom and RSS links! Just copy one of them (probably one of the “100 results” links), paste it in your feed aggregator, and there you go. Whatever happens in the world about cheese dip, and is mentioned in any blogs, you’ll know. Life has meaning again. :)

An Anti-Spam gateway #4: Postfix, part 2

(NOTE: this is part of the “An Anti-Spam gateway” series)

Continuing the Postfix configuration… Edit the /etc/postfix/main.cf file.

Look for, and change according to your configuration, the following options:

myhostname (should be your machine’s name)

myorigin (probably $mydomain)

mynetworks (your network(s), possibly 10.0.0.0/24 in this case)

relay_domains (should be, of course, your domain(s))

bounce_notice_recipient, delay_notice_recipient, error_notice_recipient, policy_notice_recipient (change them all to postmaster@yourdomain, assuming that address exists or is an alias to an existing one - possibly yours, and replacing yourdomain with your domain, of course)

Change the smtpd_client_restrictions option to:
  smtpd_client_restrictions = permit_mynetworks,
   reject_rbl_client relays.ordb.org,
   reject_rbl_client sbl.spamhaus.org,
   permit

Change smtpd_helo_required to yes. Mail servers should learn to behave. Besides, it’s bulk spam senders that normally don’t.

Now, save that file, and edit /etc/postfix/transport. Except for the comments, it should be changed so that it only has this line:

*       smtp:10.0.0.2

(remember? that’s the real mail server’s address)

Leave the editor, then do the following: postmap /etc/postfix/transport, to update the transport.db file.

Now, test it. Yes, when you start it (postfix start), if everything went well, it should already be working as a non-filtering gateway. Assuming, of course, that you configure your firewall so that mail from the outside (to port 25) is delivered there, and that it can connect to the real mail server, and that the latter accepts mail from the gateway.

When it’s working, go to the next part of the series. :)

An Anti-Spam gateway #3: Postfix

(NOTE: this is part of the “An Anti-Spam gateway” series)

So, at last, we’re getting our hands dirty. It’s time to separate the boys from the men, or something. :)

Now, as I was writing this, I had a decision to make. Should this part, called “Postfix”, include all the Postfix-related instructions, which will produce a non-working, non-testable mail server until the rest of the stuff is installed? Or should this part have enough to create a standard gateway, not depending (yet) on SpamAssassin, ClamAV and the rest - and, only in THOSE parts, will the instructions for configuring Postfix to use them appear?

I’ve decided to do it the latter way. It’s important to be able to test each part of the gateway as you install it, instead of doing everything and only “turning it on” at the end, with a myriad possible points of failure.

So, to install Postfix: go to http://www.postfix.org/download.html, choose the closest mirror, and download the most recent stable version of Postfix (at this time, it’s 2.2 patchlevel 5, or 2.2.5). Uncompress it, enter its directory, and then…

AUXLIBS='-ldb' CCARGS='-DHAS_DB' OPT='-O2' DEBUG='' make
AUXLIBS='-ldb' CCARGS='-DHAS_DB' OPT='-O2' DEBUG='' make install

There, an installed Postfix. (accept the defaults at the end.) The configuration files are at /etc/postfix, so let’s go there and make a few changes to main.cf… in the next part, since this one is becoming too long.

An Anti-Spam gateway #2: A note about compiling on Linux

(NOTE: this is part of the “An Anti-Spam gateway” series)

These days, most Linux distributions, especially the RPM-based ones like Fedora, Red Hat or SUSE, increasingly assume that “nobody compiles stuff anymore”. Due to that, they don’t install, by default, the development parts of most libraries and applications.

An example: by default, a distro will install OpenSSL, with the openssl package. But that’s the library files only. It “gives” OpenSSL to other RPMs that need it, but, when you try to compile any program to use OpenSSL, it will fail (or, possibly worse - it will compile, but without OpenSSL support, and you may fail to notice it), because you are missing the header files.

They’re in the openssl-devel package.

So, from now on, through the rest of this series, pay attention when compiling (mostly in the ./configure part). If it fails, or if it passes but says that you are missing an important library, the thing to do is probably to look for the missing *-devel package, and install it.

Incidentally, this is not a problem in the BSDs.

An Anti-Spam gateway #1: Initial stuff

(NOTE: this is part of the “An Anti-Spam gateway” series)

Before we begin to actually get our hands dirty :), here are a few things to note:

  • As I said in the introduction, this is a recipe, not a reference manual. There are certainly many other ways to do something like this, but I won’t be exploring them.
  • I’m not explaining basic stuff like “to uncompress a .tar.gz file, type tar xzf filename. If you don’t know things like that, this series really isn’t for you. Sorry about that.
  • The required hardware depends on the company / organization size, and on how much mail you receive. A Pentium III with 128 MB of RAM is more than enough for a company with 1000 employees. No, that’s not a typo - if you’re not using Windows or Oracle (yuck), you don’t need 64-CPU supercomputers with terabytes of RAM. :)
  • The operating system should be a Unix-like system with a C compiler such as gcc. Most Linux distributions include everything you need, although you may have to manually select the “Development” packages during installation, or add them later. Other alternatives include OpenBSD (my personal favorite, and the server this blog runs on), FreeBSD, NetBSD, Solaris, etc.. Anything but Windows or SCO. :)
  • I will be compiling most of the software manually. Using packages (such as RPMs, or BSD ports) is possible, but they may not activate some needed option by default. It’s up to you.
  • This machine will be a gateway — that is, it won’t have mailboxes, it will just receive mail from the Internet, refuse messages from known open relays, tag spam messages by prepending “*** SPAM ***” to the message subjects, and stop emails with viruses, warning the recipient that someone tried to send them a virus. Then, if the mail wasn’t stopped, it delivers it (or the virus warning message) to the “real” email server, which has the actual mailboxes.
  • For simplification, I’m assuming that the machine has only one network card, and has the IP adress 10.0.0.1 (supposedly, some firewall is redirecting port 25 from the outside to this address). The “real” mail server has the address 10.0.0.2. More complex configurations are possible, but, again, I’m not exploring them here.
  • I’m also assuming that the gateway has unrestricted outbound Internet access. (it only needs inbound access to port 25). After it’s working, you may possibly want to restrict it somewhat (though I think it it’s a bit useless), but it’ll always need to do DNS queries, access some spam databases like Razor, and update ClamAV.

So, before you go to part 2, you should have a box with one network card configured as 10.0.0.1, running an Unix-like OS with a C compiler.

Post #100!

This very post is the 100th article in the Tlog. Not too bad for less than 2 months. :)

Some history and stats:

  • the most often seen post of all time is still Limiting Internet Explorer to Windows Update.
  • The “Blogging tips” series currently has 24 parts, although the highest numbered part is 15. Don’t ask.
  • Top OSes: Windows (77%), Linux (11%), Macintosh (6%).
  • Top browsers: Firefox (58%), MSIE (25%), Safari (3%). Yay! :)
  • Top screen resolutions: 1024×768 (48%), 1280×1024 (21%), 800×600 (6%).
  • Only 1.2% of traffic comes from search engines. Of that, 91% is from Google.
  • Visits (not hits, real visits) per day average about 200. It was much higher than that at the time of Asa’s link, then went down, and is slo-o-o-owly rising again.

I’ll annoy you people again when I get to the 500th. :)

Blogging tips #1.7: What’s in a name?

(NOTE: this is part of the “Blogging tips” series)

“What’s in a name? That which we call a rose
By any other word would smell as sweet.”

– from “Romeo and Juliet”, William Shakespeare

So, your new blog needs a name, right? But how to choose one?

Well, far from me to attempt to stifle your creativity. :) However, I have a few tips:

  1. If possible, choose something that you’ll actually call your blog by. This is not a requirement, but it can be helpful. Don’t just put something in the name box, such as “random thoughts” or “my blog”, and never even look at it again.
  2. Try to be original. After you’ve chosen a name, google for it. Look for it in Technorati and Google’s Blog Search. If you find blogs with that name, maybe you should think of a new one. (really, “random thoughts” isn’t actually that original… :)) Using the same name as an existing blog will make your own look like a rip-off, and, if you ever get to be successful, it may even be a cause for legal action against you.
  3. If your blog isn’t a personal one, try to include the subject of the blog in its title. For instance, instead of “Odin’s Temple”, call it “Odin’s Temple - Nordic mythology and folklore”. Search engines will “like” you more because of it. :)

An Anti-Spam gateway #0: Introduction

(NOTE: this is part of the “An Anti-Spam gateway” series)

“An Anti-Spam gateway” is the Tlog’s third series.

In it, I will write about how to use a Unix-like free operating system such as Linux or OpenBSD, using Postfix, amavisd-new, SpamAssassin with MySQL, and ClamAV to create a free, open source, efficient mail gateway, for tagging spam (I don’t believe in deleting it automatically, that should be up to the users themselves) and stopping email viruses.

While I plan to make this not too advanced, I won’t deal with the basics here, like the installation of the OS, or uncompressing files, and so on.

Also, I won’t explore all the alternatives. This is a HOWTO, not a reference manual. Think of it as a recipe: while a cook is free to change some of the ingredients or procedures, the recipe doesn’t usually say “if you do this instead, that will be the result”. For instance, you may not require an anti-virus, or may want to use a different one, or may want to delete spam messages above a certain score, or may not use MySQL for the Bayes database… all of those possibilities are perfectly fine. I just won’t explore them here.

I hope this series is useful. Few companies, except perhaps multinationals, have gateways as good as this one will be. Trust me. ;) I may be missing out the money I could make by selling “consulting” to companies to do this, instead of just posting the information on the net; however, I don’t want to make a living of installing and configuring email gateways :), and, also, if the majority of companies (and possibly even ISPs) adopt something like this, then there may be, in the future, less spam out there. Making the world a better place, and all that stuff. A guy can dream.

RSS aggregators: alternatives to Bloglines?

This one’s a question for you hundreds and hundreds :) of readers: which RSS aggregator do you prefer? And why?

I’ve been using Bloglines for a while, and I’m perfectly satisfied with it; however, even in situations like this, I always like to look for alternatives. However, among the few I’ve tried, no one has made me consider “dumping” Bloglines. Not that I want to - I simply can’t believe that the very first aggregator I’ve tried was the best. :)

Google Reader may have potential, but, unlike most of Google’s products, this one really deserves the “beta” label - it’s simply not “there” yet.

So, which one (or ones) do you use?

Again, I’m not dissatisfied with Bloglines; I just want to get to know the alternatives better.




Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal