Page 1 of 1

Switch Name in From Header of Messages

Posted: Tue Apr 19, 2016 5:39 pm
by tma
Today someone pulled the wrong cable and so the switch sent a message saying one leg of a LAG was down. Nice feature.

However, please put the name of the switch into the From address (instead of 'root'). Currently the name of the sending switch is appended to the message subject, but that doesn't help if you want to sort or group a collection of messages by origin of messages (we keep all such messages in an Exchange public folder).

Re: Switch Name in From Header of Messages

Posted: Tue Apr 19, 2016 5:40 pm
by sirhc
I alerted Eric to this request

Re: Switch Name in From Header of Messages

Posted: Thu Apr 21, 2016 4:43 pm
by Eric Stern
You can already do this. Under the SMTP configuration you can set the "From Address" field to whatever you desire.

Re: Switch Name in From Header of Messages

Posted: Thu Apr 21, 2016 5:14 pm
by tma
Eric Stern wrote:You can already do this. Under the SMTP configuration you can set the "From Address" field to whatever you desire.


Thanks for the hint. I wasn't sure what the syntax is and so I put a pure mail address there (because the field says "address"), i.e. switchname@domain.tld. That causes the From header to be set to "root" <switchname@domain.tld> in the message and it shows up as (the display name) root in the From column of Outlook, hiding the address part, and so I cannot sort/group on that column.

Are you saying I could add the display name part of an address somehow? How? I tried setting it to "switchname" <switchname@domain.tld> (with and without the quotes and the <>) but the field had a red background always. It seems I can't add anything that is beyond a pure RFC822 address.

Re: Switch Name in From Header of Messages

Posted: Thu Apr 21, 2016 5:25 pm
by tma
Guessing time: If you're using ssmtp, you would use it as ssmtp -F <switchname> -f <fromaddress> ... that would not require a change/addition to the GUI ... presuming everybody would be happy to see "<switchname>" instead of "root".