# Logstash Email - Constantly sending

**URL:** https://discuss.elastic.co/t/logstash-email-constantly-sending/210262
**Category:** Logstash
**Created:** [December 3, 2019, 12:23am UTC](https://discuss.elastic.co/t/logstash-email-constantly-sending/210262 "2019-12-03T00:23:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lquin1978](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@lquin1978](https://discuss.elastic.co/u/lquin1978)
#### Post date: [December 3, 2019, 12:23am UTC](https://discuss.elastic.co/t/logstash-email-constantly-sending/210262/1 "2019-12-03T00:23:10Z")

</div>

I am using an email output within logstash to send me a copy of an xml file that has been generated by an NMAP scan. The issue is Logstash is repeatedly sending me a copy of the same file every minute. Is there a way to only send a copy of the file once every 24 hours?

file is as follows:

input{  
file{  
path =\> "/usr/share/vuln/vuln.xml"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
exclude =\> "\*.gz"  
type =\> "xml"  
}  
}  
filter{  
xml{  
source =\> "message"  
store\_xml =\> false  
target =\> "stations"  
xpath =\> [  
"/stations/station/id/text()", "station\_id",  
"/stations/station/name/text()", "station\_name"  
]  
}  
}

output {  
email {  
to =\> 'info@.com'  
from =\> 'alerts@.com'  
subject =\> 'Vulnerability Detected'  
body =\> "Tags: %{tags}\n\Content:\n%{message}"  
domain =\> 'mail..com'  
port =\> 25  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 31, 2019, 12:23am UTC](https://discuss.elastic.co/t/logstash-email-constantly-sending/210262/2 "2019-12-31T00:23:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
