Configure Postfix for DNS Blackhole Lists

Followed the instructions in this article Configure Postfix for DNS Blackhole Lists such as dsbl.org / spamhaus.org database to configure my Postfix email server to stop spam. I used the whole recommendation:


smtpd_recipient_restrictions =
   reject_invalid_hostname,
   reject_non_fqdn_hostname,
   reject_non_fqdn_sender,
   reject_non_fqdn_recipient,
   reject_unknown_sender_domain,
   reject_unknown_recipient_domain,
   reject_unauth_destination,
   permit_mynetworks,
   reject_rbl_client list.dsbl.org,
   reject_rbl_client sbl-xbl.spamhaus.org,
   reject_rbl_client cbl.abuseat.org,
   reject_rbl_client dul.dnsbl.sorbs.net,
   permit

Before that my settings where:


smtpd_recipient_restrictions =
  permit_mynetworks,
  permit_sasl_authenticated,
  reject_unauth_destination

I kept the permit_sasl_authenticated setting too.

ab – Apache HTTP server benchmarking tool for apache stress test

Read an article ab – Apache HTTP server benchmarking tool for apache stress test about the ‘ab’ command which can be used to stress test a website.

I used it and figured out that my webserver could handle about 100 requests per second.

The command I used was:


# ab -c 100 -t 10 -r http://www.example.org/test.php

How many requests per second does a load balancer support?

I’m working on an application that is going to need to scale, and I haven’t done this before. One of the things I wanted to know what how many requests per second I could expect a single load balancer to support. I found this article Benchmarking Load Balancers in the Cloud which says that on average you can get about 5000 requests/sec through a load balancer.

Firefox prompting to download application x-trash from Apache2

I was changing a HTML file index.html to be a PHP file called index.php and I renamed my index.html file index.html.bak. The plan was that Apache would find index.php rather than index.html and serve that as the default page. But when I went to load my page Firefox was asking me if I wanted to save the file with MIME type application/x-trash — not what I was expecting! It turns out the problem was related to the index.html.bak file, apparently Apache had decided that was the default page and then when it tried to get the MIME type for .bak it came up with application/x-trash. So the solution was to move the index.html.bak file to something with a filename that didn’t begin with ‘index.html’ (I used ‘original-index.html’) and then once that file had been renamed the index.php page was served properly.