How to handle the SSL or TLS connection with a SPAM filter and avast!
This FAQ will be useful for those who want to use the email client, the SPAM filter, avast!, and Stunnel in this order for the secure connection.

For Windows 95, 98, and Me users

I guess Windows 9x and Me users still need to manually set up avast!'s email protection to configure Stunnel with avast! and a SPAM filter. As I use avast!4.6 on Windows XP and 4.6 doesn’t allow me to manually set it up any longer, I can’t make sure the following configuration works fine. As this is what I did with avast!4.5, however, I think it will work fine for those who need to manually set up the email protection.

A. Installing and preparing Stunnel
Refer to “A. Installing and preparing Stunnel” for Windows NT, 2000, XP, and 2003 users.

B. Setting the mail client
I will assume that you have two kinds of POP accounts, one normal account (toto@myserver.com) and one secure account (toto2@gmail.com).
I will also assume that your SPAM filter uses the port 120 (like Spamihilator). If not, adapt the following instructions.
Warning to Gmail users: For a Gmail username in the mail client settings, you should set something like toto2@gmail.com, not like “toto2”. (It can also work, though.) Although I’ll use “toto2” for a Gmail username in the following instructions because I don’t want those who use other services to get confused, Gmail Help says “@gmail.com” should be included in a Gmail username.

Configure the normal POP account like this:

  • server: 127.0.0.1 (This is your SPAM filter’s location.)- port: 120 (This port number is for Spamihilator. Adapt it for the port listened by your SPAM filter.)- username: 127.0.0.1&toto#pop.myserver.com:110&110 (127.0.0.1 is avast!'s location. The first “110” is your remote POP server’s port (where your remote POP server listens). If your remote POP server listens on a different port, adapt it. The second “110” is where avast! listens. “Mailserver&username&port” is the format Spamihilator requires. “Username#mailserver:port” is the format avast! requires.)

Configure the normal SMTP access like this:

  • server: 127.0.0.1 (This is avast!'s location.)- port: 25 (This is where avast! listens.)- username: toto#smtp.myserver.com:25 (25 is your remote SMTP server’s port (where your remote SMTP server listens). If your remote SMTP server listens on a different port, adapt it. “Username#mailserver:port” is the format avast! requires.)

Configure the secure POP account like this:

  • server: 127.0.0.1 (This is your SPAM filter’s location.)- port: 120 (This port number is for Spamihilator. Adapt it for the port listened by your SPAM filter.)- username: 127.0.0.1&toto2#127.0.0.1:11110&110
    (The first “127.0.0.1” is avast!'s location. The second “127.0.0.1” is Stunnel’s location. 11110 is where Stunnel listens. 110 is where avast! listens. “Mailserver&username&port” is the format Spamihilator requires. “Username#mailserver:port” is the format avast! requires.)

Configure the secure SMTP access like this:

  • server: 127.0.0.1 (This is avast!'s location)- port: 25 (the port listened by avast!)- username: toto2#127.0.0.1:11025 (127.0.0.1 is Stunnel’s location. The port 11025 is where Stunnel listens. “Username#mailserver:port” is the format avast! requires.)

C. Setting avast!
As you probably know, the avast4.ini file sits in the DATA folder in the folder where avast! has been installed. It is C:\Programs\Alwil Software\Avast4\DATA by default. If you can’t find it, use “Search” to look for avast4.ini.

Open it in Notepad and locate the item named [MailScanner]. Under [MailScanner] you need to add the following values:

PopListen=127.0.0.1:110
SmtpListen=127.0.0.1:25
PopRedirectPort=110
SmtpRedirectPort=25
AutoRedirect=1
IgnoreLocalhost=0

Leave intact the other values except those above under [MailScanner] in the avast4.ini file. It seems that when you manually set up avast!'s email protection, you should set as the redirected ports (Pop/SmtpRedirectPort) only the port numbers where avast! listens. If you have a problem with this setting, you should delete the line “IgnoreLocalhost=0” because in your email client settings you tell avast! where avast! has to scan, which is the localhost (127.0.0.1).

For Windows NT, 2000, XP, and 2003 users

Please refer to this post.