How to check email with attachment received or not from UNIX shell script?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to check email with attachment received or not from UNIX shell script?
# 1  
Old 04-05-2017
How to check email with attachment received or not from UNIX shell script?

Hello Guys,

Here is the requirement!!

I want to check the mail with attachment received or not through unix scripting.
And send an notification email when mail with attachment already received.

Any thoughts on this is much appreciated!!

Regards,
Harry
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies

2. UNIX for Advanced & Expert Users

Reading the Attachment from UNIX email

Hi - How would you read in the attachment from your unix mail account? The attachment is in BASE64 so I need to isolate those lines so I can convert them. The number of lines varies from a few to a few hundred. To complicate matters, the mail box gets non related emails I want to ignore. The lines... (3 Replies)
Discussion started by: Oliver Burns
3 Replies

3. UNIX for Dummies Questions & Answers

Send email attachment using Operating System Script(UNIX) in Oracle Alerts

Good Day Kindly assist: I am creating an Alert that will notify supervisors of staff members who are due for probation report. I am using Operating System Script(Unix) as source.I have already developed the script. Now the challenge is if there are 3 employee records then the alert... (2 Replies)
Discussion started by: nosi27
2 Replies

4. Shell Programming and Scripting

html format email with attachment in unix

Team, I have the below code, which is working fine and it sends the html report using sendmail command. I want to attach one more file ( which goes as attachment ) in that email. How to achieve it. i tried with uuencode. But no luck :mad: outputFile="/tmp/out.html" ( echo... (2 Replies)
Discussion started by: itkamaraj
2 Replies

5. Shell Programming and Scripting

Check email and download attachment

Hi, I had search the web for a script to download email, but failed to found one. I need a bash or perl script that will check for email originating from an address such as john@rambo.com and download the .zip attachment into a specified folder. Anyone could assist or give me some... (1 Reply)
Discussion started by: mynullvoid
1 Replies

6. Linux

Run PHP script when new email received

I have been looking around for a solution to this, i have been developing for a wile though am very new to CGI, PHP and a lot of the web based tech. I have a web site hosted with a cPanel web host. I am looking to have a script(prefer PHP) to run everytime i get a new email to help@xxx.com.... (16 Replies)
Discussion started by: iKris
16 Replies

7. Shell Programming and Scripting

perl check email script not seeing attachment

The following script does pull the sender and Subject of the email but it is not seeing the attachment name. I know there is an attachment. I line in red SHOULD pull the filename out. this line is in the message: Content-Disposition: attachment; filename="Picture 243.jpg" ... (1 Reply)
Discussion started by: Ikon
1 Replies

8. UNIX for Advanced & Expert Users

Check EOF char in Unix. OR To check file has been received completely from a remote system

Advance Thanks. (1) I would like to know any unix/Linux command to check EOF char in a file. (2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Discussion started by: alexalex1
5 Replies

9. Shell Programming and Scripting

UNIX file attachment in email

Hi, I have a syntax for mail attachment as $EMAIL "Wrapper $wrapper_script_name has failed" " $wrapper_script_name has Failed " $failed_email_address and $EMAIL is as below MSGSub=${1} MSGText=${2} RMAIL=${3} #set LANG='' export LANG='' echo "${MSGSub}" | mailx -s "${MSGText}" ... (1 Reply)
Discussion started by: satgur
1 Replies

10. Shell Programming and Scripting

send email from unix with attachment

Hello All, This is a common question that I found lot of results in the forums. I am trying to use uuencode to attach a file and send email. I have no issues sending email, but not able to attach any files using sendmail. Is uuencode part of sendmail or does 'uuencode' utility need to be... (1 Reply)
Discussion started by: chiru_h
1 Replies
Login or Register to Ask a Question
FAXRCVD(8)						      System Manager's Manual							FAXRCVD(8)

NAME
faxrcvd - HylaFAX notification script for received facsimile SYNOPSIS
/var/spool/hylafax/bin/faxrcvd qfile devid commid error-msg [ callid-1 [ callid-2 [ ... [ callid-n ] ] ] ] DESCRIPTION
bin/faxrcvd is the command script invoked by the facsimile server whenever a facsimile is received. The default script sends electronic mail to the FaxMaster user describing the content of the facsimile and other useful information such as the time spent receiving the docu- ment. The arguments are: qfile the pathname of the received TIFF file relative to the root of the spooling hierarchy. devid the modem device on which the facsimile was received. commid the communication identifier for the inbound call. error-msg an error message that is non-null if an error was encountered during the receive operation. callid the value of various identification indicators from the call NOTES
This script can route facsimile directly to the intended recipient. To do this create a shell script etc/FaxDispatch in the spooling area that sets SENDTO to the receiver's electronic mail address. For example, case "$SENDER" in *1*510*526*1212*) SENDTO=sam;; # Sam's test rig in Berkeley *1*415*390*1212*) SENDTO=raster@asd;; # 7L Xerox room, used for scanning *5107811212) SENDTO=peebles@mti;; # stuff from home esac case "$DEVICE" in ttyS1) SENDTO=john;; # all faxes received on ttyS1 ttyLT0) SENDTO=mary@home;; # all faxes received on ttyLT0 esac case "$CIDNUMBER" in 435*) SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435 5059627777) SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF esac case "$SUBADDR" in 53) SENDTO=FaxMaster;; # without double-notification roger) SENDTO=roger;; # possible text subaddressing esac Note that you must match any embedded white space. The facsimile will be sent as a MIME-encoded PostScript document as default. CALLIDn is equivalent to the nth call identification parameter CIDNAME is equivalent to CALLID2 above. CIDNUMBER is equivalent to CALLID1 above. DEVICE is equivalent to device above. FILETYPE controls the filetype of the image attachment. Current filetype options are ``ps'', ``tif'', and ``pdf''. Multiple values may be specified by separating them with whitespace. In that case a separate attachment is created for each filetype. FROMADDR controls the sender of the received fax notification. It is given as an e-mail address. MSG is equivalent to error-msg above. NOTIFY_FAXMASTER (an underscore ``_'' character is between NOTIFY and FAXMASTER) indicates whether or not the HylaFAX administrator should be noti- fied regarding incoming facsimile. Default is ``always''. Also available are ``never'', which means to never send any received facsimile notification, and ``errors'', which means to send notification only if there were reception errors. SENDER is the received TSI of the fax sender. SENDTO controls the recipient of the received fax notification. It is given as an e-mail address, and it's value will be passed directly to the MTA for delivery as well as being inserted into the email. If you want to send to multiple receipients in seperate messages set the variable SENDTO1...SENDTOn in addition to SENDTO. faxrcvd will process additional SENDTOn variables starting at 1, and stopping at the first empty SENDTOn variable it finds. The templates should continue to reference $SENDTO, and faxrcvd will make sure it get's set correctly as the template is processed for each one. SUBADDR the received subaddress value, communicated by the sender for post-reception routing purposes TEMPLATE the template subdirectory to use when sending e-mails. HylaFAX ships with a base set of templates, and some direct translations. To use the German translated templates, set TEMPLATE=de in FaxDispatch. This is relative to the base template directory. Other shell variables are available. Consult the faxrcvd script directly. FILES
/var/spool/hylafax spooling area /usr/sbin/faxinfo for printing information about the facsimile /usr/bin/fax2ps for converting TIFF to PostScript /usr/lib/sendmail for delivering mail /var/spool/hylafax/etc/templates/ base directory for outgoing e-mail templates SEE ALSO
faxd(8), hylafax-server(5), recvq(5) May 28, 2001 FAXRCVD(8)