Email Whitelist-Blacklist Control

From SME Server


Originally developed by Darrell May.

stephdl Stéphane de Labrusse AKA Stephdl


Contrib 10:
Contrib 9:
The latest version of smeserver-wbl is available in the SME repository, click on the version number(s) for more information.


This contrib provides a server-manager panel to designate user defined email whitelists and blacklists.

An email whitelist is a list of hosts, domains, or email addresses which will be accepted by SME Server regardless of possible spam content or origin. Administrators should use caution when using whitelists as email coming from whitelisted addresses will bypass many of the mechanisms that SME provides for identifying unsafe email messages.

An email blacklist is a list of hosts, domains, or email addresses that will be blocked all of the time.


Install of the lastest Email Whitelist-Blacklist package is from the smecontribs repo:

1. Install package:

yum install --enablerepo=smecontribs smeserver-wbl
yum install --enablerepo=smecontribs smeserver-wbl

Reconfigure machine:

signal-event console-save

or if you prefer to reboot your server

signal-event post-upgrade; signal-event reboot
yum --enablerepo smecontribs install smeserver-wbl

Reconfigure machine:

signal-event console-save

or if you prefer to reboot your server

signal-event post-upgrade; signal-event reboot

2. Configure:

Once you do this a new menu item will be visable in the Server-Manager on the left hand side, called E-mail WBL. Clicking on this will present you with 2 buttons.

E-mail WBL
E-mail traffic is scanned and may be blocked due to the various screening methods enabled. 
You may use this panel to define e-mail white/black lists.
Black lists are used for rejecting e-mail traffic.
[Black List]
White lists are used for accepting e-mail traffic.
[White List] 

If you press the Black List button you will see the following window. Email-Reject.jpg

If you press the White List button you will see the following window. Email-accept.jpg

And finally If you press the SAVE button you will simply be presented with one button to;

Execute the email-update event now to restart services and load in your changes.

This will apply any of the changes you made in the Reject or Accept windows.

Usage Examples

Black Lists: REJECT

The qpsmtpd badhelo is effective in examining the SMTP HELO string and then block mail based on this string. Entries follow the following format.

To find the proper string to enter on the qpsmtp badhelo line. 1. Open an offending email. 2. Open the header of the email. 3. Look for a line that says, (HELO Partial strings will not work, E.G. in the previous example will not work. It must be the complete HELO string.

Important.png Note:
Using qpsmtpd badhelo will stop all mail at a domain that uses that specific HELO string. It's not looking at a specific email. This strategy isn't always effective as spammers generally change this field to stop this kind of detection. Also companies have several SMTP gateways so you may see mail from and . You will then need to add both of these. The advantage however is if you do want to stop all mail from one source, it can be effective.

Alternatively you may use the ip address. Again look in the header for the Helo line. It may look something like this,

Received: from (HELO ( Now simply add the IP address you found in the HELO line.


@host or user@host

White Lists: ACCEPT

Whitelisthosts - see this post,51429.0.html

Single IP


192.168.10. (be careful - with no trailing . you match 192.168.100 - 192.168.109. )



Known Issues

See bugs below


Please raise bugs under the SME Contribs section in bugzilla .

IDProductVersionStatusSummary (5 tasks)
10472SME ContribsFuturCONFIRMEDNFR Add subnet checking to whitelist hosts
10117SME ContribsFuturCONFIRMEDadd support for URIBL
9276SME Contribs8.2CONFIRMEDdesign and documentation of qpsmtpd wbl vs spamassassin white or black lists
9275SME Contribs8.2CONFIRMEDwbl whitelist status switch does nothing in server manager
4664SME Contribs7.3CONFIRMEDRedesign wbl dbase to improve efficiency


Only released version in smecontrib are listed here.

smeserver-wbl Changelog: SME 10 (smecontribs)
2021/03/15 Jean-Philippe Pialasse 0.5.0-3.sme
- fix reference to spamd and panel link [SME: 10948]
2020/11/28 Michel Begue 0.5.0-02.sme
- Back to compatibility with e-smith-manager [SME: 10948]

2020/06/08 Michel Begue 0.5.0-01.sme
- initial release for smeserver-manager (sme10)

- [0.3.0-19.sme9]