Can't get rid of the .header files in the incoming directory.... Take 2, more info...

Julian Field MailScanner at ecs.soton.ac.uk
Mon May 2 12:40:47 IST 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

If you want a patch for this, try this:

-----SNIP-----
--- WorkArea.pm.old      Wed Apr 20 10:47:16 2005
+++ WorkArea.pm     Mon May  2 11:52:08 2005
@@ -230,7 +230,7 @@
     #print STDERR "Studying \"$f\"\n";
     next if $f =~ /^\./;
     # Needs untaint:
-    $f =~ /([-\w]+\.header)$/ and unlink "$1";
+    $f =~ /([-.\w]+\.header)$/ and unlink "$1";
     # And delete core files
     $f =~ /^core$/ and unlink "core";
     # Also needs untaint... sledgehammer. nut.
-----SNIP-----


Julian Field wrote:

> Well found, guys!
> Someone can read my code?
>
> I have added the fix and it will be in the next release.
>
> Steen, Glenn wrote:
>
>>> -----Original Message-----
>>> From: MailScanner mailing list
>>> [mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Spike Cacti
>>> Sent: den 29 april 2005 16:16
>>> To: MAILSCANNER at JISCMAIL.AC.UK
>>> Subject: Can't get rid of the .header files in the incoming
>>> directory.... Take 2, more info...
>>>
>>>
>>>
>> (snip)
>>
>>
>>> I am not an expert, but I think it's unlinking with
>>> the wrong filename....
>>>
>>> Could have to do with this code in WorkArea.pm, sub
>>> ClearAll :
>>>  # Clean up the whole thing
>>>  while($f = $dirhandle->read()) {
>>>    #print STDERR "Studying \"$f\"\n";
>>>    next if $f =~ /^\./;
>>>    # Needs untaint:
>>>    $f =~ /([-\w]+\.header)$/ and unlink "$1";
>>>    # And delete core files
>>>    $f =~ /^core$/ and unlink "core";
>>>    # Also needs untaint... sledgehammer. nut.
>>>    $f =~ /(.*)/;
>>>    push @ToDelete, $1 if -d "$1";
>>>  }
>>>  $dirhandle->close();
>>>
>>> Maybe due to the fact that you added a new header
>>> section in the name for Postfix queue files ? I dont
>>> think your regexp will match names like :
>>> 377DC50192.2C0F7.header
>>>
>>> I could also be totally wrong ;-) I just took a very
>>> quick look...
>>>
>>>
>> No, you are exactly right Spike... Not a big deal perhaps, since
>> the directories (and their content) would be cleared upon MS
>> restart (every ... second or so:-), but since the "postfix queue
>> ID fix", the header files would be left behind.
>> Fix is simple: just add a "." to the RE (as "-" is for exim IDs):
>>     $f =~ /([-.\w]+\.header)$/ and unlink "$1";
>> .... and all would be well.
>>
>> Julian, could you do that please (if you haven't already)?
>>
>> -- Glenn
>>
>>
>>
>>> Spike
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam?  Yahoo! Mail has the best spam protection around
>>> http://mail.yahoo.com
>>>
>>> ------------------------ MailScanner list ------------------------
>>> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>>> 'leave mailscanner' in the body of the email.
>>> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
>>> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>>
>>> Support MailScanner development - buy the book off the website!
>>>
>>>
>>>
>>
>> ------------------------ MailScanner list ------------------------
>> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>> 'leave mailscanner' in the body of the email.
>> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
>> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>>
>> Support MailScanner development - buy the book off the website!
>>
>>
>>
>
> --
> Julian Field
> www.MailScanner.info
> Buy the MailScanner book at www.MailScanner.info/store
> Professional Support Services at www.MailScanner.biz
> MailScanner thanks transtec Computers for their support
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the Wiki (http://wiki.mailscanner.info/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
> Support MailScanner development - buy the book off the website!
>

--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list