Skip to main content

All Questions

Tagged with
-1 votes
1 answer
499 views

Shell script to Send mail if Linux Server is down

I want to create a shell script in Linux to send an email if the Server is down. Let's say I have Server 1 ..... Server 10. I want to ping all Servers from Server 1 and send a mail to me if the server ...
rainbow kreations's user avatar
1 vote
1 answer
2k views

Why I don't need to specify SMTP server in mail?

I know you need to specify your email address, password, and SMTP server when sending emails using command line tools such as sendmail, sendEmail, etc. This is also true in other languages such as ...
JackeyOL's user avatar
  • 215
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 . ...
ayNONE's user avatar
  • 41
2 votes
2 answers
1k views

Find a file and send email

I want to find a file for every 60sec. If the file exists between the time range then an email should trigger. i tried below but not working. Apprecite your help ! THanks Advance #!/bin/sh cd /my/...
phani437's user avatar
3 votes
2 answers
208 views

Hide "You have old mail" message when logging into shell?

I have a mail system set up on my server (Postfix + Dovecot) that I use for personal and sys-admin email. Every time I login via shell (for all of my accounts), the message "You have old mail." is ...
ATLief's user avatar
  • 318
2 votes
1 answer
312 views

Capture of logs in HTML and send via email?

I have created a script to shutdown Oracle database but unable to send the output of shutdown while the database shutdown completes successfully. I only receive email of the echo part but not the ...
James's user avatar
  • 25
1 vote
1 answer
2k views

mysql query formatting in email

I have the following query in shell script: mysql -e "use hive; select DISTINCT TAB.DB_NAME, TAB.TABLE_NAME from TABLE_PARAMS INNER JOIN TAB ON TABLE_PARAMS.TBL_ID = TAB.TBL_ID where PARAM_KEY = '...
user3508766's user avatar
0 votes
1 answer
2k views

Send mail on login for a host

Is there any way to send a custom e-mail to custom recipients if any user tries to login or login to my system (RHEL6.7) ??
Rebbeca's user avatar
  • 87
0 votes
1 answer
886 views

Is it possible to track mails sent?

I am sending mails to many persons through a shell script. I just want to track the mail and collect some information like time difference between sent mail and acknowdgement mail and process the data ...
KARTHIKAS's user avatar
1 vote
2 answers
422 views

Mail one liner to check if null before sending [duplicate]

I'm trying to modify a script which emails a user group the contents of a directory. The modification I'm looking for is to check the script below to see if it has valid output before sending. The ...
SomeGuy's user avatar
  • 242
2 votes
0 answers
423 views

find-like tool to search (recursively) in MailDir folders by size, sender, recipient, attachment name regex, etc

I am not looking for a tool like locate, that works by creating an index in the MailDir, or generating other runtime files there; I am searching for real-time, direct search on live MailDirs. The ...
Alex Stragies's user avatar
0 votes
2 answers
77 views

Send Nth line of text to Nth address in the list

Suppose I have a file BOD which contains lines of text and a file ADDR which contains e-mail addresses. How can I send the first line of BOD to the first address in ADDR, the second line of BODIES to ...
Aldebaran's user avatar
5 votes
1 answer
1k views

Can I do a delay delivery in Thunderbird or Evolution

Now we have an option of "Delay Delivery" in Outlook. Can we do something like that in thunderbird/evolution or any other linux client ?
neuron's user avatar
  • 1,976
1 vote
1 answer
3k views

Select latest updated file from directory and send it via email

I want to select latest error(timestamp).log file from some directory and send it via email as attachment. What I am trying is: Filename: abc.sh echo 'An error occured' | mutt -s "Logs" -a '/xx/xx/...
Brinda's user avatar
  • 57
0 votes
2 answers
2k views

Bash script that detects if a file is the correct size

I'm trying to make this bash script dispatch and email when it detects that a certain type of file (files ending in ".gz"), which was last modified 24 hours ago, is below a certain size in a directory,...
Aiden Prohaska's user avatar

15 30 50 per page