Results 1 to 8 of 8

Thread: How to whitelist some IP's?

  1. #1
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    79

    How to whitelist some IP's?

    Hello,

    I've a server with exim and dovecot, easy_spam_fighter, spamassassin, blockcracking. I've created a backup mail server (backup MX) and I've a small problem, because e-mails send from this backup to primary mail server are rejected.

    Reason:
    550-SPF: IP_OF_BACKUP_MX is not allowed to send mail from DOMAIN.TLD:
    How to whitelist IP of backup MX from checking SPF?

    Thank you.

  2. #2
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    79

    Spamexperts and spf whitelist

    A patch (works with cb1.x and 2.0):

    Code:
    #PATCH FOR SPAMEXPERTS
    echo -e "IP1\nIP2\nIP3\nIP4\n" | tee /etc/virtual/esf_skip_hosts /etc/virtual/whitelist_hosts_ip /etc/virtual/whitelist_hosts
    chown mail.mail /etc/virtual/esf_skip_hosts /etc/virtual/whitelist_hosts_ip /etc/virtual/whitelist_hosts
    chmod 644 /etc/virtual/esf_skip_hosts /etc/virtual/whitelist_hosts_ip /etc/virtual/whitelist_hosts
    service exim restart
    We use it for Spamexperts. When a sender domain has set in DNS zone spf record with -all, e-mails forwarded by spamexperts cloud has been dropped. Only change IP1-4 with IPs of your spamexperts servers.
    ALL ENTRIES FROM FILES WILL BE REMOVED!!! Make a backup or modify a script.

  3. #3
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,097
    How to whitelist IP of backup MX from checking SPF?
    Add the ip of the backup-MX to your SPF entry's in DNS.
    Greetings, Richard.

  4. #4
    Join Date
    Apr 2016
    Posts
    1
    great Rechard!!

  5. #5
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    79
    Hello, I don't want to allow sending e-mails from MX servers.

  6. #6
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,097
    It was a quick and dirty solution. If you want to do it really correct you have to whitelist them.
    I like the Cpanel WHM option more if you adjust it to this:
    Code:
         deny
        hosts = ! +backupmx_hosts
        message = SPF: $sender_host_address is not allowed to send mail from $sender_address_domain
        spf = fail
    And then just add your backup-mx in the backupmx_hosts list. Just 1 file needed instead of all those whitelist files.

    Your script is fine too, however DA does not have a esf_skip_hosts so I wonder why you are creating them with that script.
    Greetings, Richard.

  7. #7
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,601
    Hello,

    Code:
    EASY_SKIP_HOSTS = /etc/virtual/esf_skip_hosts                        - file to hold hostlist that ESF should skip checks for.
    is a part of Easy Spam Fighter supported by Directadmin and Custombuild.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  8. #8
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,097
    Oh then I maybe have to make those files? I have Easy Spam Fighter running, but those files are not present in my /etc/virtual directory.
    Greetings, Richard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •