check postfix deferred mail and send notification script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting check postfix deferred mail and send notification script
# 1  
Old 02-21-2012
check postfix deferred mail and send notification script

Hi Guys,

I have a postfix server which is deferring emails. Now I need to send notification to a specific email address if:

The sender of the deferred email is: abc@example.com
Contains specific subjects: a file (/opt/subjects) contains all the subjects in place

Then need to send a notification to: cba2example.com

Please guys help me to execute this.

Thanks.

MMA
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check file if not found send mail if exit call second script

I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script. I need to check the file is present ="/home/Rvtools/test.csv" if this file not found after the time retry send mail file not found If the file exit run the... (2 Replies)
Discussion started by: ranjancom2000
2 Replies

2. Shell Programming and Scripting

How to write this script:- check output word and send a mail?

Hi Guys, I am not Good at scripting. I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com -bash-3.2$ ps -ef | grep bpbkar root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies

3. Shell Programming and Scripting

Script for sending notification mail

hi all, needed a script to send a notfication mail if the specified folder had the copy of the files that are older than 15 days i.ee for example my folder name is SAi and the files are as follows sai.txt copyofsai.txt copyofcopyofsai.txt hemanth.txt copyofcopyofhemanth.txt... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

4. UNIX for Dummies Questions & Answers

No mail sending - Deferred: 403 4.7.0 TLS handshake failed

Please help! I am in urgent need of assistance. What started out as a small problem with IMAP folders not working seems to have spread. Our mail server, Scalix running on CentOS 5.5 isn't sending out any mail. There are now over 400 emails queued waiting to go out, all of which give the... (0 Replies)
Discussion started by: beckyboo
0 Replies

5. Shell Programming and Scripting

How to read specific line of text from a Script and send email notification

Hi ! I am a newbie and never officially wrote a shell script before. The requirement for this script is : 1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read. 2) If that... (2 Replies)
Discussion started by: atechcorp
2 Replies

6. Solaris

Mail issue solution query- host map: lookup (domain): deferred

Hi all I had a mail issue earlier today where I was not receiving any emails from the servers of one of our clients. The mail queue just showed this: -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- o8S7eSpp020274* 5858 Tue Sep 28 10:42... (0 Replies)
Discussion started by: notreallyhere
0 Replies

7. IP Networking

postfix - reinject mail to postfix from hold queue directory

hi all. Am using smtpd_recipient_restrictions & check_recipient_access in postfix. The hash file looks like this: emailaddress1 HOLD emailaddress2 HOLD The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
Discussion started by: coolatt
0 Replies

8. UNIX for Dummies Questions & Answers

unix script to check if rsh to box and send status mail

rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh` if $rshstatus <>0 then errstatus=1 mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr else if errstatus=0 echo "status to xirsol8dr successful" can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Discussion started by: bpm12
1 Replies

9. Shell Programming and Scripting

shell script needed for mail queue notification

Hi shell experts, I would like to have a shell script running in a redhat server for monitoring the mailqueue status. I have already installed the qmHandle and I am using it to get a status of the mail queue in daily basis. I am executing the qmhandle in the cron. Now I am planning to execute... (10 Replies)
Discussion started by: Nightman
10 Replies

10. Shell Programming and Scripting

how to check my hard disk is below 10%, and then send mail to superuser

how to write bash to superuser, when the disk space dips below 10% of the total by automatically sending an email? It is have any sample for reference (3 Replies)
Discussion started by: foong
3 Replies
Login or Register to Ask a Question
NOTIFY(8C)																NOTIFY(8C)

NAME
notify - HylaFAX user notification script SYNOPSIS
/var/spool/fax/bin/notify qfile why jobtime [ nextTry ] DESCRIPTION
bin/notify is the command script invoked by the facsimile server to notify a user about the status of an outbound job. The default notifi- cation script sends the user electronic mail describing the event or action. The arguments are: qfile the pathname of the job description file. why a string that specifies why the user is being notified; one of: Why Notes Meaning done 1 job was completed successfully failed 12 job was not completed rejected 1 job was rejected for specified reasons requeued 2 job was not completed, but was requeued for retry removed 1 job was deleted from the queue killed 1 job was deleted from the queue timedout 1 job could not be sent before kill time expired format_failed 1 document conversion failed no_formatter 1 the document conversion program was not found poll_rejected 12 a polling request was rejected by the remote side poll_no_document 12 a polling request failed because nothing was available poll_failed 12 a polling request failed for an unknown reason blocked 3 job is blocked by concurrent jobs 1 A final job state 2 A transcript of the failed communication is returned to the sender. 3 No emails are sent for the block state, the job has been neither requeued nor done, but remains waiting in the queue for the ability to be sent. jobtime the total transmission time of a successful job or the connect time of a failed request (passed as a string). nextTry the time (passed as a string) at which the next attempt will be made to complete the job. This parameter is passed only if why is ``requeued''. NOTES
The behavior of notify is intended to be customizable via the etc/FaxNotify script, if present. FaxNotify is sourced after the q-file is parsed and all default values are preset. Useful settings for FaxNotify are: WHY is identical to why mentioned above and can be useful in determining under what conditions various settings should take effect. For example, if [ "$WHY" != "done" ]; then RETURNFILETYPE=pdf; fi This would only set RETURNFILETYPE when the job did not complete successfully. RETURNFILETYPE can be set to ``tif'', ``pdf'', ``ps'', or ``original''. If set, this causes notify to return a copy of the submitted documents to the SENDER address along with the notification message. The ``original'' setting uses the format type that was used in the submis- sion. Multiple values may be specified by separating them with whitespace. In that case a separate attachment is created for each filetype. NOTIFY_FAXMASTER is used to deliver a notification message to TOADDR (which defaults to ``FaxMaster'') that contains technical information about the job. This is useful in allowing the administrator to be aware of any problems before those problems are reported by the users. Possible settings are ``yes'', ``always'', ``no'', ``never'', and ``errors''. If ``errors'' is used then the notification message is only sent to FaxMaster when the job experienced an error. The default is ``no''. The settings of the user in $notify (read from the sendq job file) controls whether the user will get the notification email. If you want to force notification emails, irregardless of the users selection, or force a blocked notification (which is not sent by default), you can set notify="always" which will force the notify script to send the email. FILES
/var/spool/fax spooling area /usr/sbin/sendmail for delivering mail SEE ALSO
faxq(8C), hylafax-server(5F), sendq(5F) May 8, 1996 NOTIFY(8C)