Randy,
To fix this terrible issue of IMS, I created a simple vbscript that
removes the oldest RCP file from each sub-folder of the DOMAINS folder
and then scheduled it to run every 20 minutes.
It works perfectly.
Please see the attached file. To try it, rename it from .txt to .vbs
and run cscript IMSBloqueadas.vbs
Regards,
Guilherme
2009/4/3 Randy Brukardt <[email protected]>:
> Zaxalon Webmaster wrote:
> ...
>> Little issues like the fact, for example, that Gmail rejects
>> the entire delivery queue (Sent by SMTPDS) if a single
>> message is over their size limit using ESMTP protocol
>> responses talking with IMS, an SMTP server - the fact that
>> this is an implementation issue on their side and not in IMS
>> itself - is of little relief for those of us that have to
>> deal with managing the email system and one's own users. The
>> entire queue will be bounced back to ALL senders, and then
>> only after three days. This is just one example, but I could
>> give more.
>
> This was one of the reasons that I created the Gateway version of
> TrashFinder. I let it send and deliver all mail, and of course it doesn't
> have the bugs that IMS had in that area (it might have others, of course).
> It sits on our DMZ machine and filters everything before IMS has a chance at
> it. I don't think I could still run IMS otherwise.
>
> Unfortunately, since you can't change the receiving port of IMS, you have to
> run TrashFinder Gateway on a separate machine, which means it's not
> necessarily for everybody.
>
> I thought about replacing IMS completely (given that TF Gateway does many of
> the hard tasks already), but didn't much want to write POP3 and mailing list
> support. Maybe I'll do that someday.
>
> Randy.
Option Explicit
'FastCommerce
'============
'Copyright Rumo Informática
'Página: IMSBloqueadas.vbs
'Descrição: Remove mensagens bloqueadas na pasta DOMAIN do IMS
' Remove arquivo MRI e remove arquivo RCP mais antigo caso a pasta
tenha MRI
Const PastaDomain="C:\Ims\Inetmail\SPOOL\domains"
Const ArqMaisRecente="B9999999999.RCP"
Dim oFS,iTotalPastas,iMRIremovidos,iRCPremovidos,Agora
Set oFS=CreateObject("Scripting.FileSystemObject")
iTotalPastas=0
iMRIremovidos=0
iRCPremovidos=0
Agora=Now
RemoveBloqueadas PastaDomain
Set oFS=Nothing
wscript.echo "MRI removidos: "& iMRIremovidos
wscript.echo "RCP removidos: "& iRCPremovidos
Sub RemoveBloqueadas(sPath)
'Remove arquivo MRI
'Remove o arquivo RCP mais antigo de sPath, caso a pasta tenha MRI
'Rotina recursiva
Dim
oTodos,oFolders,oFolder,oFiles,oFile,sFileName,ext,DataCriacao,ArqMaisAntigo,TemMRI
iTotalPastas=iTotalPastas+1
Set oTodos=oFS.GetFolder(sPath)
Set oFolders=oTodos.SubFolders 'Obtém pastas
For Each oFolder in oFolders
RemoveBloqueadas sPath &"\"& oFolder.name
Next
TemMRI=False
ArqMaisAntigo=ArqMaisRecente
Set oFolder=Nothing
Set oFolders=Nothing
Set oFiles=oTodos.Files 'Obtem arquivos da pasta
For Each oFile in oFiles
sFileName=oFile.name
ext=LCase(oFS.GetExtensionName(sFileName))
DataCriacao=oFile.datelastmodified
If ext="mri" Then
TemMRI=True
iMRIremovidos=iMRIremovidos+1
ApagaArq sPath &"\"& sFileName
ElseIf ext="rcp" Then
If ArqMaisAntigo>sFileName Then ArqMaisAntigo=sFileName
End If
Next
Set oFile=Nothing
Set oFiles=Nothing
Set oTodos=Nothing
If ArqMaisAntigo<>ArqMaisRecente AND TemMRI Then
wscript.echo sPath &"\"& ArqMaisAntigo
iRCPremovidos=iRCPremovidos+1
ApagaArq sPath &"\"& ArqMaisAntigo
End If
End Sub
Sub ApagaArq(sArq)
On Error Resume Next 'Evita erro de colisão (Permission denied)
oFS.DeleteFile sArq,true 'Força deleção de arquivo read-only
On Error Goto 0 'Desabilita error trap
End Sub