Spam Filtering in Webmail: How to Keep Your Inbox Clean
Want to effectively filter spam for your email accounts? Unwanted emails are a daily problem and filtering spam correctly saves you time and protects you against phishing. In this guide we explain how you can optimally configure spam filtering on your hosting environment.
Your inbox is flooded with spam, phishing and newsletters you never signed up for. Sound familiar? In this article you learn how to filter spam in webmail and get your inbox back under control.
Recognizing and understanding spam
Not all unwanted mail is the same. It helps to understand the differences:
- Spam: unwanted commercial mail, often sent in bulk
- Phishing: mail that poses as legitimate in order to steal your data
- Newsletters: legitimate mail you have (knowingly or unknowingly) signed up for
Modern spam filters catch a lot, but not everything. That is why it is smart to set extra rules yourself.
Spam filter in Roundcube webmail
At Theory7 you use Roundcube as your webmail. You find the spam settings under Settings in the menu.
SpamAssassin scores
Your mail server uses SpamAssassin to detect spam. Every mail gets a score. The higher the score, the more likely it is spam. By default, mail with a score of 5 or higher is marked as spam.
In your webmail you can see this from:
- The mail is automatically moved to the Spam folder
- The subject sometimes gets [SPAM] as a prefix
- In the headers you see the SpamAssassin score
Adjusting the spam threshold
Getting too much spam in your inbox? Then the threshold is set too high. Getting legitimate mail in spam? Then it is set too low. You can adjust this via DirectAdmin or by contacting support.
Blacklist: blocking senders
A blacklist blocks mail from specific senders or domains. Handy for recurring spammers.
Setting up a blacklist in Roundcube
- Go to Settings in the menu
- Click on Filters or Mail filters
- Create a new filter
- Set: "If sender contains [email address or domain]"
- Action: "Move to Trash" or "Delete message"
- Save the filter
Blocking entire domains
Getting spam from different addresses at the same domain each time? Then block the entire domain. Use "@spamdomain.com" as the filter value.
Note: do not block large providers such as gmail.com or outlook.com. That also blocks legitimate mail.
Whitelist: allowing senders
A whitelist is the opposite: mail from certain senders always arrives, even if the spam filter would decide otherwise.
When do you use a whitelist?
- Important customers or suppliers sometimes end up in spam
- Newsletters you do want to receive are being blocked
- Mail from your own domains is incorrectly filtered
Setting up a whitelist in Roundcube
- Go to Settings and then Filters
- Create a new filter
- Set: "If sender contains [trusted address or domain]"
- Action: "Move to Inbox" or "Keep message"
- Make sure this filter is at the top (high priority)
Folder rules: sorting automatically
Besides spam, you can also automatically sort legitimate mail. This keeps your inbox organized.
Examples of useful folder rules
- Newsletters to the "Newsletters" folder
- Invoices to the "Administration" folder
- Notifications from specific services to their own folder
- Mail from certain customers to a project folder
Creating a folder rule in Roundcube
- Go to Settings and then Filters
- Click on Add new filter
- Give the filter a clear name
- Set the condition (sender, subject, etc.)
- Choose action: "Move to folder" and select the correct folder
- Create the target folder first if it does not exist yet
Practical tips against spam
Besides filters there are more things you can do:
Prevent spam at the source
- Do not use your email address everywhere online
- Create a separate address for newsletters and webshops
- Unsubscribe via the unsubscribe link (only for legitimate senders!)
- Never click on links in suspicious mail
Mark spam correctly
If spam still ends up in your inbox, move it to the Spam folder instead of deleting it. This trains the spam filter to recognize similar mail in the future.
Check your spam folder regularly
Take a look in your Spam folder now and then. Sometimes legitimate mail ends up there by accident. Move such mail to your inbox to train the filter.
Frequently asked questions
Why do I still get spam despite filters?
Spammers constantly change their techniques. No filter is 100% effective. Combine server filters with your own rules for the best result.
My mail does not arrive at the recipient
This is about outgoing mail and falls outside this article. Read our article about SPF, DKIM and DMARC for tips on email authentication.
Can I have spam deleted automatically?
You can, but we advise against it. If legitimate mail is accidentally marked as spam, you lose it. Rather let spam go to the Spam folder and empty it periodically.
How long does mail stay in the Spam folder?
By default the Spam folder is automatically emptied after 30 days. So check regularly that no important mail is among it.
More about email security
Good spam filtering is only one part of email security. Also read our article about SPF, DKIM and DMARC for server-side protection. Considering an upgrade? Check out our business email hosting with advanced spam filtering included.
Filtering spam: advanced techniques
In addition to the basic features, there are advanced techniques to filter spam that protect your inbox even more effectively:
Greylisting
Greylisting temporarily rejects unknown senders. Legitimate mail servers try again later; spam servers usually do not. This is a server-side setting your hosting provider can activate.
DNSBL (DNS-Based Blackhole Lists)
These lists contain IP addresses known to send spam. Your mail server automatically checks whether incoming mail originates from a blocked IP address.
Bayesian filtering
SpamAssassin uses machine learning to recognize patterns in spam. The more spam you correctly mark, the better the filter becomes. This is a reason to always move spam to the Spam folder instead of deleting it directly.
| Filter technique | Effectiveness | Configuration needed | Where active |
|---|---|---|---|
| SpamAssassin | High | Minimal (active by default) | Server level |
| Greylisting | Medium-high | By provider | Server level |
| DNSBL | Medium | By provider | Server level |
| Manual filters | High (targeted) | By user | Webmail/client |
| Bayesian | High (learns) | Training through use | Server level |
Filtering spam: protecting your email address
The best spam filter is prevention. By using your email address wisely, you prevent a lot of spam at the source:
Email address aliases
Create separate aliases for different purposes. For example, use newsletter@yourdomain.com for sign-ups and info@yourdomain.com for business contact. If an alias receives too much spam, you can disable it without losing your main address.
Contact form instead of email address on your website
Spammers scan websites for email addresses. Use a contact form with captcha instead. This prevents your address from ending up on spam lists.
Be careful with sign-ups
Always read the privacy conditions before entering your email address on a website. Some companies sell address lists to third parties. When in doubt, use a disposable address.
Regular clean-up
Take time monthly to:
- Unsubscribe from newsletters you do not read
- Check and adjust spam filters
- Empty the spam folder
- Update blacklist and whitelist
Also read our article about SPF, DKIM and DMARC for server-side protection against email spoofing. Check out our business email hosting with advanced spam filtering included.
Filtering spam for business use
For business email, effective spam filtering is extra important. Missed messages can lead to lost deals or delayed communication. Here are tips specifically for business email use:
Training employees
The best spam filter is a trained user. Make sure all employees know how to:
- Recognize phishing emails (suspicious senders, unexpected attachments, urgent requests)
- Mark spam correctly so the filter learns
- Regularly check the spam folder for false positives
- Never click links in suspicious emails
Separate email addresses for different purposes
Use different addresses for different functions:
- info@company.com: general contact address (receives most spam)
- invoices@company.com: only for invoicing
- name@company.com: personal business communication
- marketing@company.com: for newsletter sign-ups and marketing tools
This separation allows you to apply different spam filter settings per address and makes it easier to replace an address if it receives too much spam.
Advanced spam solutions for businesses
Besides standard server-side filtering, there are advanced solutions for businesses that need extra protection:
| Solution | Protection | Cost |
|---|---|---|
| SpamAssassin (standard) | Basic spam filtering | Free (with hosting) |
| SpamExperts | Advanced filtering for incoming and outgoing | From €2/mailbox/month |
| Barracuda | Enterprise-level protection | From €5/mailbox/month |
| Microsoft Defender for Office 365 | Advanced threat detection | With Microsoft 365 subscription |
For most SMEs, standard SpamAssassin filtering combined with manual filters and good SPF/DKIM/DMARC configuration is sufficient. Only for larger organizations or specific compliance requirements are advanced solutions needed.
Filtering spam: trends and future developments
Filtering spam remains an evolving field. Spammers are getting smarter and filter tools are constantly adapting. Here are the most important trends:
AI-based filtering
Machine learning is getting increasingly better at recognizing spam and phishing. Modern filters analyze not only the text but also the context, sender reputation and behavioral patterns. This makes it harder for spammers to bypass filters.
Stricter authentication requirements
Large providers like Google and Microsoft increasingly require correct SPF, DKIM and DMARC configuration. Mail without this authentication is marked as spam faster or even rejected. This forces legitimate senders to get their configuration in order.
BIMI (Brand Indicators for Message Identification)
BIMI is a new protocol that shows your company logo next to verified emails. This helps recipients distinguish genuine messages from phishing. BIMI requires a correctly configured DMARC policy as a foundation.
Keep checking and adjusting your spam filters regularly. The fight against spam is never won, but with the right tools and habits you keep your inbox manageable.
Need help?
Struggling a lot with spam or your filters not working as expected? Contact Theory7 support. We are happy to help you optimize your spam protection.
Filtering spam: best practices
Good spam filtering is essential for a clean inbox. There are different levels you can set when filtering spam. It is advisable to start filtering spam at a medium level and adjust it later. Effective spam filtering combines server-side filters with client-side rules. When filtering spam, do not forget to check your spam folder regularly for incorrectly filtered messages. By filtering spam wisely, you prevent important emails from getting lost.
Filtering spam: advanced email security
Effective spam filtering goes beyond blocking unwanted messages. It is an essential part of your overall email security against phishing, malware and other threats.
Recognizing and blocking phishing
Phishing emails are the most dangerous form of spam. They imitate legitimate companies to steal your personal data. Watch for these characteristics:
- Check the sender address - The displayed name might be "PayPal", but the actual address is often something like paypal-security@random-domain.com
- Urgency and threats - "Your account will be blocked if you do not respond within 24 hours" is a classic phishing tactic
- Suspicious links - Hover over links without clicking to see the actual URL. Phishing links lead to fake websites.
- Attachments - Never open attachments from unknown senders, especially no .exe, .zip or .docm files
Greylisting as a spam technique
Greylisting is an effective server-side technique for spam filtering. On the first contact from an unknown sender, the email is temporarily rejected with a "try again later" message. Legitimate mail servers automatically retry, but spam servers usually do not.
Filtering spam for businesses: a layered approach
For business use, a single spam filter is insufficient. Implement a layered security approach:
| Layer | Protection | Technology |
|---|---|---|
| 1. Network layer | Block known spam IPs | DNS blacklists (DNSBL) |
| 2. Protocol layer | Verify sender authentication | SPF, DKIM, DMARC |
| 3. Content layer | Analyze message content | SpamAssassin, Bayesian filters |
| 4. User layer | Personal filter rules | Whitelist/blacklist per user |
Tips to train your spam filter
A well-trained spam filter becomes increasingly effective. Follow these tips for optimal spam filtering:
- Mark spam consistently - Use the "spam" button in your webmail or email client instead of just deleting messages
- Fix false positives - If a legitimate message ends up in the spam folder, mark it as "not spam" so the filter learns
- Check your spam folder weekly - Important emails can accidentally be marked as spam
- Use separate email addresses - An address for newsletters keeps your primary business inbox cleaner
- Unsubscribe from unwanted mailings - Use the unsubscribe link instead of marking messages as spam
By applying this layered approach and consistently training your filters, you keep your inbox clean and protect yourself and your organization against the increasingly sophisticated methods of spammers and cybercriminals.
Filtering spam: business email security at scale
For companies with multiple employees, spam filtering requires a centralized approach that is both effective and manageable. An ad hoc approach where each employee individually configures their spam filters leads to inconsistent protection and increased risk.
Implement an email gateway as a central filtering point for all incoming and outgoing email. Solutions such as Proofpoint, Barracuda or the more affordable open-source option Rspamd filter messages before they reach your mailboxes. This reduces server load and ensures a consistent level of protection for all employees.
Set up a clear email security policy that describes how employees should handle suspicious messages. Define a procedure for reporting phishing attempts and train employees regularly with simulated phishing tests. Companies that regularly run phishing simulations see a 60-80% decrease in the number of employees who click on malicious links.
Also consider an email archiving system that helps not only with compliance but also with forensic investigation of security incidents. If an employee falls victim to phishing, you can check the archive precisely which messages were received and which actions were taken. This information is essential for limiting damage and preventing recurrence. Combine this with strong email deliverability to guarantee both incoming protection and outgoing reliability.
Filtering spam: conclusion and recommendations
Effective spam filtering is an essential part of your overall email security and requires a layered approach that combines technical solutions with user awareness. A single filter is never enough; the most effective protection consists of multiple lines of defense working together.
Implement SPF, DKIM and DMARC at the server level as a foundation for email authentication. Use SpamAssassin or a similar tool for content analysis. Add a gateway filter for larger organizations. Train your spam filter consistently by marking spam and fixing false positives. And invest in awareness training for employees, because the human factor remains the weakest link in any security chain. Check your spam folder monthly for missed legitimate messages and periodically evaluate whether your filter settings are still optimal. With this approach you keep your inbox clean and protect yourself and your organization against the increasingly sophisticated methods of cybercriminals.
Filtering spam: stay ahead of spammers
The fight against spam is an ongoing process that requires vigilance and regular adjustment. Spammers continuously evolve their techniques, and your spam filtering strategy must evolve along with it. Evaluate the effectiveness of your filters monthly by counting the number of spam messages in your inbox and checking the number of false positives in your spam folder. Adjust thresholds when needed and keep your filter rules up to date. Stay informed about new spam trends and security threats via news sources and security bulletins. Train your employees regularly in recognizing phishing and social engineering. With a proactive attitude and a layered security approach, you keep your inbox clean and your organization protected against the increasingly sophisticated methods of cybercriminals and spammers.
Filtering spam for businesses: policy and guidelines
Effective spam filtering in a business environment goes beyond technical measures alone. Set up a clear email policy that describes how employees should handle suspicious messages. Define a procedure for reporting phishing attempts to the IT department so filters can be updated. Implement a quarantine system where blocked messages are held for manual review instead of being deleted directly. Plan quarterly phishing simulations to test your team's awareness and provide targeted training where needed. Document all filter rules and changes in a central register so adjustments are traceable and unintended blocks can be resolved quickly. With policy and technology in balance, you create a robust defense against unwanted messages.