בדיקת הגדרת הדואר האלקטרוני לפני התחלת ההתקנה

Hmm. It looks like it’s possible to do an only semi-braindead SMTP test like this:

echo Hello world > /tmp/mail.txt
curl -v  smtp://$DISCOURSE_SMTP_ADDRESS:$DISCOURSE_SMTP_PORT  \
  --mail-from noreply@$DISCOURSE_HOSTNAME \
  --mail-rcpt $(echo $DISCOURSE_DEVELOPER_EMAILS | cut -d ',' -f 1) \
  --user $DISCOURSE_SMTP_USER_NAME:"$DISCOURSE_SMTP_PASSWORD" \
  --upload-file /tmp/mail.txt 

So it should be possible to do such a test. My concern is that it would have a bunch of false positives and false negatives, but maybe printing a warning if it fails could help some people.

Maybe a better idea would be yet another script (discourse-mail-check?) that would do a quick and dirty test like that if you’re having trouble.