All Questions
46
questions
2
votes
1
answer
293
views
How to make a valid backup for Evolution and restore it
Im working with the evolution mail client, and I have been migrating some machines. So in order to do so, the next script is runned:
#!/bin/bash
mkdir -p ~/path_to_backupdir/mail-backup
mkdir -p ~/...
1
vote
2
answers
2k
views
How to get the email of the logged in user when login occurs through SSH keys?
I’m using bash shell and Ubuntu 18.04. I SSH into the server using a fairly standard RSA public-private key set up, where I put my public key in the .ssh/authorized_keys file of the server, entry ...
0
votes
1
answer
359
views
Why does "mail" in a bash script run fine from command line but not when run by launchd?
This on an iMac running Big Sur. (I asked over at AskDifferent, but no one knew the answer.)
This script is set up to run by launchd once a day to get battery data from a NUT (Network UPS Tools) ...
0
votes
1
answer
262
views
Logging script to email
I have a script that scans a log for a list of words, then sends an email with the results. I would like to expand this to do the same for other logs in the same directory but make it a new email with ...
0
votes
1
answer
467
views
How to properly pack regex that contains both double as well as single quotes into a variable and evaluate it in Bash?
This stackoverflow question gives the following regex for RFC5322 compliant e-mail format matching:
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\...
0
votes
1
answer
128
views
Neomutt Uses the Wrong Shell Even After Setting the Shell Variable
None of my aliases are working in neomutt. This prevents me from editing files in my text editor neovim. If I try I get an error sh: 1: nvim not fount indicating that the shell being used here is sh . ...
1
vote
2
answers
821
views
Creating nicknames for command arguments
I would like to use a nickname (foo) for my email address ([email protected]). The goal is to be able to do
echo "This is a test email" | mail -s "Email Title" foo
instead of
echo &...
1
vote
0
answers
337
views
File not attached while send HTML email in Bash
File is not attached while send in HTML email Bash
Below is my sample script ,while executing the script the mail was sent with out an attachment.
Please help.
#!/bin/bash
FOUND_EMAIL_TEXT="This ...
1
vote
0
answers
285
views
Can Mutt be used to access Inbox messages in a bash script?
I've got scripts that collect data on errors and sends them into a ticketing system. If any developments occur regarding an existing ticket, I want to be able to access the email inbox to get the ...
10
votes
2
answers
483
views
Can I customize the "You have new mail" message
I'm trying to modify the You have new mail message that is shown below MOTD when you login via SSH.
My goal is to make that message more visible (bright color would be great) so it gets my attention ...
1
vote
1
answer
34
views
Script that e-mails predefined message to multiple users
I want to create a script that asks the user for his username and check if its valid by verifying the user home directory exists. If the username exists it should send an email to the user from a ...
1
vote
1
answer
2k
views
How to set alarm/alert if my system cpu usage reaches a particular threshold?
I have written a shell scripting for monitoring the system CPU usage and memory usage. I need to know how to send notification to mail that my system reached particular threshold (example:- 90%).
My ...
0
votes
2
answers
5k
views
Bold a text in Bash
I have a sample script here I want to bold the word BOLD in the text and send through email. Tried several ways but not seems to working.
BODY="Hello. I want to BOLD this"
{
echo "From: from@...
0
votes
1
answer
2k
views
Creating bash script for auto-mailfetching and extraction to a specific location
I'm new to bash scripting and I've read tons of manuals for programs like mutt, procmail, ripmime, and such and still have no clue how to this script or even use these programms properly.
If someone ...
0
votes
1
answer
77
views
Implement a script in Solaris when usage in all filesys >90% & send a mail i dont know how to send mail from script
Script in Solaris when usage in all filesystem >90% & send a mail i don't know how to send mail from script
#!/bin/bash
# Outputs alert if filesystem is above 90%
{
for fs in $(df -hk | ...