How to allow ips from mandril to send mails

Mandrill is a transactional email service provided by Mailchimp. To allow IPs from Mandrill to send emails, you'll need to add their IP addresses to your email server's whitelist or allowlist. Here are the steps:

Method 1: Whitelist Mandrill's IP addresses

  1. Go to your email server's settings or configuration file (e.g., Postfix, Sendmail, or Exim).
  2. Look for the section related to whitelisting or allowlisting IP addresses.
  3. Add the following IP addresses to the whitelist:
    • 64.233.162.0/24 (Mandrill's primary IP range)
    • 64.233.163.0/24 (Mandrill's secondary IP range)
    • 64.233.164.0/24 (Mandrill's tertiary IP range)
  4. Save the changes to your email server's configuration file.

Method 2: Use a DNS-based solution (e.g., SPF, DKIM, or DMARC)

  1. Set up a Sender Policy Framework (SPF) record for your domain, which specifies the IP addresses authorized to send emails on behalf of your domain.
  2. Add the Mandrill IP addresses to your SPF record. You can do this by adding the following TXT record to your domain's DNS settings:
    v=spf1 a mx ip4:64.233.162.0/24 ip4:64.233.163.0/24 ip4:64.233.164.0/24 -all

    This will allow Mandrill to send emails on behalf of your domain.

Method 3: Use a Mail Transfer Agent (MTA) like Postfix

  1. If you're using Postfix as your MTA, you can add the Mandrill IP addresses to the mynetworks parameter in your Postfix configuration file (usually /etc/postfix/main.cf).
  2. Add the following lines to the file:
    mynetworks = 127.0.0.0/8 [::1]/128 64.233.162.0/24 64.233.163.0/24 64.233.164.0/24

    This will allow emails from Mandrill to be relayed through your Postfix server.

After implementing one of these methods, you should be able to receive emails from Mandrill without any issues. If you're still experiencing problems, you may want to check your email server's logs for any errors or issues related to the Mandrill IP addresses.