Only invitation emails are not sent, but other emails like notificaiton work well

Summary
I just deployed the Mattermost (MM) and start servicing. When I used MM on 80 port, invitation email works well. But it does not work after using SSL 443 port, I think…(Just my guess, this is a only changing point there.) Other emails like notification works well so far. And invitaion link works well too. Does anyone meet the same situation? I use:

  • Mattermost Version: 7.9.1 (Installed with tarball, AMD64 on AWS EC2, SSL w/ Let’s Encrypted)
  • Database Schema Version: 104
  • Database: mysql

Steps to reproduce

  1. Install with tarball and follow the official instruction. w/ MySQL
  2. i18n for Japanese especially text searching for Japanese sentence toward MySQL.
  3. Install Postfix and deploy for send only mail server.
  4. Configure SMTP server.
  5. Start MM and create the users and admin, and invite users via email. (It works well at this time.)
  6. Change to use SSL w/ let’s encrypted.
  7. Invite the user via email again. The UI says the invitation mail has sent, but the user does not recieve any mails. There are no error logs in the MM log files.

Expected behavior
The new user has received the invitation mail.

Observed behavior
There are no error UIs / logs.

Configuraiton file

{
  "EmailSettings": {
        "EnableSignUpWithEmail": true,
        "EnableSignInWithEmail": false,
        "EnableSignInWithUsername": true,
        "SendEmailNotifications": true,
        "UseChannelInEmailNotifications": false,
        "RequireEmailVerification": false,
        "FeedbackName": "No-Reply",
        "FeedbackEmail": "noreply@mm.domain.com",
        "ReplyToAddress": "mm@domain.com",
        "FeedbackOrganization": "mm@domain.com",
        "EnableSMTPAuth": false,
        "SMTPUsername": "AXXXXXXXXXXXXX6",
        "SMTPPassword": "PAPPAPAPPPAPPAPPAWWWAAARRRDD",
        "SMTPServer": "localhost",
        "SMTPPort": "25",
        "SMTPServerTimeout": 10,
        "ConnectionSecurity": "",
        "SendPushNotifications": true,
        "PushNotificationServer": "https://push-test.mattermost.com",
        "PushNotificationContents": "full",
        "PushNotificationBuffer": 1000,
        "EnableEmailBatching": false,
        "EmailBatchingBufferSize": 256,
        "EmailBatchingInterval": 30,
        "EnablePreviewModeBanner": false,
        "SkipServerCertificateVerification": false,
        "EmailNotificationContentsType": "full",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7",
        "EnableInactivityEmail": true
    },

"ServiceSettings": {
        "SiteURL": "https://mm.domain.com",
        "WebsocketURL": "",
        "LicenseFileLocation": "",
        "ListenAddress": ":443",
        "ConnectionSecurity": "TLS",
        "TLSCertFile": "",
        "TLSKeyFile": "",
        "TLSMinVer": "1.2",
        "TLSStrictTransport": false,
        "TLSStrictTransportMaxAge": 63072000,
        "TLSOverwriteCiphers": [],
        "UseLetsEncrypt": true,
        "LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
        "Forward80To443": true,
        "TrustedProxyIPHeader": [],
        "ReadTimeout": 300,
        "WriteTimeout": 300,
        "IdleTimeout": 60,
        "MaximumLoginAttempts": 10,
        "GoroutineHealthThreshold": -1,
        "EnableOAuthServiceProvider": true,
        "EnableIncomingWebhooks": true,
        "EnableOutgoingWebhooks": true,
        "EnableCommands": true,
        "EnablePostUsernameOverride": false,
        "EnablePostIconOverride": false,
        "GoogleDeveloperKey": "",
        "EnableLinkPreviews": true,
        "EnablePermalinkPreviews": true,
        "RestrictLinkPreviews": "",
        "EnableTesting": false,
        "EnableDeveloper": false,
        "DeveloperFlags": "",
        "EnableClientPerformanceDebugging": false,
        "EnableOpenTracing": false,
        "EnableSecurityFixAlert": true,
        "EnableInsecureOutgoingConnections": false,
        "AllowedUntrustedInternalConnections": "",
        "EnableMultifactorAuthentication": false,
        "EnforceMultifactorAuthentication": false,
        "EnableUserAccessTokens": false,
        "AllowCorsFrom": "",
        "CorsExposedHeaders": "",
        "CorsAllowCredentials": false,
        "CorsDebug": false,
        "AllowCookiesForSubdomains": false,
        "ExtendSessionLengthWithActivity": true,
        "SessionLengthWebInDays": 30,
        "SessionLengthWebInHours": 720,
        "SessionLengthMobileInDays": 30,
        "SessionLengthMobileInHours": 720,
        "SessionLengthSSOInDays": 30,
        "SessionLengthSSOInHours": 720,
        "SessionCacheInMinutes": 10,
        "SessionIdleTimeoutInMinutes": 43200,
        "WebsocketSecurePort": 443,
        "WebsocketPort": 80,
        "WebserverMode": "gzip",
        "EnableGifPicker": true,
        "GfycatAPIKey": "TheKey",
        "GfycatAPISecret": "Secret",
        "EnableCustomEmoji": true,
        "EnableEmojiPicker": true,
        "PostEditTimeLimit": -1,
        "TimeBetweenUserTypingUpdatesMilliseconds": 5000,
        "EnablePostSearch": true,
        "EnableFileSearch": true,
        "MinimumHashtagLength": 3,
        "EnableUserTypingMessages": true,
        "EnableChannelViewedMessages": true,
        "EnableUserStatuses": true,
        "ExperimentalEnableAuthenticationTransfer": true,
        "ClusterLogTimeoutMilliseconds": 2000,
        "EnablePreviewFeatures": true,
        "EnableTutorial": true,
        "EnableOnboardingFlow": true,
        "ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
        "ExperimentalGroupUnreadChannels": "disabled",
        "EnableAPITeamDeletion": false,
        "EnableAPITriggerAdminNotifications": false,
        "EnableAPIUserDeletion": false,
        "ExperimentalEnableHardenedMode": false,
        "ExperimentalStrictCSRFEnforcement": false,
        "EnableEmailInvitations": true,
        "DisableBotsWhenOwnerIsDeactivated": true,
        "EnableBotAccountCreation": false,
        "EnableSVGs": false,
        "EnableLatex": false,
        "EnableInlineLatex": true,
        "PostPriority": true,
        "EnableAPIChannelDeletion": false,
        "EnableLocalMode": false,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
        "EnableAWSMetering": false,
        "SplitKey": "",
        "FeatureFlagSyncIntervalSeconds": 30,
        "DebugSplit": false,
        "ThreadAutoFollow": true,
        "CollapsedThreads": "always_on",
        "ManagedResourcePaths": "",
        "EnableCustomGroups": true,
        "SelfHostedPurchase": true,
        "AllowSyncedDrafts": true
    }
}

Hi @daisuke_matsuoh and welcome to the Mattermost forums!

This is usually happening when the URL you access mattermost with differs from the configured SiteURL. In your config.json, the SiteURL is set to https://mm.domain.com which is the correct value for the TLS setting, so it should work with this configuration.
Are you trying to invite people using the desktop app or the browser?
Can you see a connection attempt from Mattermost in your postfix logs?

1 Like

Hello @agriesser,

Thank you so much for your reply. Sorry, I just made a simple mistake… Simply, I did not see the Postfix log well, and the configuration for the SPF was wrong. I tested the invitation mail with Google/iCloud account, which caused errors because of t he SPF setting and I checked other notification mails with differenct mail address.

Anyway, thanks for your great support! I can notice my fault…

Daisuke

Alright, no problem - glad to hear the problem is solved now :slight_smile: