> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.mysmtp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Whitelisting & Security Best Practices

> Secure your SMTP service with IP whitelisting, strong passwords, and multi-factor authentication to prevent unauthorized access and reduce spam risks.

When managing your SMTP service, securing access is crucial to prevent unauthorized use, reduce spam risks, and ensure reliable email delivery. Implementing **IP whitelisting and strong authentication methods** helps protect your email system from potential threats.

## 1. What is IP Whitelisting?

**IP whitelisting** is a security measure that allows only **pre-approved IP addresses** to access your SMTP server. This prevents unauthorized connections and reduces the risk of abuse.

**How It Works:**

* Only **approved IP addresses** can connect to your SMTP service.
* Blocks unauthorized access attempts from unknown IPs.
* Reduces the risk of **brute-force attacks** and **spam abuse**.

**Best Practices for IP Whitelisting:**

* **Only whitelist trusted IPs** – Avoid allowing large IP ranges.
* **Use dynamic IP detection** if employees work remotely.
* **Regularly update your whitelist** to prevent outdated access.
* **Monitor failed login attempts** from unlisted IPs for security threats.

### How to Implement IP Whitelisting:

* If using **mySMTP**, add trusted IPs in your **SMTP settings**.
* In **firewall configurations**, allow access only from authorized IPs.
* Use **.htaccess or server-side rules** to enforce restrictions.

## 2. Login Security – Preventing Unauthorized Access

To protect SMTP and email accounts from unauthorized access, implementing **strong authentication methods** is essential.

**Best Practices for Login Security:**

* **Use strong, unique passwords** – Avoid common phrases or dictionary words.
* **Enable Multi-Factor Authentication (MFA)** – Adds an extra layer of security.
* **Monitor login attempts** – Track unauthorized access or unusual activity.
* **Limit login attempts** – Prevent brute-force attacks by setting retry limits.

**Recommended Authentication Methods:**

* **MFA/2FA** – Requires a second verification step via an app (Google Authenticator, Authy).
* **Session Expiry & Auto-Logout** – Reduces the risk of session hijacking.

## 3. Testing and Monitoring Security Settings

To verify that your **SMTP security configurations** are working, test them using [**test.smtp.ai**](https://test.smtp.ai).

* **Check if IP whitelisting is enforced**.
* **Verify strong password policies are applied**.
* **Monitor login attempts and security logs** for unusual activity.

## 4. Conclusion

By implementing **IP whitelisting and login security**, you can **protect your SMTP service from unauthorized access, improve email security, and reduce spam risks**.

* **Whitelist trusted IPs** to restrict access.
* **Use strong passwords and enable MFA for added security**.
* **Monitor login attempts to detect suspicious activity**.

For real-time security testing, use [**test.smtp.ai**](https://test.smtp.ai) to ensure your email infrastructure remains safe and reliable.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.