Resend archived mail
John Schmerold
john at katy.com
Wed May 17 16:17:18 IST 2006
Ken,
Thank you. You've provided some very good inspiration. Of course, I've
run into the dreaded "Argument list too long" issue.
Some days I wonder why I jumped on the Linux bandwagon.
John
Ken A wrote:
>
> John Schmerold wrote:
>
>> Turns out the answer to the fundamental question is: you need to copy
>> to mqueue.in:
>> cp -p
>> /var/spool/MailScanner/quarantine/20051101/20060516/?fk4GLVKel032053
>> /var/spool/mqueue.in
>>
>
> That will just send them through MailScanner and catch and quarantine
> them again. They need to go into the outgoing queue.
>
> Something like this ugly shell script will get everything under
> quarantine (all dates) that is going to some domain.com.
>
> cd /var/spool/MailScanner/quarantine/
>
> for i in `grep "rRFC822" */*/qf* | \
> grep -w domain.com | \
> awk -F : '{print $1}' | \
> sort -u | \
> sed 's/\/qf/\/?f/'`; \
> do echo $i; \
> done;
>
> Cut and paste it in. Replace domain.com with the domain you want to
> find. Replace "echo $i" with "cp $i /var/spool/mqueue" when you like
> the output.
>
> Run the outgoing queue manually if it's stuck for some reason.
> /usr/sbin/sendmail -oQ/var/spool/mqueue -v -qRdomain.com
>
> Ken A
> Pacific.Net
>
>
>> I'm hoping to whip up a script that looks for the domain in the q
>> file, then copies q & f file to /var/spool/mqueue.in
>>
>> I sure wish FoxPro worked on my Centos box :-(
>>
>> John Schmerold wrote:
>>
>>> We had a sad story this morning. Long story short, I need to resend
>>> all archived emails addressed to one domain and archived. We are
>>> using Sendmail. If memory serves all we need to do is copy the
>>> archived message into mqueue like so:
>>> cp -p
>>> /var/spool/MailScanner/quarantine/20051101/20051111/?fjABMN7KU009599
>>> /var/spool/mqueue
>>>
>>> It's been 15 minutes or so & the emails have not budged from mqueue:
>>> [root at mx1 root]# ls -al
>>> /var/spool/MailScanner/quarantine/20051101/20060516/?fk4GF081P020699
>>> -rw-rw---- 1 root root 1085 May 16 10:00
>>> /var/spool/MailScanner/quarantine/20051101/20060516/dfk4GF081P020699
>>> -rw-rw---- 1 root root 3143 May 16 10:00
>>> /var/spool/MailScanner/quarantine/20051101/20060516/qfk4GF081P020699
>>> [root at mx1 root]# ls -al /var/spool/mqueue/?fk4GF081P020699
>>> -rw-rw---- 1 root root 1085 May 16 10:00
>>> /var/spool/mqueue/dfk4GF081P020699
>>> -rw-rw---- 1 root root 3143 May 16 10:00
>>> /var/spool/mqueue/qfk4GF081P020699
>>>
>>>
>>> Two questions:
>>> 1. What am I missing?
>>>
>>> 2. Does any dear soul have a script they'd care to share with the
>>> group to re-deliver all emails sent to example.com ?
>>> Perhaps something as simple as:
>>> dosomething $(grep -ril "@katy.com"
>>> /var/spool/MailScanner/quarantine/20051101/20060516/qfk4GF081P020699 )
>>>
>>> TIA
>>
>>
>>
--
John Schmerold
Katy Computer & Wireless
20 Meramec Station Rd
Valley Park MO 63088
636-861-6900 v
775-227-6947 f
More information about the MailScanner
mailing list