Skip to main content

Validate MX Blacklist

Validates an email address by checking its MX (Mail Exchange) records against a blacklist of known bad mail servers. This method helps identify disposable email addresses, temporary mailboxes, and known spam sources by examining the mail server infrastructure.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Input

  • Configuration Id - Configuration ID from the Configuration node. This ID references the validation configuration containing blacklist rules.

  • Email Address - Email address to validate against MX blacklist. The domain's MX records will be checked against configured blacklists.

Output

  • Result - Validation result object containing success status and blacklist check details. The structure depends on the "Is Valid" option.

    When "Is Valid" is disabled (default), returns full result object:

    {
    "Success": true,
    "Email": "user@example.com",
    "ValidationType": "mx_blacklist",
    "Domain": "example.com",
    "MailServers": [
    {
    "Host": "mail.example.com",
    "Priority": 10,
    "IpAddress": "1.2.3.4"
    }
    ],
    "BlacklistMatch": false,
    "Configuration": {...}
    }

    When "Is Valid" is enabled, returns simplified result:

    {
    "IsValid": true
    }

Options

  • Is Valid - When enabled, returns only the IsValid boolean instead of the full result object. Default: false.
    • Disabled - Returns complete validation result with blacklist check details
    • Enabled - Returns only {"IsValid": true} or {"IsValid": false}

How It Works

The Validate MX Blacklist node performs comprehensive blacklist checking:

  1. Retrieves the Configuration ID and email address
  2. Performs DNS MX record lookup for the email domain
  3. Resolves MX records to IP addresses
  4. Checks domain against blacklisted domains (if configured)
  5. Checks MX IP addresses against blacklisted IPs (if configured)
  6. Returns validation result with blacklist match details

This validation method:

  • Performs MX record lookup (like Validate MX)
  • Additionally checks against configured blacklists
  • Can detect disposable email services
  • Can identify known spam sources
  • Validates both domain and IP-level blacklists

When to Use MX Blacklist Validation

Best For:

  • Filtering out disposable/temporary email services
  • Preventing fraudulent sign-ups
  • Protecting against spam and abuse
  • Validating lead quality in marketing
  • User registration on sensitive platforms
  • Reducing bounce rates from disposable emails
  • Compliance and security requirements

Not Suitable For:

  • Verifying specific mailbox existence (use SMTP instead)
  • Fast format checking (use Regex instead)
  • Validating all email providers (may block legitimate services)

Usage Examples

Basic Disposable Email Detection

// Configure blacklist in Configuration node
// Blacklisted Domains: ["guerrillamail.com", "10minutemail.com", "mailinator.com"]

msg.con_id = msg.configId;
msg.emailAddress = "test@10minutemail.com";

// After Validate MX Blacklist node
if (msg.result.Success) {
console.log("Email passed blacklist check");
// Proceed with registration
} else {
console.log("Email is from blacklisted domain");
console.log("Please use a permanent email address");
msg.disposableEmail = true;
}

Comprehensive Blacklist Configuration

// In Configuration node, set multiple blacklist types

// Blacklisted Domains (known disposable email services)
const blacklistedDomains = [
// Disposable email services
"guerrillamail.com",
"10minutemail.com",
"mailinator.com",
"temp-mail.org",
"throwaway.email",

// Known spam sources
"spam-domain.com",
"bulk-sender.net"
];

// Blacklisted MX IP Addresses (known bad mail servers)
const blacklistedIPs = [
"1.2.3.4", // Known disposable email server
"5.6.7.8" // Known spam server
];

msg.black_domains = blacklistedDomains;
msg.mx_ip_add = blacklistedIPs;

// After Configuration and Validate MX Blacklist
if (!msg.result.Success) {
console.log("Email failed blacklist check");

// Check which type of blacklist matched
if (msg.result.BlacklistMatch) {
console.log("Matched blacklist");
}
}

User Registration with Blacklist Check

// User submits registration form
msg.userEmail = "newuser@example.com";
msg.con_id = msg.configId;
msg.emailAddress = msg.userEmail;

// After Validate MX Blacklist node
if (msg.result.Success) {
// Email is not blacklisted
console.log("Valid email, proceeding with registration");

// Continue registration flow
msg.allowRegistration = true;

} else {
// Email is blacklisted
console.log("Disposable or blacklisted email detected");

// Return error to user
msg.registrationError = "Please use a permanent email address. " +
"Disposable email services are not allowed.";
msg.allowRegistration = false;
}

Lead Quality Scoring

msg.con_id = msg.configId;
msg.emailAddress = msg.leadEmail;

// Initialize quality score
let qualityScore = 100;

// After Validate MX Blacklist node
const result = msg.result;

if (!result.Success) {
// Blacklisted domain or IP
qualityScore -= 100;
console.log("Lead uses blacklisted email service");
msg.leadQuality = "very_low";

} else {
// Check mail server details
const mailServers = result.MailServers;

// Check if using major email provider (high quality indicator)
const majorProviders = ['google', 'outlook', 'yahoo', 'icloud'];
const usesMajorProvider = mailServers.some(server =>
majorProviders.some(provider =>
server.Host.toLowerCase().includes(provider)
)
);

if (usesMajorProvider) {
qualityScore += 20;
msg.leadQuality = "high";
} else {
// Custom domain - medium quality
msg.leadQuality = "medium";
}
}

msg.qualityScore = qualityScore;
console.log("Lead quality score:", qualityScore);

Multi-Stage Validation with Blacklist

// Stage 1: Regex validation
msg.con_id = msg.configId;
msg.emailAddress = msg.userEmail;

// After Validate Regex
if (!msg.result.Success) {
msg.validationStatus = "invalid_format";
return;
}

// Stage 2: MX Blacklist validation
// After Validate MX Blacklist
if (!msg.result.Success) {
msg.validationStatus = "blacklisted";
msg.errorMessage = "Disposable email addresses are not accepted";
return;
}

// Stage 3: Standard MX validation (if needed)
// After Validate MX
if (!msg.result.Success) {
msg.validationStatus = "no_mx_records";
return;
}

msg.validationStatus = "valid";
console.log("Email passed all validation stages");

Batch Email List Cleaning

// Clean email list before email campaign
const emailList = [
"valid@gmail.com",
"temp@10minutemail.com",
"user@company.com",
"disposable@guerrillamail.com"
];

const cleanList = [];
const removedList = [];

for (const email of emailList) {
msg.emailToCheck = email;

// Validate MX Blacklist node processes here
// (use Loop node in actual workflow)

if (msg.result.Success) {
cleanList.push(email);
} else {
removedList.push({
email: email,
reason: "blacklisted"
});
}
}

console.log("Clean emails:", cleanList.length);
console.log("Removed emails:", removedList.length);

// Export clean list
msg.cleanedEmailList = cleanList;
msg.removedEmails = removedList;

IP-Based Blacklist Checking

// In Configuration node
// Blacklisted Mx Ip Addresses: ["1.2.3.4", "5.6.7.8"]

msg.con_id = msg.configId;
msg.emailAddress = "user@suspicious-domain.com";

// After Validate MX Blacklist node
const result = msg.result;

if (!result.Success) {
console.log("Email failed validation");

// Check if specific IP was blacklisted
if (result.MailServers) {
result.MailServers.forEach(server => {
console.log(`Mail server: ${server.Host} (${server.IpAddress})`);
});
}

msg.blacklistReason = "Mail server IP is blacklisted";
}

Dynamic Blacklist Updates

// Load blacklist from external source or database
const disposableEmailDomains = await fetchDisposableEmailDomains();

// Update configuration with latest blacklist
msg.black_domains = disposableEmailDomains;

// Create configuration with updated blacklist
// After Configuration node
msg.con_id = msg.configId;

// Now validate emails against updated blacklist
msg.emailAddress = msg.userEmail;

// After Validate MX Blacklist node
if (!msg.result.Success) {
console.log("Email is in updated blacklist");
}

Error Handling

The Validate MX Blacklist node returns specific errors in these cases:

  • ErrInvalidArg

    • Configuration ID is empty
    • Email Address is empty
  • ErrNotFound

    • Configuration not found for the provided Configuration ID
  • ErrInternal

    • Failed to retrieve Configuration ID or Email Address
    • Failed to set output result
  • ErrRuntime

    • Failed to validate email via MX Blacklist
    • DNS lookup error
    • Network connectivity issues

Best Practices

  1. Maintain Updated Blacklists

    • Regularly update blacklisted domains list
    • Add newly discovered disposable email services
    • Remove legitimate services incorrectly blacklisted
    • Use external blacklist services or APIs
  2. Combine Domain and IP Blacklists

    • Use both domain and IP-based blacklists
    • Domain blacklists catch known services
    • IP blacklists catch services that change domains
  3. Provide Clear User Feedback

    • Explain why email was rejected
    • Suggest using permanent email address
    • Provide examples of acceptable email providers
  4. Balance Security and Usability

    • Don't over-blacklist legitimate services
    • Test blacklist against real user base
    • Monitor false positive rates
    • Allow manual review process
  5. Log Blacklist Matches

    • Track which blacklists are being hit
    • Analyze patterns in blocked emails
    • Identify new disposable email services
    • Generate reports for security teams

Performance Characteristics

  • Speed - Medium (DNS lookup + blacklist check, typically 50-500ms)
  • Accuracy - High for known disposable services, depends on blacklist quality
  • Network - Requires DNS query
  • Resource - Low CPU, some network bandwidth
  • Scalability - Good for bulk processing

Common Blacklist Scenarios

Scenario 1: Disposable Email Detected

{
"Success": false,
"Email": "temp@10minutemail.com",
"Domain": "10minutemail.com",
"BlacklistMatch": true,
"ValidationType": "mx_blacklist"
}

Scenario 2: Clean Email (Not Blacklisted)

{
"Success": true,
"Email": "user@gmail.com",
"Domain": "gmail.com",
"BlacklistMatch": false,
"MailServers": [...]
}

Scenario 3: IP Blacklist Match

{
"Success": false,
"Email": "user@shady-service.com",
"MailServers": [
{
"Host": "mail.shady-service.com",
"IpAddress": "1.2.3.4",
"Priority": 10
}
],
"BlacklistMatch": true
}

Common Disposable Email Services

Here are some popular disposable email services to blacklist:

  • 10minutemail.com
  • guerrillamail.com
  • mailinator.com
  • temp-mail.org
  • throwaway.email
  • maildrop.cc
  • getnada.com
  • tempmail.com
  • yopmail.com
  • dispostable.com

Best Practice Blacklist Management

// Maintain categorized blacklists
const disposableEmailServices = [
"10minutemail.com",
"guerrillamail.com",
"mailinator.com"
];

const spamSources = [
"known-spam-domain.com",
"bulk-sender.net"
];

const suspiciousDomains = [
"suspicious-service.com"
];

// Combine for comprehensive protection
const blacklist = [
...disposableEmailServices,
...spamSources,
...suspiciousDomains
];

msg.black_domains = blacklist;

Common Errors and Solutions

ErrorCauseSolution
"Configuration Id cannot be empty"Configuration ID not providedEnsure Configuration node runs first
"Email Address cannot be empty"Email input not setVerify Email Address input has value
"Configuration not found"Invalid Configuration IDCheck Configuration ID is correct
"Failed to validate email via MX Blacklist"DNS lookup or blacklist check failedCheck network connectivity
False positivesLegitimate email flaggedReview and update blacklist
False negativesDisposable email not caughtUpdate blacklist with new services

Tips for Effective Use

  1. Layered Validation Approach

    Regex → MX Blacklist → MX → SMTP (optional)
  2. Automated Blacklist Updates

    • Integrate with disposable email detection APIs
    • Schedule regular blacklist updates
    • Monitor new disposable email services
  3. User Communication

    • Clearly explain why email was rejected
    • Provide alternative solutions
    • Allow support contact for false positives
  4. Analytics and Monitoring

    • Track blacklist hit rates
    • Identify patterns in rejected emails
    • Monitor false positive reports
    • Adjust blacklists based on data
  5. Whitelist Override

    • Allow manual whitelist additions
    • Provide process for users to appeal
    • Corporate email exception handling

Security Considerations

  • Privacy - Don't log full email addresses in public logs
  • False Positives - Have process to handle incorrectly blocked emails
  • Blacklist Updates - Validate blacklist sources before importing
  • Rate Limiting - Prevent abuse of validation endpoint
  • User Experience - Balance security with usability
  • Compliance - Ensure blacklist checking complies with regulations