Sponsored Content
Top Forums Shell Programming and Scripting Stop sending mail after certain number of mail Post 302466295 by Phuti on Tuesday 26th of October 2010 05:58:23 AM
Old 10-26-2010
Stop sending mail after certain number of mail

Hi guys...

I am busy writing a script to notify me via an mail if my application is down. I have done that.

Now I want this script to stop sending mails after five mails were sent but the script should keep on checking the application.

When the application is up again that count should be cleared.

Please help!!!!!!!!!!!!!!!!!!!!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sending a mail to a mail client

Hi everyone! I'm trying to create a database monitoring script that reads an alert file and sends an error message if it can 'grep' a particular string. Is there a way to send this message to a mail client using SMTP? Even better, is there any place on this site that has these kinds of... (5 Replies)
Discussion started by: solaris73
5 Replies

2. UNIX for Dummies Questions & Answers

Sending Mail

Please help me out i want to know how to send email from unix machine to any email-id. mail to be sent is web based mail. (1 Reply)
Discussion started by: parmeet
1 Replies

3. Shell Programming and Scripting

Mail sending

Dear all, how can i send mail using mailx or mail command?do i need to configure anything for sending mail?please help me.Its urgent. the version i use is Linux TDM 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux Thanks Regards, Pankaj (15 Replies)
Discussion started by: panknil
15 Replies

4. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

5. UNIX for Dummies Questions & Answers

sending mail

i want to send an email from the unix machine to the windows machine. now windows dont have any specified folder for the mail. mail has to be sent to the email-id like abc@xyz.com unix machine itself can not directly send mail. it has to be transferred via mail server. (11 Replies)
Discussion started by: parmeet
11 Replies

6. Shell Programming and Scripting

Sending mail

Hi there, How can I send the automated log file, daily at 7 am to the respective mail . Thanks in Advance, Neha (2 Replies)
Discussion started by: NehaKrish
2 Replies

7. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

8. Shell Programming and Scripting

Sending Mail

Hi All, I have a script that looks like this: *********** #!/bin/sh -x cd /u01/app/oracle/diag/rdbms/spdb/spdb/trace cat alert_spdb.log|grep Archiver >/dev/null if ; then mailx -s "Archiver message in Alert log" user@email.com fi ************ Im using the -x option to see any... (1 Reply)
Discussion started by: oradba888
1 Replies

9. Red Hat

Problems sending mail: Difference between Mail and Mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL) ... (1 Reply)
Discussion started by: RedSpyder
1 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
DDTC.1(1)						User Contributed Perl Documentation						 DDTC.1(1)

NAME
ddtc - ddts client tool to help translators and reviewers. SYNOPSIS
ddtc [OPTIONS] COMMAND [ARGUMENTS] DESCRIPTION
This script helps both translators and reviewers with parsing mails from the ddts, splitting them into individual package files, sending reviews and patching buggy translations. Before sending back the translation or the review to the server, the script performs a few tests on it and does not sent it if one of the following succeeds: - number of paragraphs is different in the description and its translation, - line length is more than 80 characters, - <tab> character is found, - line starts with a dot (.) followed by other characters. It can also be run in interactive mode if no command is provided. In this case, menus are displayed to prompt the user for commands. COMMANDS
Here is the basic process: - Receiving mail from the ddts Pass the whole mail (i.e. with header and Mime parts) you received from the ddts to the standard input of this script, providing the parse command. If it finds descriptions to translate, it creates a package.todo file for each of them in your Base_dir/tr directory, diffing it with the preceding you have already translated if it exists. If it finds descriptions to review, it creates a package.todo file for each of them in your Base_dir/rev directory. If a preceding review exists, it diffs both and write the diff or set the description as reviewed if there is no difference. If it finds a bug report, it creates a package.bug file in your Base_dir/bug directory, it merges all bug reports to ease corrections. It also tries to detect collisions (see below). - Working with the files - Translating Rename the package.todo file in your Base/tr directory into package.tr. Edit it with your favorite text editor. - Reviewing Rename the package.todo file in your Base_dir/rev directory into package.rev. Do not edit the package file (with no extension), it is used internally by ddtc. Edit it with your favorite text editor. You can add comments that will be sent to the translator by adding lines beginning with `>> ' (your $Comment variable contents followed by a mandatory space character). If a translation has already been reviewed and has been modified the script show you the differences between both versions. Lines beginning with `>>--' correspond to your last version you reviewed, replace this by `+>--' if you think the translator is still wrong. Lines beginning with `>>++' are the new translator's version, replace this by `+>++' if you agree with the translator. Of course, if you still disagree with the translator, you can add comments as indicated above. - Fixing bugs Rename the package.bug file in your Base_dir/bug directory into package.fix. Edit it with your favorite text editor. It contains all changes and comments of the reviewers. Lines beginning with `>>' are comments and doesn't have to be removed. Lines beginning with `>>X+' are suggested corrections, replace this by `+>X+' if you want to validate it. Lines beginning with `>>--' are your last translation, replace this by `+>--' if you don't want to accept suggested corrections. Run the script providing the fix command. It creates a new package.tr file in your Base_dir/tr directory containing the unchanged lines and the lines you have selected. To prevent collisions (reviewers sending review based on a different version than yours), don't send fixed descriptions too often (once a day should be fine), retrieve your mails and parse them just before fixing, send the fixed description as soon as possible afterward. - Sending files back to the ddts Run the script providing the mail command. It sends descriptions from package.tr and package.rev files back to the ddts renaming them into package.sent and closing bugs if neces- sary. - Sending commands to the server Run the script providing the commands you want to be sent to the server. It checks the commands and send them to the server. Available commands: section section name sget package name get package name get number of packages review package name review number of packages getbug list of bug numbers btsclose list of bug numbers notification list of languages listtranslatedpackages status noneveraguide neveraguide noguide guide In each set: sget/get/review/getbug/btsclose/notification, noneveraguide/neveraguide and noguide/guide, only the first found command is used. The script automatically adds language, encoding and mail address (Mail_in) if requested, noguide is default. Due to server limitation, to avoid risk of deny of service attack, you cannot receive for more than 9 new documents at the same time. The script does not check for this, but the server will. For sget, get, review, status and listtranslatedpackages you have either to define the $Language variable in you .ddtcrc configuration file, or to provide a language extension via the --lang or -l option. - Cleaning directories Run the script providing the clean command. It removes unnecessary files in ddtc directories but temporary one as this directory should be a system wide temporary directory cleaned via system scheduled threads, but for debugging reason. - Getting statistics about my work Run the script providing the stats command. It prints figures based on file counts, it may not be accurate if directory cleaning has not been made before. OPTIONS
Verbosity level: -q, --quiet quiet mode -v verbose, start at level $Debug + 1, add more for more verbosity (see below) --verbose n set verbosity level to n (see below) cc mails to one-self: -s, --mail-self send mails also to oneself -n, --nomail-self don't send mails to oneself other: -l, --lang language extension to use when asking for new documents to translate or to review --ddtc-bug send review in special format. Ask your language coordinator before using this option. --noddtc-bug send review in standard format. -V, --version print version and exit -h, --help print usage and exit Verbosity Level 0 quiet only warnings and errors 1 normal package names, reviewer/translator names and bugs numbers 2 reserved for internal use 3 debug normal names of subroutines 4 debug verbose names and short arguments of subroutines 5 debug very verbose names, arguments and return values of subroutines 9 debug don't send mails same as 5 but send mails to oneself instead of ddts level 5 and 9 are really verbose, so you should direct the output to a file. SEE ALSO
ddtcrc(5). http://ddtp.debian.org/ddtp-text/misc/ddts-faq.txt. http://ddtp.debian.org/ddtp-text/guides/guide.txt. http://ddtp.debian.org/ddtp-text/guides/review.txt. AUTHOR
Nicolas Bertolissio <bertol@debian.org> perl v5.8.4 2004-06-18 DDTC.1(1)
All times are GMT -4. The time now is 11:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy