Re-process messages in quarantine postfix+ms ?

Mark Sapiro mark at
Fri Jan 7 17:52:53 UTC 2022

On 1/7/22 12:28 AM, mailscanner at wrote:
> On Thu, 6 Jan 2022, Mark Sapiro wrote:
>> On 1/6/22 4:42 AM, mailscanner at wrote:
>>> Is there any way to re-process all the messages that got thrown into 
>>> /var/spool/MailScanner/quarantine ? There are really many, with 
>>> sendmail I could simply move them into the inbound directory but that 
>>> will not work with postfix ?
>> You could try something like
>> cd /the/directory/containing/the/messages
>> for file in `ls`; do
>>    sendmail -it < $file
>> done
> Thanks Mark! Can sendmail process postfix quarantine files? As 
> MailScanner quarantined them, I assume they were not scanned (and am a 
> little bit afraid to push the whole batch of messages through 'as is').

It depends on the format. I assumed your setting for `Quarantine Whole 
Messages As Queue Files` was the default `No` so that the files are just 
the raw messages as received. In that case, `sendmail -t` will remail 
them to the addresses in To: and Cc: and they will be processed by 
MailScanner as they were when they originally arrived. One issue is if 
any of the addressees were not local recipients, they will receive dups.

On the other hand, if `Quarantine Whole Messages As Queue Files` is set 
to `Yes`, then these are Postfix queue files and you can simply move 
them to /var/spool/postfix/incoming/ to reprocess them.

Mark Sapiro <mark at>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the MailScanner mailing list