[Sysadmin Pro] SMTP Email - Can I change the "FROM" name?

So, a client of mine has been complaining about not receiving emails from the phone server. After some troubleshooting, they moved their email to Office365 without my knowledge. The phone server is hosted behind Comcast ISP but the domain does not point to our building. I guess Microsoft blocks emails originating from Comcast IPs.

I changed to SMTP using Gmail which is working, but how can I change the sender FROM name so it doesn’t appear as just the email address?

You can’t, with Gmail.

A relay like SendGrid or Mailgun would allow you to do it. There’s also a way to do direct mailing to O365: How to set up a multifunction device or application to send email using Microsoft 365 or Office 365 | Microsoft Docs

I saw that article, but from the scenario details:

Choose this option when:

  • Your environment has SMTP AUTH disabled.
  • SMTP client submission (Option 1) is not compatible with your business needs or with your device.
  • You only need to send messages to recipients in your own organization who have mailboxes in Microsoft 365 or Office 365; you don’t need to send email to people outside of your organization.

The last option doesn’t work because this also needs to send mail to other domains. SMTP with O365 isn’t an option because I would then need to have them license another mailbox which is not free.

I will look into a relay… but that seems like it’s adding another level of complication for what should be (and used to be) very simple…

You’ll hardly find anything more complicated[*] these days than sending e-mail free and clear without it getting put into the Junk Mail folder, if it is even delivered at all. Working through a known, large, reputable provider is the way to ensure delivery.

Undoubtedly someone will chime in and say “it works fine for me!” but the days are numbered. I haven’t done direct e-mail from a PBX for a very long time.


* SPF, DKIM, DMARC, reverse DNS, being on a non-residential IP, being on a provider that allows port 25, being on an IP that has never before sent spam or else you will be on a dozen blocklists and have to beg your way off them…

2 Likes

OK, I went ahead and got Sendgrid configured quickly with Postfix. It’s working, but I’m still stuck on the FROM being the email address and not any sort of friendly name.

For voicemail: Voicemail Admin - Settings - Email Config - Email From String

OK, so it turns out, test mails from the Sysadmin Debug page work fine (but the FROM is still nothing more than an email address), but emails from the Voicemail system are NOT working. In any case, the “Email From String” was already set to a friendly name. The “Server Email” is blank.

This is from Debug test:

Jan  4 12:46:36 trc-pbx postfix/pickup[1641]: 60A0F8281: uid=995 from=<asterisk>
Jan  4 12:46:36 trc-pbx postfix/cleanup[1962]: 60A0F8281: message-id=<[email protected]>
Jan  4 12:46:36 trc-pbx postfix/qmgr[1642]: 60A0F8281: from=<[email protected]>, size=405, nrcpt=1 (queue active)
Jan  4 12:46:36 trc-pbx postfix/smtp[1964]: 60A0F8281: to=<[email protected]>, relay=smtp.sendgrid.net[54.146.218.5]:587, delay=0.42, delays=0.04/0.04/0.3/0.05, dsn=2.0.0, status=sent (250 Ok: queued as gXp3y9YLQ9eFFRGUXbjjIg)
Jan  4 12:46:36 trc-pbx postfix/qmgr[1642]: 60A0F8281: removed

This is from the Voicemail system:

Jan  4 12:48:26 trc-pbx postfix/pickup[1641]: C7F928281: uid=995 from=<asterisk>
Jan  4 12:48:26 trc-pbx postfix/cleanup[2215]: C7F928281: message-id=<[email protected]>
Jan  4 12:48:26 trc-pbx postfix/qmgr[1642]: C7F928281: from=<[email protected]>, size=78338, nrcpt=1 (queue active)
Jan  4 12:48:27 trc-pbx postfix/smtp[2218]: C7F928281: to=<[email protected]>, relay=smtp.sendgrid.net[167.89.115.116]:587, delay=0.33, delays=0.04/0.02/0.18/0.08, dsn=5.0.0, status=bounced (host smtp.sendgrid.net[167.89.115.116] said: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements (in reply to end of DATA command))

First of all, do I need to worry about getting that [email protected] changed to the actual email I want to appear (which would be [email protected])? I’m not sure if that’s the culprit. Should the log be showing the replacements performed by the postfix generics?

This is my generics file:

root trcadm[email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
asterisk trcadmin
asterisk [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]

This is the custom portion of the main.cf:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587
smtp_generic_maps = hash:/etc/postfix/generic

Still stumped on why emails from the Debug page work but the actual Voicemail emails don’t work… and from the Debug page, I can’t get the From set to a friendly name, if that’s possible… Since the Voicemail emails aren’t working I don’t know if the friendly name is working there.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.