[GH-ISSUE #394] Emails have no newlines #323

Closed
opened 2026-02-27 02:00:51 +03:00 by kerem · 2 comments
Owner

Originally created by @athairus on GitHub (May 19, 2015).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/394

I am running this script on Ubuntu 14.04 LTS and I have it set up to send message to my GMail account. The emails sent do not have newlines, the text is all pushed together, like this:

======================================== tf2-server details ======================================== Service: tf2-server Server: Team Fortress 2 Game: Team Fortress 2 Failure reason: tf2-server process not running Action Taken: tf2-server has been restarted ======================================== Server details ======================================== Date: Mon May 18 00:10:04 EDT 2015 Distro: Ubuntu 14.04.2 LTS Arch: x86_64 Kernel: 3.13.0-52-generic Hostname: ===SCRUBBED=== Uptime: 2d, 0h, 49m Avg Load0.17, 0.23, 0.23 ======================================== Logs ======================================== Script log =================== [93mDistro Details [34mDistro:     [0mUbuntu 14.04.2 LTS [34mArch:       [0mx86_64 [34mKernel:     [0m3.13.0-52-generic [34mHostname:   [0m===SCRUBBED=== [34mtmux:       [0mtmux 1.8 [34mGLIBC:      [0m2.19 [93mPerformance [34mUptime:     [0m2d, 0h, 49m [34mAvg Load:   [0m0.17, 0.23, 0.23 [34mMem:        [34mtotal   used   free [34mPhysical:   [0m994M    552M   441M [34mSwap:       [0m0B      0B     0B [93mDisk Usage [34mDisk available:   [0m8.4G [34mServerfiles:      [0m14G [92mTeam Fortress 2 Server Details [34mServer name:     [0mTeam Fortress 2 [34mServer IP:       [0m===SCRUBBED===:27015 [34mRCON password:   [0m===SCRUBBED=== [34mStatus:          [0;31mOFFLINE [34mService name:   [0mtf2-server [34mUser:           [0mtf2server [34mLocation:       [0m/home/tf2server [34mConfig file:    [0m/home/tf2server/serverfiles/tf/cfg/tf2-server.cfg [92mBackups No Backups created [92mCommand-line Parameters ./srcds_run -game tf -maxplayers 24 -strictportbind -ip ===SCRUBBED=== -port 27015 +clientport 27005 +exec athairus/sourcetv.cfg +sv_pure 0 +tv_port 27020 +servercfgfile tf2-server.cfg -replay +map pl_badwater [92mPorts Change ports by editing the command-line parameters in tf2server. Useful port diagnostic command: netstat -atunp | grep srcds_linux DESCRIPTION  DIRECTION  PORT   PROTOCOL > Game/RCON  INBOUND    27015  tcp/udp > SourceTV   INBOUND    27020  udp < Client     OUTBOUND   27005  udp [34mStatus:  [0;31mOFFLINE May 18 00:09:59 tf2-server: Update: Checking for update: Server logs May 18 00:10:01 tf2-server: Update: Checking for update: SteamCMD May 18 00:10:01 tf2-server: Monitor: Team Fortress 2 May 18 00:10:02 tf2-server: Monitor: Checking session: CHECKING May 18 00:10:03 tf2-server: Monitor: Checking session: FAIL May 18 00:10:04 tf2-server: Update: Success! Checking for update: SteamCMD Console log ==================== Server log ==================== L 05/18/2015 - 00:03:33: server_cvar: "mp_autoteambalance" "0" L 05/18/2015 - 00:03:33: Log file closed. *   Testing file publisher... L 05/18/2015 - 00:03:33: *      Fileserver type:    Local Web server L 05/18/2015 - 00:03:33: *      Path:               /var/www/tf/replays L 05/18/2015 - 00:03:33: *      Validating...................................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: * L 05/18/2015 - 00:03:33: * L 05/18/2015 - 00:03:33: *      Source file exists?..........................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: *      Checking fileserver path.....................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: *      Renaming to target...........................L 05/18/2015 - 00:03:33: O L 05/18/2015 - 00:06:49: Log file started (file "logs/L0518002.log") (game "/home/tf2server/serverfiles/tf") (version "2734753") L 05/18/2015 - 00:06:49: server_cvar: "mp_autoteambalance" "0" L 05/18/2015 - 00:06:49: Log file closed. L 05/18/2015 - 00:06:50: * L 05/18/2015 - 00:06:50: *      Source file exists?..........................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: *      Checking fileserver path.....................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: *      Renaming to target...........................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: * *   Testing fileserver delete... L 05/18/2015 - 00:06:50: *      File exists?.................................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: *   

Looks slightly nicer in this issue than it does in GMail, as GMail just does word wrapping...

Also, it'd be nice if the text color escape codes were either scrubbed or even applied as HTML attributes or something. An all-black background in the email to make it look like the terminal would be sweet!

Originally created by @athairus on GitHub (May 19, 2015). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/394 I am running this script on Ubuntu 14.04 LTS and I have it set up to send message to my GMail account. The emails sent do not have newlines, the text is all pushed together, like this: ``` ======================================== tf2-server details ======================================== Service: tf2-server Server: Team Fortress 2 Game: Team Fortress 2 Failure reason: tf2-server process not running Action Taken: tf2-server has been restarted ======================================== Server details ======================================== Date: Mon May 18 00:10:04 EDT 2015 Distro: Ubuntu 14.04.2 LTS Arch: x86_64 Kernel: 3.13.0-52-generic Hostname: ===SCRUBBED=== Uptime: 2d, 0h, 49m Avg Load0.17, 0.23, 0.23 ======================================== Logs ======================================== Script log =================== [93mDistro Details [34mDistro: [0mUbuntu 14.04.2 LTS [34mArch: [0mx86_64 [34mKernel: [0m3.13.0-52-generic [34mHostname: [0m===SCRUBBED=== [34mtmux: [0mtmux 1.8 [34mGLIBC: [0m2.19 [93mPerformance [34mUptime: [0m2d, 0h, 49m [34mAvg Load: [0m0.17, 0.23, 0.23 [34mMem: [34mtotal used free [34mPhysical: [0m994M 552M 441M [34mSwap: [0m0B 0B 0B [93mDisk Usage [34mDisk available: [0m8.4G [34mServerfiles: [0m14G [92mTeam Fortress 2 Server Details [34mServer name: [0mTeam Fortress 2 [34mServer IP: [0m===SCRUBBED===:27015 [34mRCON password: [0m===SCRUBBED=== [34mStatus: [0;31mOFFLINE [34mService name: [0mtf2-server [34mUser: [0mtf2server [34mLocation: [0m/home/tf2server [34mConfig file: [0m/home/tf2server/serverfiles/tf/cfg/tf2-server.cfg [92mBackups No Backups created [92mCommand-line Parameters ./srcds_run -game tf -maxplayers 24 -strictportbind -ip ===SCRUBBED=== -port 27015 +clientport 27005 +exec athairus/sourcetv.cfg +sv_pure 0 +tv_port 27020 +servercfgfile tf2-server.cfg -replay +map pl_badwater [92mPorts Change ports by editing the command-line parameters in tf2server. Useful port diagnostic command: netstat -atunp | grep srcds_linux DESCRIPTION DIRECTION PORT PROTOCOL > Game/RCON INBOUND 27015 tcp/udp > SourceTV INBOUND 27020 udp < Client OUTBOUND 27005 udp [34mStatus: [0;31mOFFLINE May 18 00:09:59 tf2-server: Update: Checking for update: Server logs May 18 00:10:01 tf2-server: Update: Checking for update: SteamCMD May 18 00:10:01 tf2-server: Monitor: Team Fortress 2 May 18 00:10:02 tf2-server: Monitor: Checking session: CHECKING May 18 00:10:03 tf2-server: Monitor: Checking session: FAIL May 18 00:10:04 tf2-server: Update: Success! Checking for update: SteamCMD Console log ==================== Server log ==================== L 05/18/2015 - 00:03:33: server_cvar: "mp_autoteambalance" "0" L 05/18/2015 - 00:03:33: Log file closed. * Testing file publisher... L 05/18/2015 - 00:03:33: * Fileserver type: Local Web server L 05/18/2015 - 00:03:33: * Path: /var/www/tf/replays L 05/18/2015 - 00:03:33: * Validating...................................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: * L 05/18/2015 - 00:03:33: * L 05/18/2015 - 00:03:33: * Source file exists?..........................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: * Checking fileserver path.....................L 05/18/2015 - 00:03:33: OK L 05/18/2015 - 00:03:33: * Renaming to target...........................L 05/18/2015 - 00:03:33: O L 05/18/2015 - 00:06:49: Log file started (file "logs/L0518002.log") (game "/home/tf2server/serverfiles/tf") (version "2734753") L 05/18/2015 - 00:06:49: server_cvar: "mp_autoteambalance" "0" L 05/18/2015 - 00:06:49: Log file closed. L 05/18/2015 - 00:06:50: * L 05/18/2015 - 00:06:50: * Source file exists?..........................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: * Checking fileserver path.....................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: * Renaming to target...........................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: * * Testing fileserver delete... L 05/18/2015 - 00:06:50: * File exists?.................................L 05/18/2015 - 00:06:50: OK L 05/18/2015 - 00:06:50: * ``` Looks slightly nicer in this issue than it does in GMail, as GMail just does word wrapping... Also, it'd be nice if the text color escape codes were either scrubbed or even applied as HTML attributes or something. An all-black background in the email to make it look like the terminal would be sweet!
kerem 2026-02-27 02:00:51 +03:00
  • closed this issue
  • added the
    type: bug
    label
Author
Owner

@dgibbs64 commented on GitHub (May 14, 2016):

Merging with issue #566

<!-- gh-comment-id:219235340 --> @dgibbs64 commented on GitHub (May 14, 2016): Merging with issue #566
Author
Owner

@lock[bot] commented on GitHub (Jul 19, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406255256 --> @lock[bot] commented on GitHub (Jul 19, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#323
No description provided.