ReadMessageHandle question
Leonardo Helman
mailscanner at lists.com.ar
Tue May 2 22:09:39 IST 2006
Hi
I've been away from the list for a while.
For all the people out there using zmailer+mailscanner (me)
I'm porting now some of the last enhacenmnets.
I'm very interested in ReadMessageHandle modif
But I saw two things I don't understand very well
Julian, inside that function, when you wrote this code:
my $dhandle = $this->{dpath};
..
sysseek($dhandle, 0, 0); # Rewind the file
..
copy($dhandle , $handle);
..
sysseek($dhandle, 0, 0); # Rewind the file
but in the "constructor", it is written like:
$this->{dpath} = $dir . '/' . $this->{dname};
So, this is a file, not really a handle, right?
so the sysseek are pointless.
Or am I forgetting something?
Other thing:
In Message.pm, when you wrote:
if (!$entity && !MIME::Entity::MailScannerCounter()>=$maxparts) {
unless ($this->{dpath}) {
Isn't $this->{dpath} always the name of the datafile (at least for sendmail,
I really didn't look much of the code for the others), so this "unless"
is always false (so it could be eliminated)?
Last but not least, I think, we have to change Messages.pm a little and
move to the DiskStores the references to $this->{dpath}, like
we have done when I sent to you the zmailer parts.
For those changes for example look, in SMDiskStore.pm, look for: "# LEOH 26/03/2003 We do not have dpath in other mailers" (more than 3 years wow!)
I'm thinking something in the line of getFileNameToLog or something, I don't
remember, but I think, we have done something like that.
I'm sorry that I couldn't do this port when you change that code for the
others, but tomorrow (I hope) I'll finish, test and send to you this patch
Saludos
--
Leonardo Helman
Pert Consultores
Argentina
More information about the MailScanner
mailing list