Adjusting Spam Protection Settings in Ghost

Adjusting the spam protection settings in Ghost is an essential step in ensuring that your personal blog runs smoothly and is protected against spam. Ghost is a powerful platform that comes with excellent spam protection out of the box, but it may become necessary to tweak the settings to suit your specific needs.

When you are setting up your personal blog using Ghost, you may find yourself testing the email settings several times to ensure that everything is working correctly. This can result in multiple requests to the system, which can trigger Ghost's spam protection system. Once this happens, you may find that your requests are denied, and you must wait several hours before trying again.

To avoid this situation, you can adjust the spam protection settings in Ghost. These settings are controlled through environment variables for the Docker container. Here are some of the settings you can adjust in Ghost to tweak the spam protection system in Docker:

spam__content_api_key__freeRetries=99
spam__content_api_key__lifetime=1
spam__content_api_key__maxWait=1
spam__content_api_key__minWait=1
spam__global_block__freeRetries=99
spam__global_block__lifetime=1
spam__global_block__maxWait=1
spam__global_block__minWait=1
spam__global_reset__freeRetries=4
spam__global_reset__lifetime=1
spam__global_reset__maxWait=1
spam__global_reset__minWait=1
spam__private_block__freeRetries=99
spam__private_block__lifetime=1
spam__private_block__maxWait=1
spam__private_block__minWait=1
spam__user_login__freeRetries=4
spam__user_login__maxWait=1
spam__user_login__minWait=1
spam__user_reset__freeRetries=4
spam__user_reset__lifetime=1
spam__user_reset__maxWait=1
spam__user_reset__minWait=1

Alternatively, you can also adjust the spam protection settings in Ghost by editing the configuration file (config.[mode].json). This method is equally effective and can be more convenient for some users.

"spam": {
    "user_login": {
        "minWait": 1,
        "maxWait": 1,
        "freeRetries": 4
    },
    "user_reset": {
        "minWait": 1,
        "maxWait": 1,
        "lifetime": 1,
        "freeRetries": 4
    },
    "global_reset": {
        "minWait": 1,
        "maxWait": 1,
        "lifetime": 1,
        "freeRetries":4
    },
    "global_block": {
        "minWait": 1,
        "maxWait": 1,
        "lifetime": 1,
        "freeRetries": 99
    },
    "private_block": {
        "minWait": 1,
        "maxWait": 1,
        "lifetime": 1,
        "freeRetries": 99
    },
    "content_api_key": {
        "minWait": 1,
        "maxWait": 1,
        "lifetime": 1,
        "freeRetries": 99
    }
}

It is highly recommended that you revert the spam protection settings back to their default values after you have finished working in production mode to ensure optimal security for your personal blog.

Subscribe to The Code Sandwiches

Sign up now to get access to the library of members-only issues.
Jamie Larson
Subscribe