1

Topic: Whitelist incoming email addresses

I'm considering setting up a iRedMail server using a whitelist to restrict incoming email.

eg: andrew@mydomain.com (on my iRedMail server) has a whitelist of (allowed) emails: 'joe@newgmail.com,fred@newyahoo.com'
The requirement is any email not in that list will get returned to sender as not received,
so in above example only joe@newgmail.com and fred@newyahoo.com would be able to send email to andrew@mydomain.com (which is using iRedMail), any other email addresses would be rejected.

Assuming this is possible, can I set up individual whitelists for each users email address (on my iRedMail server) and is this data stored in a table that I as administrator of iRedMail can access/edit etc?

Could you confirm that this can be done?

Many thanks.

2 (edited by Neutro 2019-06-05 06:20:38)

Re: Whitelist incoming email addresses

If i understand the documentation correctly it's possible wink

https://docs.iredmail.org/manage.iredapd.html

You can test by yourself until the master of the forum gives you a definitive answer wink

3

Re: Whitelist incoming email addresses

thanks for the reply, I can't test it yet as this ability (or not) will determine whether I proceed.

Most important is a whitelist per user, not global.

Neutro wrote:

If i understand the documentation correctly it's possible wink

https://docs.iredmail.org/manage.iredapd.html

You can test by yourself until the master of the forum gives you a definitive answer wink

4

Re: Whitelist incoming email addresses

Looking at the docs: https://docs.iredmail.org/manage.iredap … acklisting

"For per-user or per-domain whitelists and blacklists, please use option --account. for example:"

it looks as if I can whitelist like this:

# python wblist_admin.py --account andrew@mydomain.com --add --whitelist joe@newgmail.com fred@newyahoo.com

at the bottom of the page it mentions running a cron job to update the whitelist

"fetch all mail domains stored in sql table greylisting_whitelist_domains instead of fetching from command line arguments."

So am I correct in thinking that the whitelist is stored in the sql dbase, so when you run the python command it updates the sql table?

And just to confirm: the presence of a whitelist will only allow those in the whitelist to send to --account andrew@mydomain.com, any others will bounce back.

Sorry for all the questions! Please let me know if my assumptions are all wrong (or right) !

5 (edited by Neutro 2019-06-05 17:42:17)

Re: Whitelist incoming email addresses

I belive you are correct even if i didn't test it myself since i've never needed this feature, but since it's listed in the documentation there is no reason for it not to work smile

On my server there is a "amavisd" database which contains a "wblist" table. I guess this is where the whitelist/blacklist informations go when using the command lines as the documentation states it's using the plugin "amavisd_wblist".

I suggest you rent a cheap dedicated server or VPS and test it yourself as it will also help you to get familiar with iredmail and mail servers in general if you've never ran one by yourself before. It should cost you less than a menu at McDonald's wink

6

Re: Whitelist incoming email addresses

To clarify:

@Neutro's replies are correct (Thank you, @Neutro smile ). You can use iRedAPD for global, per-domain and per-user white/blacklists. All details mentioned here: https://docs.iredmail.org/manage.iredapd.html

Note: To block all except whitelisted ones, you need to blacklist "@." (without quotes), it's a catch-all match which means "all people".

Neutro wrote:

On my server there is a "amavisd" database which contains a "wblist" table. I guess this is where the whitelist/blacklist informations go when using the command lines as the documentation states it's using the plugin "amavisd_wblist".

This is correct.

iRedMail has white/blacklists in few places, for example, Postfix, iRedAPD, Amavisd, etc. Storing white/blacklists in Amavisd SQL database will make the data available to both iRedAPD (white/blacklisting during smtp session) and Amavisd (after-queue content based spam/virus scanning).

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

7 (edited by ag5743 2019-06-06 13:27:20)

Re: Whitelist incoming email addresses

Many thanks, fantastic information!
PS I'd buy you a coffee but I don't use PayPal...!
maybe check out implementing Stripe? - https://stripe.com/en-ca

8

Re: Whitelist incoming email addresses

I can not request Strip account due to its restriction. sorry.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee