Can fail2ban on privately networked droplet use exim on other droplet

Posted June 16, 2017 2.8k views
NginxEmailUbuntu 16.04

Using Exim on Droplet 1 with FQDN to send myself rootkit hunter and fail2ban updates via gmail SMPT.

I would like to run fail2ban on a droplet 2 privately networked to droplet 1.

Droplet 2 has SRV record

all above works.

Can I configure fail2ban on Droplet 2 to use EXIM on Droplet 1?

thanks to all.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @jbdough

Yes, you can setup Exim on Droplet2, and configure it to relay to Droplet1. So more or less the same as you’ve done with the Gmail SMTP on Droplet1, but instead of relaying directly to Gmail on Droplet2, you would go through Droplet1.

I would probably recommend setting Exim on Droplet2 to go directly to Gmail instead of going through Droplet1. Meaning use the same configuration on Droplet1 and Droplet2.

  • thank you @hansen
    I wasn’t sure a sub domain qualified or would be included but apparently my test email proves Example SPF Record
    “a Authorizes the host(s) identified in the domain’s A record(s) to send e-mail”
    I now also agree directly to gmail -

    • @jbdough
      Well, since you’re relaying to Gmail’s SMTP, then it’s actually Gmail who is sending the mail to the receiver - so in this case in the SPF record is what clears you.