I have a problem with reading the last line of file in Linux Ubuntu. I have a file named auth.log and I’m trying to read it last line after new line was added (after file was modified). I know i need to use tail -1 /var/log/auth.log to get last line but I don’t know how to check the file every
Tag: email
Shell Script : Send html formatted email while inside an array
I am trying to send html formatted email via shell script while reading a tab separated text file in array and need some help. I can see there were multiple similar question on forum and I also have multiple working scripts which can send html emails but I am not able to fit that code when I am inside an
Send email with html body and some attachment with sendmail
Follwing this https://stackoverflow.com/a/11725308/1507546, I could send an email with one attachment. However the body is always empty. Why is my function sending emails with empty body and how to fix it? Answer I figured it out after playing with the headers, this worked for me.
DKIM key not valid – Bad RSA signature
I have setup DKIM on a Ubuntu 14.04 machine using opendkim and postfix. I generated the RSA keypair and updated the TXT record. When testing the settings at any DKIM tester like www.mail-tester.com or www.dkimvalidator.com, I get errors like “result = fail, bad RSA signature”. Here is an example mail (info from dkimvalidator.com). I substituted the real domain with mail.example.com.
Email based on value of report
I’m looking to grep a numeric value from a tripwire report, and if the value is greater than 0, send an email. The script so far looks like this: Not sure how to grab the value and set it as a variable or if there’s a way to include it in the if statement itself. Answer First count the entries:
emailing diff output between two files only if there is a difference
How can I email the output between file1 and file2 but only if there is a difference? Lets say I’m using a shell script. Answer Use the || concatenation. More info here
Linux – read emails and run script from gmail relay
I’m using Ubuntu and set postfix up to use gmail as a relay to send mail following this guide. I can send emails fine but I would like to receive emails and run a script like this. Is it possible to receive emails from my relay and then run a bash script? Answer We figured it out using fetchmail to
Bash : Configuring email-provider for bash-script
I am working on writing a script to run on our Debian server(Debian 3.2.68-1+deb7u5 x86_64 GNU/Linux), which will monitor a specific port we have and when there is no process running on that port, or that port is available, then I will have to send out an email. I intend to run the script every 15 minutes and then send
Mail notifications through Qt on Linux
I want to write a program which would show a pop up if a new mail arrives through Gmail. What library/api am I supposed to use get notifications from Gmail pro-grammatically? Answer You can treat GMail as an IMAP server and work with it like that. You’ll want a C++ IMAP library, there’s quite a few out there but I’d
Ubuntu: Sendmail exited with error 70 [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question