1

Topic: Block all external emails

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I'm trying to block all external emails from being sent from an account. I had a look at https://forum.iredmail.org/post52551.html#p52551 but it says:

No --add, --delete or --list specified. Exit

I've tried to roll my own by doing:

python wblist_admin.py --account dev@example.com --add --blacklist '@.'
python wblist_admin.py --account dev@example.com --add --whitelist '@example.com'

which it accepts but doesn't stop the emails.

I upgraded to iRedAPD 2.2 from 1.7 to try and get this to work.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Block all external emails

You need '--outbound' argument for outbound white/blacklist. e.g.

python wblist_admin.py --outbound --account ...

3

Re: Block all external emails

ZhangHuangbin wrote:

You need '--outbound' argument for outbound white/blacklist. e.g.

python wblist_admin.py --outbound --account ...

python wblist_admin.py --outbound --account dev@example.com --add --blacklist '@.'

gives me the SQL error:

(ProgrammingError) relation "outbound_wblist" does not exist
LINE 1: DELETE FROM outbound_wblist WHERE sid=1 AND rid IN (1)

4

Re: Block all external emails

SQL table "amavisd.outbound_wblist" was first introduced in iRedMail-0.9.3:
https://docs.iredmail.org/upgrade.iredm … database_2

Please add it manually. Seems you missed some upgrade steps.

5

Re: Block all external emails

ZhangHuangbin wrote:

SQL table "amavisd.outbound_wblist" was first introduced in iRedMail-0.9.3:
https://docs.iredmail.org/upgrade.iredm … database_2

Please add it manually. Seems you missed some upgrade steps.


Thanks, will do. Sorry I missed that bit.