05-25-2012
If File is present send a mail and Archive
Hi ,
Please help me with a logic, how can I acheive the below.
I have a directory /eth/Src/, when ever there is a file(or files) created in this directory, (after the file is completely copied to the /eth/Src/ directory) I need to zip all the files and mail the files to a particular email id through the SMTP configured in our server, after the email is succesfully sent , I need to move the file to a archive directory.
I am familiar with send mail in unix through SMTP, what I need is the shell script should keep on checking the /eth/Src/ directory 24/7 and when ever files is created it has to zip and send the mail. please give me some idea on how to acheive this part.
Best Regards,
Wang
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a utility that opens a telnet session and allows me to execute commands through a script. The utility allows me to output to a text file whatever is outputted to screen.
This utility runs from a DOS prompt in Windows 95/98, NT or 2000. How can I mail text file this to a certain user.
I... (2 Replies)
Discussion started by: petrosi
2 Replies
2. Shell Programming and Scripting
Hello,
I am new to perl and need to create a script that will read a file and pull a name from the file and send e-mail.
How can I use the following awk statement in a perl script?
grep UNIXadmins /root/mail.conf | awk '{ print $2}'
and use the output to send a e-mail.
Any help would... (1 Reply)
Discussion started by: DC Heard
1 Replies
3. UNIX for Advanced & Expert Users
hello ,
i m new to linux/unix , well in my college their is linux server to which we all (i and my frnds) login
, we can send mail to each other through command "mail" .
but any one can tell me how can i attached a binary file with mail.
we are using red hat , "pine ", "mailx" , all... (2 Replies)
Discussion started by: alert_every1
2 Replies
4. AIX
Hi
All,
I have AIX 5.3 server. I am not able to transfer multiple file in mail but I can send one file at a time. the following command I am using to send multiple file
mail -s 'PICS EXP RATE Logs' lger@nd.com < /data02/transfer/*_experience_rate_log.txt
but this not working. i can send... (2 Replies)
Discussion started by: vishalpatel03
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
I want to send out a file that generate 1st of each month that have formate like this 11012008_experience_rate_log.txt
Now I have setup a cronjob that usually sent this file in mail
like
cat /data02/transfer/*_experience_rate_log.txt | mail -s 'PICS EXP RATE Logs' lger@bd.com
So how... (3 Replies)
Discussion started by: vishalpatel03
3 Replies
6. Shell Programming and Scripting
hi,
A script which look into a directory and send an alert via a mail. If there is any file exisiting in a directory for more then 10 min. (5 Replies)
Discussion started by: madfox
5 Replies
7. UNIX for Dummies Questions & Answers
Hi
The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment .
cat Employee.sql
SET VERIFY OFF
SET PAGESIZE 200
SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies
8. Shell Programming and Scripting
Dear Experts,
I have a requirement where a 3rd party system places a file in my folder.I am running on HP UNIX. I would like to have a unix script which will check for the existence of the file. If yes OK. if the file is not placed then it has to send a mail to couple of emails ids saying that... (3 Replies)
Discussion started by: phani333
3 Replies
9. UNIX for Advanced & Expert Users
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
10. UNIX for Advanced & Expert Users
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
LEARN ABOUT SUSE
mlmmj-unsub
mlmmj-unsub(1) General Commands Manual mlmmj-unsub(1)
NAME
mlmmj-unsub - manual page for mlmmj-unsub
SYNOPSIS
mlmmj-sub -L /path/to/list -a john@doe.org [-c | -C] [-h] [-d | -n] [-V]
-a: Email address to unsubscribe
-c: Send goodbye mail
-C: Request mail confirmation
-d: Unsubscribe from the digest version of the list
-h: This help
-L: Full path to list directory
-n: Unsubscribe from the nomail version of the list
-s: Don't send a mail to the address if not subscribed
-U: Don't switch to the user id of the listdir owner
-V: Print version
DESCRIPTION
This utility is used to unsubscribe people from the specified mailinglist. It will remove the specified email address from every file in
the <listdir>/subscribers.d/ directory.
Unless the -U switch is used it will switch its user id to the user id owning the list directory. This is done to make sure that new files
created are having correct permissions.
Normally a mail is sent to the person being unsubscribed if the address is not subscribed to the list. If the -s switch is used such a mail
will not be sent.
When neither -c nor -C are specified, unsubscription silently happens.
SEE ALSO
mlmmj-sub(1)
AUTHORS
This manual page was written by the following persons:
Soren Boll Overgaard <boll@debian.org> (based on html2man output)
Mads Martin Jorgensen <mmj@mmj.dk>
mlmmj-unsub September 2004 mlmmj-unsub(1)