Samba server with notification emails


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Samba server with notification emails
# 1  
Old 01-18-2012
Samba server with notification emails

I'm creating a ubuntu samba server that sends out email notifications when a file a new file is created in the monitored directory.

Currently im using inotifywait to monitor a directory and send out a email notification. Inotify wait works great but it gets triggered whenever any file including temp files are created. Is it possible either with inotifywait or another tool to only trigger if the created file has a .doc or docx extension.
# 2  
Old 01-18-2012
Use the --exclude option on inotifywait.

Code:
inotifywait --exclude '(*docx$|*doc$)'  [other options.....]

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 01-19-2012
Quote:
Originally Posted by jim mcnamara
Use the --exclude option on inotifywait.

Code:
inotifywait --exclude '(*docx$|*doc$)'  [other options.....]

Is it safe to assume that if I only want it to trigger if its a .doc then I can use the following
Code:
inotifywait --exclude '(*doc$)'  [other options.....

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sendmail Fails to send emails from Linux server.

I m using free zoho mail client application (similar to microsoft outlook) on my mobile for all my emails to mohtashim@techx.com I wish to only recieve emails from my Linux Server details of which are: techx 3.10.0-514.10.2.el7.x86_64 #1 SMP CentOS release 7.3.1611 (Core). I try the below... (20 Replies)
Discussion started by: mohtashims
20 Replies

2. UNIX for Dummies Questions & Answers

Emails sent from Linux server are rejected by recipient

Hello i have this longterm issue which im unable to solve, i think this is quite simple issue, i hope you may know the cause It is on CentOS Redhat server with qmail installed. # service qmail status # service qmail start Starting Qmail: # ps aux | grep mail qmails 1688 0.0 0.0 ... (1 Reply)
Discussion started by: postcd
1 Replies

3. Shell Programming and Scripting

Notification from another server need to receive.

I have two application server appserver1 and appserver 2. A script will run from appserver1 which main activity is 1. Connect with the apserver 2 and run a script which saved on appserver2 2. the saved script will in appserver 2 will complete its task and generate a log Problem i need to... (0 Replies)
Discussion started by: Imtiaz43
0 Replies

4. Ubuntu

Any way we can create an SMTP server and use any scripting language to read emails from that server

Is there any way to create an SMTP mail server will all granular permissions to it so that I can read emails which that server receives through any scripting language and also reply from the same server automatically? (3 Replies)
Discussion started by: sandeepcm
3 Replies

5. Solaris

How to check the number of emails sent out from the Solaris server

Our solaris are configured to send out email and i would like to know the number of emails sent out from the solaris server. Anyone know can this be done? Thanks (1 Reply)
Discussion started by: sirius20d
1 Replies

6. UNIX for Advanced & Expert Users

Routing Emails, Sun One Messaging Server

Hello, i have Sun one Messaging Server 6.3 Up and running, i want to route emails that are destined to a certain email address, let's say test@mydomain.com through the tcp_local channel for example, to another email, and not allowing test@mydomain.com to receive them. So in short, i want... (0 Replies)
Discussion started by: lemonshare
0 Replies

7. UNIX for Dummies Questions & Answers

How do I configure Linux server to be able to send emails internally?

Hi The script: #!/bin/sh #set -x # set admin email so that you can get email ADMIN="myemailaddress" # set alert level ALERT=4 df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output usep=$(echo $output | awk '{ print... (5 Replies)
Discussion started by: wbdevilliers
5 Replies

8. Shell Programming and Scripting

Find and Extract all emails from my server

My linux version is: Linux version 2.6.9-89.0.9.ELsmp (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)) My problem is simple (lol) I need find and extract all e-mail from my server. I know how to extract the e-mail from a text file, the problem is: Where to find the e-mails? How to find all... (2 Replies)
Discussion started by: mauricio_yan
2 Replies

9. UNIX for Dummies Questions & Answers

Sending Outgoing Emails from Unix Server

the server i have here is a Ubuntu server. it has nagios on it. after setting up nagios and having it work as it should, i realized at the very end of all my work that obviously nagios will also need to send out email alerts to a set of email addresses that it has in its database. my problem... (1 Reply)
Discussion started by: SkySmart
1 Replies

10. UNIX for Dummies Questions & Answers

Notification if server unreachable?

Is it possible for a group of servers to monitor each other and then send an alert if one of them is no longer 'alive'? Or if its easier have one server that monitors the other five and then sends an alert. If so how would this be done? Thanks (3 Replies)
Discussion started by: Sepia
3 Replies
Login or Register to Ask a Question