Topic: Block email address and whole domain in iRedMail
==== ==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Debian 6
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: 
====
Hi,
How can i block email address and whole domain's in iRedMail? I know that Pro version has it but I don't use it.
I've tried with postfix:
Created a file for sender_policy, with email address and domains:
spam@domain.com        REJECT
domain.net                    REJECT
mailing.domain.org        REJECTThan did:
postmap hash:sender_policyAdded entry 'check_sender_access' to the main.cf in 'smtpd_recipient_restrictions'
smtpd_recipient_restrictions = permit_mynetworks,
        check_sender_access hash:/etc/postfix/sender_policy,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unlisted_recipient,
        check_policy_service inet:127.0.0.1:7777,
        permit_sasl_authenticated,
        reject_unauth_destination,
        reject_non_fqdn_helo_hostname,
        reject_invalid_helo_hostname,
        check_policy_service inet:127.0.0.1:10031And finally, restart postfix.
But it doesn't work, I still receive spam from e-mails at the list. Maybe syntax of the sender_policy is wrong or entry in main.cf?
Or maybe there is better way to do this? And also can I block some e-mail address or domain for specific users?
Thank you.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.