Monitor MX records

When a domain moves to an external mail provider it's important to de-activate or remove the mail domain from ispconfig. When forgotten this can lead to mails not being delivered.

I've written a perl script to check this in the past and now ported that to ispconfig.

It resolves the server name and checks that the MX record for a mail_domain matches one of those IP's. Extra IP's can be added via $mail_config['additional_smtp_ips']

On one of my systems I use an extra IP for incomming smtp, so there I had to override the server hostname. There I've put in a `$mail_config['hostname'] = '...'; line in onRunJob() for now. I don't think we have a field for that and it's probably not worth creating it for just me. But I'm open to suggestions.

TODO

  • String updates?
  • Maybe some layout?
  • UI for $mail_config['additional_smtp_ips'] and $mail_config['additional_smtp_hostnames']?
  • Maybe remove the $app->log warning lines as it might a bit redundant
  • translation files

Anyway, feedback welcome.

Edited by Helmo