help centre
For more info visit status.atmail.com

How can we help?


Search our knowledge base for answers to
common questions and latest updates.



My activities New request

Follow

Block Sending From Specific IP Addresses

Stewart -

PROBLEM

I need to block sending from my server from specific IP addresses.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

CAUSE

Anti-Spam requirement.

RESOLUTION

  1. Open and edit /usr/local/atmail/mailserver/configure.

  2. Locate:
    domainlist dkim_off =
  3. Add:
    hostlist bad_ips = /usr/local/atmail/mailserver/bad_ips
    Example:
    hostlist bad_ips = /usr/local/atmail/mailserver/bad_ips
    domainlist dkim_off =
  4. Locate:
    acl_smtp_rcpt = acl_check_rcpt
  5. Add:
    acl_smtp_connect = acl_check_connect
    Example:
    acl_smtp_connect = acl_check_connect
    acl_smtp_rcpt = acl_check_rcpt
  6. Locate:
    begin acl
  7. Add:
    acl_check_connect :

    drop
                    hosts = : +bad_ips
                    message = Rejected - IP [$sender_host_address:ip] is listed in bad IPs
                    logwrite = LOG:ACL_CONNECT:REJECT:$sender_host_address:ip $sender_host_address is listed in Bad IPs

    accept
    Example:
    begin acl

    acl_check_connect :

    drop
                    hosts = : +bad_ips
                    message = Rejected - IP [$sender_host_address:ip] is listed in bad IPs
                    logwrite = LOG:ACL_CONNECT:REJECT:$sender_host_address:ip $sender_host_address is listed in Bad IPs

    accept
  8. Save changes and exit.

  9. Create /usr/local/atmail/mailserver/bad_ips.

    List IP addresses you wish to block. New line for each IP.

    Example:
    11.11.11.11
    22.22.22.22
    33.33.33.33
  10. Restart atmail services for the changes to take affect.
    /etc/init.d/atmailserver restart
Have more questions? Submit a request

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com