Dual TO: names in Mailwatch

Chris Trudeau chris at TRUDEAU.ORG
Mon Nov 10 22:44:32 GMT 2003


All I did was replace the SQL logging portions of this file and replaced the
production /usr/lib/MailScanner/MailScanner/MailWatch.pm with the
attached...

Still allows flawless SQL logging, but doesn't solve the replication of FROM
address entries in the database.

CT



----- Original Message -----
From: "Steve Freegard" <steve.freegard at LBSLTD.CO.UK>
To: <MAILSCANNER at JISCMAIL.AC.UK>
Sent: Monday, November 10, 2003 5:11 PM
Subject: Re: Dual TO: names in Mailwatch


>
> Chris,
>
> Please try the attached replacement MailWatch.pm.
>
> Let me know how you get on.
>
> Kind regards,
> Steve.
>
> -----Original Message-----
> From: Chris Trudeau
> To: MAILSCANNER at JISCMAIL.AC.UK
> Sent: 11/10/03 9:56 PM
> Subject: Re: Dual TO: names in Mailwatch
>
> tried both actually...neither adversely affect the operation of the
> system
> or the logging, but neither resolve the dual logging problem.
>
> CT
>
>
> ----- Original Message -----
> From: "Julian Field" <mailscanner at ECS.SOTON.AC.UK>
> To: <MAILSCANNER at JISCMAIL.AC.UK>
> Sent: Monday, November 10, 2003 4:40 PM
> Subject: Re: Dual TO: names in Mailwatch
>
>
> > At 21:27 10/11/2003, you wrote:
> > >Steve,
> > >I added these lines in my MailWatch.pm as outlined below:
> > >
> > ><SNIP>
> > >use DBI;
> > >use Sys::Hostname;
> > >
> > >my($dbh);
> > >my($sth);
> > >my($hostname) = hostname;
> > >my(%rcpts);
> > >map { $rcpts{$_}=1; } @{$message->{to}};
> > >@{$message->{to}} = keys %rcpts;
> > >
> > ># Modify this as necessary for your configuration
> > >my($db_name) = "mailscanner";
> > ></SNIP>
> > >
> > >
> > >Restarted processes.  no errors in SQL logging, but still receiving
> > >duplicates...
> >
> > You need to add it near the top of the MailWatch subroutine, not at
> the
> top
> > of the file.
> >
> >
> > >This isn't exactly a pristine environment though...let me re-build my
> test
> > >box and try it there...I'll let you know.
> > >
> > >THX
> > >CT
> > >
> > >
> > >
> > >----- Original Message -----
> > >From: "Steve Freegard" <steve.freegard at LBSLTD.CO.UK>
> > >To: <MAILSCANNER at JISCMAIL.AC.UK>
> > >Sent: Monday, November 10, 2003 11:42 AM
> > >Subject: Re: Dual TO: names in Mailwatch
> > >
> > >
> > > > Hi Julian,
> > > >
> > > > I had to change:
> > > >
> > > > $message->{to} = keys %rcpts;
> > > >  to
> > > > @{$message->{to}} = keys %rcpts;
> > > >
> > > > Otherwise $message->{to} was always blank - seems to work okay
> with
> > > > Sendmail, just need someone to test it with Postfix.
> > > >
> > > > Thanks,
> > > > Steve.
> > > >
> > > > -----Original Message-----
> > > > From: Julian Field
> > > > To: MAILSCANNER at JISCMAIL.AC.UK
> > > > Sent: 11/10/03 3:35 PM
> > > > Subject: Re: Dual TO: names in Mailwatch
> > > >
> > > > Steve,
> > > >
> > > > Can this be done easily in MailWatch by doing something like this
> very
> > > > early on with the message?
> > > >
> > > > my(%rcpts);
> > > > map { $rcpts{$_}=1; } @{$message->{to}};
> > > > $message->{to} = keys %rcpts;
> > > >
> > > > That would remove any duplicate "to" addresses from the message
> object.
> > > > Try putting the above 3 lines of code right near the start of the
> > > > MailWatch
> > > > code.
> > > >
> > > > At 15:25 10/11/2003, you wrote:
> > > > >I tried to respond off list to Julian, but my mail was returned.
> > > > >
> > > > >I've been begging for this for months and would entertain the
> idea of
> > > > paying
> > > > >someone (anyone) to escalate the priority of this problem...
> > > > >
> > > > >Thanks!
> > > > >
> > > > >CT
> > > > >
> > > > >
> > > > >----- Original Message -----
> > > > >From: "Julian Field" <mailscanner at ECS.SOTON.AC.UK>
> > > > >To: <MAILSCANNER at JISCMAIL.AC.UK>
> > > > >Sent: Monday, November 10, 2003 9:03 AM
> > > > >Subject: Re: Dual TO: names in Mailwatch
> > > > >
> > > > >
> > > > > > It's a known MailScanner bug. I just haven't got around to
> fixing
> it
> > > > yet,
> > > > > > it's not exactly high priority at the moment.
> > > > > >
> > > > > > At 13:59 10/11/2003, you wrote:
> > > > > > >Hi Pete,
> > > > > > >
> > > > > > >This is a MailScanner or Postfix issue as MailWatch only uses
> > > > information
> > > > > > >from MailScanner's $message object which is populated by
> > > > MailScanner
> > > > > > >parseing the Postfix message file.
> > > > > > >
> > > > > > >You'll also find the same problem of duplicated 'To' entries
> in
> the
> > > > admin
> > > > > > >notices as reported by someone else.
> > > > > > >
> > > > > > >The postcat command didn't really give me much to go on at
> all
> > > > (thought
> > > > >it'd
> > > > > > >be better than that) - so I'll have a Google around and see
> if I
> > > > can find
> > > > > > >any info about the file spec for Postfix and see if I can
> find
> the
> > > > >problem.
> > > > > > >
> > > > > > >Regards,
> > > > > > >Steve.
> > > > > > >
> > > > > > >
> > > > > > >-----Original Message-----
> > > > > > >From: Pete russell <pete at EATATHOME.COM.AU>
> > > > > > >To: MAILSCANNER at JISCMAIL.AC.UK <MAILSCANNER at JISCMAIL.AC.UK>
> > > > > > >Sent: Mon Nov 10 13:47:28 2003
> > > > > > >Subject: Re: Dual TO: names in Mailwatch
> > > > > > >
> > > > > > >Funny, this happened ona %100 fresh install of mailscanner
> and
> > > > fedora
> > > > > > >and MW .4 - my previous post was regarding my existing MW .3
> > > > machines.
> > > > > > >
> > > > > > >If you do find a fault I can repair myself, please le tme
> know as
> I
> > > > > > >would like to fix the .3 install on the production servers -
> cos
> I
> > > > wont
> > > > > > >be moving to .4 just yet.
> > > > > > >
> > > > > > >thanks
> > > > > > >Pete
> > > > > > >
> > > > > > >-----Original Message-----
> > > > > > >From: MailScanner mailing list
> [mailto:MAILSCANNER at JISCMAIL.AC.UK]
> > > > On
> > > > > > >Behalf Of Steve Freegard
> > > > > > >Sent: Tuesday, 11 November 2003 12:37 AM
> > > > > > >To: MAILSCANNER at JISCMAIL.AC.UK
> > > > > > >Subject: Re: Dual TO: names in Mailwatch
> > > > > > >
> > > > > > >Hi Pete,
> > > > > > >
> > > > > > >Can you stop the outbound queue runner temporarily to stop
> the
> > > > messages
> > > > > > >that
> > > > > > >have been processed by MailScanner from being delievered,
> then
> run
> > > > the
> > > > > > >'postcat' command across one of the messages and post the
> output
> to
> > > > the
> > > > > > >list.
> > > > > > >
> > > > > > >Kind regards,
> > > > > > >Steve.
> > > > > > >
> > > > > > >
> > > > > > >-----Original Message-----
> > > > > > >From: Pete russell <pete at EATATHOME.COM.AU>
> > > > > > >To: MAILSCANNER at JISCMAIL.AC.UK <MAILSCANNER at JISCMAIL.AC.UK>
> > > > > > >Sent: Mon Nov 10 08:38:36 2003
> > > > > > >Subject: Dual TO: names in Mailwatch
> > > > > > >
> > > > > > >I have the latest version of mailwatch, mailscanner, postfix,
> mysql
> > > > and
> > > > > > >RH9 - in the TO: column, when looking at recent messages, all
> the
> > > > names
> > > > > > >are listed twice - this also makes the Top Recipients by
> Volume
> > > > graph
> > > > > > >unreadable as the legend has 2 entries for each person.
> Doesn't
> > > > seem
> > > > > > >like we are getting 2 deliveries though, and doesn't seem
> like
> > > > anything
> > > > > > >is written twice to the maillog.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >Any ideas?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >Pete
> > > > > > >
> > > > > > >--
> > > > > > >This email and any files transmitted with it are confidential
> and
> > > > > > >intended solely for the use of the individual or entity to
> whom
> > > > they
> > > > > > >are addressed. If you have received this email in error
> please
> > > > notify
> > > > > > >the sender and delete the message from your mailbox.
> > > > > > >
> > > > > > >This footnote also confirms that this email message has been
> swept
> > > > by
> > > > > > >MailScanner (www.mailscanner.info) for the presence of
> computer
> > > > viruses.
> > > > > > >
> > > > > > >
> > > > > > >--
> > > > > > >This email and any files transmitted with it are confidential
> and
> > > > > > >intended solely for the use of the individual or entity to
> whom
> > > > they
> > > > > > >are addressed. If you have received this email in error
> please
> > > > notify
> > > > > > >the sender and delete the message from your mailbox.
> > > > > > >
> > > > > > >This footnote also confirms that this email message has been
> swept
> > > > by
> > > > > > >MailScanner (www.mailscanner.info) for the presence of
> computer
> > > > viruses.
> > > > > >
> > > > > > --
> > > > > > Julian Field
> > > > > > www.MailScanner.info
> > > > > > MailScanner thanks transtec Computers for their support
> > > > > >
> > > > > > PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415
> B654
> > > >
> > > > --
> > > > Julian Field
> > > > www.MailScanner.info
> > > > MailScanner thanks transtec Computers for their support
> > > >
> > > > PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415 B654
> > > >
> > > > --
> > > > This email and any files transmitted with it are confidential and
> > > > intended solely for the use of the individual or entity to whom
> they
> > > > are addressed. If you have received this email in error please
> notify
> > > > the sender and delete the message from your mailbox.
> > > >
> > > > This footnote also confirms that this email message has been swept
> by
> > > > MailScanner (www.mailscanner.info) for the presence of computer
> viruses.
> >
> > --
> > Julian Field
> > www.MailScanner.info
> > 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
>
>
> --
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the sender and delete the message from your mailbox.
>
> This footnote also confirms that this email message has been swept by
> MailScanner (www.mailscanner.info) for the presence of computer viruses.
>
>



More information about the MailScanner mailing list