Archive for the 'Email' Category

Reading blogs away from the computer

Now that I work at home (and yes, I’ve been incredibly lazy… where are the new posts? ahem… any day now :)), I’ve discovered something about myself: I don’t like to read stuff on my computer.

Sure, I do a lot of that, anyway, but, for instance, there are a lot of blogs that I have subscribed in Bloglines… only I usually skip them. It’s not that I don’t enjoy the content of those blogs - I do. I simply tend, repeatedly, to find excuses, other things I’d rather do at the time, and so on. However, I love to read them in other places - in bed, in a café, and so on. Whenever I’m alone, with nothing to do, and away from a computer.

Reading them in a mobile phone or PDA, then, is the logical answer (a laptop is still much too “PC-like”, with all its myriad distractions; when you can do everything, sometimes it’s hard to focus on just what you need to actually do). I currently use a Nokia 6630, which I’ve had for more than a year. I’ve tried several aggregators, and also the mobile Bloglines, which is accessed through a web browser such as Opera, and, while they work well, they’re too slow and cumbersome for my tastes. Therefore, I used a combination of newspipe (to convert posts from feeds to email messages) and Profimail (to access a mailbox through IMAP). Recently, I’ve dumped newspipe for rss2email, for reasons I’ll mention in a future post, and that’s what I have right now.

I’ve been considering other possibilities, though. As I said, a laptop isn’t a good idea here. I’d mostly like something a little bigger than the 6630, with a larger and better screen, and possibly a QWERTY keyboard (to do annotations and so on). The Nokia E61 seems to fit the bill (and it supports Wi-Fi, which would save me a lot of money in phone bills), though I wouldn’t like to spend too much money (after all, it’s mostly a luxury - I can keep using the 6630, or even battle my distaste for reading on the PC). A PocketPC (are they still called that, these days?) PDA might also do the trick, though the ones I saw recently would cost an arm and a leg (really, 800 euros!? what are they thinking?).

So, any suggestions / tips? :)

ProfiMail and the Gmail "untrusted certificate"

If you read your email on a Series 60 phone, you probably use ProfiMail, a very nice mobile email client.

However, when you configure it to access a Gmail account, you will always get the “This site uses an untrusted certificate” message. Quite annoying, since it requires 2 key presses to pass. Every single time. There’s no option for “I know, just ignore it from now on”.

The cause of the problem is that Series 60 phones, much like web browsers, have a list of trusted root certificates, and the one Gmail uses, from Equifax, isn’t in it.

How to fix it? I search around, and didn’t find a single page with instructions on how to solve this thing. But, by combining this and this, I was able to remove that annoying prompt for good.

Here’s how to do it:

  • Using the phone’s browser (Opera also works), browse to http://www.ocasta.co.uk/cert.html. Click on the only link on that page.
  • It should prompt you to install the certificate. Accept it.
  • It should ask you what you want to trust the certificate for. Choose “Internet”.

This works on my Nokia 6630. Other phones may simply install the certificate, after which you have to go to Settings, Security, Certificate Management, and set the new Equifax certificate as “Trusted”.

An Anti-Spam gateway #11: amavisd-new and Postfix

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

Not much longer, now… :)

Add the following line to /etc/postfix/main.cf:

content_filter=smtp-amavis:[127.0.0.1]:10024

and the following lines to /etc/postfix/master.cf:

# amavisd-new
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes

127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_header_body_checks

(re)Start postfix. It should be listening on two ports now: 25 and 10025.

An Anti-Spam gateway #10: amavisd-new

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

Go to the amavisd-new site and download the latest version (2.3.3 at the time of writing). Uncompress it somewhere, then copy amavisd to /usr/local/sbin (for instance), and amavisd.conf to /etc.

Edit the /etc/amavisd.conf file. Add the following lines to the end:

$daemon_user = ‘amavis’;
$daemon_group = ‘amavis’;
$mydomain = ‘YOURDOMAIN’; # replace with your own domain, of course
$virus_quarantine_method = ”;
$spam_quarantine_method = ”;
$banned_files_quarantine_method = ”;
$bad_header_quarantine_method = ”;
$sa_tag_level_deflt = -202.0;
$sa_tag2_level_deflt = 8.31;
$sa_kill_level_deflt = 50;
$sa_dsn_cutoff_level = 50;
$mailfrom_notify_admin = “YOUR EMAIL”; # add \ before the @, as in cats\@allyourbase.com
$mailfrom_notify_recip = “YOUR EMAIL”; # add \ before the @, as in cats\@allyourbase.com
$mailfrom_notify_spamadmin = “YOUR EMAIL”;# add \ before the @, as in cats\@allyourbase.com
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_bad_header_destiny = D_PASS; # many badly configured servers out there
$warnvirusrecip = 1;
$warnbannedrecip = 1;

(a few lines may have wrapped around in the above. They all start with “$“)

Create the following directories, making sure they belong to user and group amavis:

/var/amavis/tmp
/var/amavis/var,
/var/amavis/db

Run amavisd, and check if it’s listening in port 10024. If not, there should be some error message telling you what the problem (in /etc/amavisd.conf) is.

We’re almost done, now. Next: configuring Postfix to work with amavisd-new.

An Anti-Spam gateway #9: ClamAV

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

Now for the anti-virus. Go to the ClamAV site, download the latest stable version, uncompress it, then compile and install it:

./configure --with-user=amavis --with-group=amavis --sysconfdir=/etc
make
make install

(note: 3 lines. The first one ends with “–sysconfdir=/etc”)

Edit the /etc/freshclam.conf file. At the end, add the following line:

DatabaseMirror db.XY.clamav.net

replacing the XX with your country code (e.g. “us”, “uk”, “pt”, etc.)

Now, edit the /etc/clamd.conf file.

Near the beginning, comment out or delete the “Example” line. Then, add the following lines at the end:

TCPAddr 127.0.0.1
User amavis

Test if ClamAV is able to update itself:

freshclam --log-verbose

If there are any problems, it should tell you.

Finally, make it so that

/usr/local/bin/freshclam -d

(note the “-d”)

and

/usr/local/sbin/clamd

are run when the system boots. That will depend on your Unix variant.

An Anti-Spam gateway #8: MySQL and SpamAssassin

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

Thought I’d forgotten about this one, didn’t you? :)

Ready to make SpamAssassin actually use MySQL for the bayes database?

Start by creating the database itself:

mysql
CREATE DATABASE bayes;
GRANT ALL PRIVILEGES on bayes.* TO bayes@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES on bayes.* TO bayes@10.0.0.1 IDENTIFIED BY 'password';
EXIT

changing password to something else, of course

Next, I know you’ve already installed SpamAssassin using CPAN, but go to www.spamassassin.org and download it manually; you’ll be needing a file from the distribution, and while it should still be in /root/.CPAN, it’s simpler this way. Uncompress the .tar.gz and go to the sql/ directory. Then type:

mysql -u bayes -p < bayes_mysql.sql

It’ll ask for a password, which is the one you used when creating the database.

Now, edit the file /etc/mail/spamassassin/local.cf. Add the following lines:

bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn DBI:mysql:bayes:localhost
bayes_sql_username bayes
bayes_sql_password password

(again, replace password with the proper one.)

SpamAssassin is now configured to store bayes data on MySQL. Wasn’t too hard, was it? :)

Thunderbird 1.5 relased

Much like Firefox, the last RC - in this case, 1.5 RC 2 - is the same as the final version. If you already have that one, you have the latest Thunderbird.

For everyone else, you can get Thunderbird here.

Thunderbird 1.5 RC 1 released

Ricardo got there first this time. :) Mozilla Thunderbird 1.5 RC1 is out, and can be downloaded here. Or you can try the auto-update.

I’m using it right now, at work (on Linux).

An Anti-Spam gateway #7: MySQL

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

Time for MySQL. We’ll be using it just for storing the bayes tokens, not for per-user configuration (because, in this case, there is none) or anything else.

Note: if you already have a working MySQL on the server, being used for something else (this isn’t Windows, you can use the same machine for several different things :)), just skip to the next part.

So, go to http://dev.mysql.com/downloads/, choose the General Availability Release (it’s the top one - at this moment, it’s version 5.0), then scroll down a lot until you find the Source Downloads. Get the .tar.gz file. Uncompress it, enter the directory, and then…

export CFLAGS="-O2"
export CXXFLAGS="-O2 -fno-exceptions -fno-rtti"
./configure --prefix=/usr/local --localstatedir=/var/mysql --sysconfdir=/etc --without-innodb

(note: your browser may have split the “./configure” line in two. It starts with “./configure”, and ends with “–without-innodb”.)

then do the usual

make
make install

If everything went well,

mysql_install_db

and start the server with:

mysqld_safe --user=mysql &

Then assign a password to the MySQL root account (which is not the OS’s root account!):

mysqladmin -u root password "newpwd"
mysqladmin -u root -h host_name password "newpwd"

Replace “host_name” with the correct one, and “newpwd” with something else, of course.

Now, for efficiency, you should have an /etc/my.cnf file with several options set manually. The MySQL sources include some examples in the support-files directory: my-small.cnf, my-medium.cnf, etc.. Copy one to /etc/my.cnf, edit it, then restart the server. Nope, I won’t give detailed instructions for that here… read the MySQL docs at http://www.mysql.com.

Next: how to create the bayes database, and how to configure SpamAssassin to use it.

An Anti-Spam gateway #6: Razor

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

Vipul’s Razor is a piece of software for accessing a large database of spam messages. By installing it, and configuring SpamAssassin to use it, you can, among SpamAssassin’s other tests, see whether a particular message has been previously reported as spam by other people. You can also report messages yourself.

It’s not a perfect system, but the best way to use SpamAssassin is by combining several methods of checking spam. This is simply one more.

Note: although I have previously said that I won’t be offering different alternatives, as this is a “recipe”, for Razor I’ll make an exception. If you don’t want to use it, simply skip this part and move on to the next.

Continue reading ‘An Anti-Spam gateway #6: Razor’

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.

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. :)




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