Re-send emails in quarantine
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re-send emails in quarantine
I might be facing the need to restore our Exchange database from a backup. If that becomes necessary, is it possible to have all the stored messages in EFA after a certain date be redelivered so we don't lose a days worth of emails?
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Re-send emails in quarantine
Yes, with a little effort.
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re: Re-send emails in quarantine
So, how would I do it?
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Re-send emails in quarantine
Glad you asked
1) Head over to /var/spool/MailScanner/quarantine
2) Look for the dir(s) you want, labeled by date
3) Find the nonspam dir
4) Copy the emails from the nonspam dir to /var/spool/postfix/incoming
5) Go grab a beer for a job well done.
1) Head over to /var/spool/MailScanner/quarantine
2) Look for the dir(s) you want, labeled by date
3) Find the nonspam dir
4) Copy the emails from the nonspam dir to /var/spool/postfix/incoming
5) Go grab a beer for a job well done.
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re: Re-send emails in quarantine
Wow, thanks!
I'm definitely going to need a lot of step 5's, but this will make it so much easier!
Thanks again!
I'm definitely going to need a lot of step 5's, but this will make it so much easier!
Thanks again!
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re: Re-send emails in quarantine
The files are just sitting there. Other mail is coming in but it doesn't grab the files I copied. I tried postqueue -f, but nothing. Any ideas?
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re: Re-send emails in quarantine
I figured out that I need to chmod u+x and remove everything trailling the period in the file name. However, the messages get put in the corrupted queue.
My Mailscanner.conf has:
# Do you want to quarantine the original *entire* message as well as
# just the infected attachments?
# This can also be the filename of a ruleset.
Quarantine Whole Message = yes
# When you quarantine an entire message, do you want to store it as
# raw mail queue files (so you can easily send them onto users) or
# as human-readable files (header then body in 1 file)?
Quarantine Whole Messages As Queue Files = no
I'm guessing that is why. Changing it now won't help me. Is there something else I can do to the files to make it accept them?
My Mailscanner.conf has:
# Do you want to quarantine the original *entire* message as well as
# just the infected attachments?
# This can also be the filename of a ruleset.
Quarantine Whole Message = yes
# When you quarantine an entire message, do you want to store it as
# raw mail queue files (so you can easily send them onto users) or
# as human-readable files (header then body in 1 file)?
Quarantine Whole Messages As Queue Files = no
I'm guessing that is why. Changing it now won't help me. Is there something else I can do to the files to make it accept them?
- shawniverson
- Posts: 3649
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: Re-send emails in quarantine
Well, crud, they aren't queue files. Let me do a little tinkering.
I think we can still do this, but it may require passing the emails through a little script.
I think we can still do this, but it may require passing the emails through a little script.
-
- Posts: 27
- Joined: 28 Jun 2014 19:17
Re: Re-send emails in quarantine
I found some ways around this that should be good enough, so don't worry about it. Fortunately, it's only a dozen or so users that I need to retrieve stuff for, and I only have two left.
Your SummitStor project is intriguing though. I might need to stalk you on that.
Your SummitStor project is intriguing though. I might need to stalk you on that.