Django automatic emails not send after migrating from custom server to virtualmin

On a server, i had got a django project that send automatic emails via smtp, here is the configuration that works for my old server

EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend’
DEFAULT_FROM_EMAIL = ‘Auto-resultat mail automatique

I migrated the project on a new server with virtualmin and now the mails doesn’t work

I don’t understand what’s the difference between my old postfix configuration and the virtualmin postfix configuration.

The server is a deebian Jessie The django project version is 1.9 And the virtualmin version is the last one

Here is the error:

SMTPServerDisconnected at /contact

Connection unexpectedly closed

Request Method: POST
Request URL:
Django Version: 1.9.6
Exception Type: SMTPServerDisconnected
Exception Value:

Connection unexpectedly closed

Exception Location: /usr/lib/python3.4/ in getreply, line 376
Python Executable: /usr/bin/python3
Python Version: 3.4.2
Python Path:


Server time: lun, 17 Avr 2017 18:01:22 +0000

Thank you for any response / help.

Here is the mx record:

mx priority 10

Thank you for any help

does somebody know the smtp config for postfix?