A good way to filter spam and viruses
By Red Squirrel
First, here is what you need in order for this to work:
Download the webmin rpm and go to the server to install it. I wish all linux programs were rpms, those go so smooth to install, usually, but sometimes there's nasty dependencies and you end up having to download a few hundred files…. But that does not happen with webmin. It just installs.
To access it you simply type in your browser http://hostnameofserver:10000 and to login you use root as username and your root password.
Webmin itself is very straightforward and beets trying to figure out what files you have to edit and what the syntax is, since I know I would have been lost without it. In this article I won't really cover setting up smtp since that is a tricky one and I don't even remember everything I did, but I know I had to go to the /etc/mail/ directory and edit a few files (access was one of them) to allow relay for my workstation IPs. Then I had to type "make" in the same folder for it to process the new configurations, then type "service sendmail restart". But it could not have been that easy. Allot of linux stuff requires fooling around with files until it works, and you loose track of everything! That's what happened to me.
Setting up the local accounts
When your workstations check the server, they are actually checking local email accounts and not even going online, since it's the server's job to go online to fetch the mail. So in webmin or in the console, create linux users and put them in the group "mail", I use email_redsquirrel for my red squirrel at iceteks dot com account, email_webmaster and so on.
If you're doing this through the console, you use these commands:
Adduser email_user -g mail
Passwd email_user [enter a password]
In your email client, enter the info corresponding to this, so for the pop3 server you would put the hostname or IP of the server, and then enter the username and password. For smtp you would put the server if you have the smtp server going, if not keep whatever you already got.
Now, in webmin, go to the "servers" section, then click on "fetchmail mail retrieval".
You should see an empty list, and at the bottom there's an option for "add new server". Click on that and you will get this screen: (click to enlarge)
Lot of stuff you can just leave default, the rest is straightforward. For server name, you put mail.yourdomain.com. The default protocol should be set to pop3. For the other section, put your remote user name and password in the appropriate fields, this is the username and password of your email account (ex: your isp's). For local server, you put the user account you created, so email_user in this case. That's it! The rest should just be kept to default. Submit the information.
Send yourself a test email and then type "fetchmail" in the console, you should see that it has mail to download, then check with your email client to see if it gets the mail. It's good to wait about 30 to 60 seconds before checking, when doing tests like this, as the email may get caught on a busy line/server on the internet and what not. It's not always instant, which I learned when testing this.
You might be thinking of how ennoying it will be that you always have to do a fetchmail, but not to worry, there's a way to make the server check automatically. Go on to the next page to find out.
This site best viewed in a W3C standard browser at 800*600 or higher
Site design by Red Squirrel | Contact
© Copyright 2019 Ryan Auclair/IceTeks, All rights reserved