From steve at devon-it.co.uk Fri Sep 5 04:46:26 2003 From: steve at devon-it.co.uk (Steve Marvell) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: meeting Message-ID: <20030905094626.GA5895@flumpet.demon.co.uk> Right! For those want to meet up, where are you roughly? The meeting will consist of some drinking, some chatting and possibly some more boasting. Nothing formal and nothing too geeky. Steve From Simon at wretched.demon.co.uk Fri Sep 5 06:06:56 2003 From: Simon at wretched.demon.co.uk (Simon Waters) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: meeting In-Reply-To: <20030905094626.GA5895@flumpet.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> Message-ID: <3F586E50.4040502@wretched.demon.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Marvell wrote: > > For those want to meet up, where are you roughly? > > The meeting will consist of some drinking, some chatting and possibly > some more boasting. Nothing formal and nothing too geeky. I'm an evil impostor who joined to ask questions, but I'm in Exeter. Currently between jobs and researching Exeter's coffee houses, so far they all seem to sell coffee. -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/WG5PGFXfHI9FVgYRAmHsAJ9s3MCDntWn1poTMwi4CDsOaqS4GwCffYZw 9SwW/PGOpRuHoyyMS4737jY= =U0sg -----END PGP SIGNATURE----- From steve at devon-it.co.uk Fri Sep 5 06:44:28 2003 From: steve at devon-it.co.uk (Steve Marvell) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: meeting In-Reply-To: <3F586E50.4040502@wretched.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <3F586E50.4040502@wretched.demon.co.uk> Message-ID: <20030905114428.GA7060@flumpet.demon.co.uk> Simon Waters wrote: > I'm an evil impostor who joined to ask questions, but I'm in Exeter. How far North/West would you be willing to come for a beer? > Currently between jobs and researching Exeter's coffee houses, so far > they all seem to sell coffee. Sneaky bastards! Steve From Simon at wretched.demon.co.uk Fri Sep 5 07:31:36 2003 From: Simon at wretched.demon.co.uk (Simon Waters) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: meeting In-Reply-To: <20030905114428.GA7060@flumpet.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <3F586E50.4040502@wretched.demon.co.uk> <20030905114428.GA7060@flumpet.demon.co.uk> Message-ID: <3F588228.4020008@wretched.demon.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Marvell wrote: > > How far North/West would you be willing to come for a beer? Beer is a problem for me, damn stuff started disagreeing with me for no obvious reason, but for coffee, definitely no further than Lundy ;) I was going to go to Greenfield Massachusetts, for a barbeque earlier in the year, but Faye thought this was kind of extravagant, lots of people later emailed me to say I should have gone, and telling me I'd missed a great day out :-( Do I detect a serious case of cabin fever? If you pick somewhere near the moor (Dart, not Ex or Bodmin), you could invite Nick K. along, if this just to find someone who understands what you say without long explanations. -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/WIImGFXfHI9FVgYRArmTAKCuR3jdKbz+XTNsLxUFskzygCSFowCfTvbm P6kC/ncXCxNfQv8zDL99icg= =LPjJ -----END PGP SIGNATURE----- From steve at devon-it.co.uk Fri Sep 5 16:15:57 2003 From: steve at devon-it.co.uk (Steve Marvell) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: duff post - meeting Message-ID: <20030905211557.GB8010@flumpet.demon.co.uk> On Friday 05 September 2003 10:46 am, Steve Marvell wrote: > For those want to meet up, where are you roughly? Marlborough, in Wilts, lond way away from the rest of you :/ > The meeting will consist of some drinking, some chatting and possibly > some more boasting. Nothing formal and nothing too geeky. mmm, drink. I miss drink ... ~ Theo ;) - -- Theo Zourzouvillys Operations Manager Associated Networks Limited - theo@anlx.net - +44 (0)845 0034 121 (ext 1001) - 24/7 NOC: 0870 432 9201 - http://www.anlx.net/ From theo at crazygreek.co.uk Fri Sep 5 20:14:39 2003 From: theo at crazygreek.co.uk (Theo Zourzouvillys) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: duff post - meeting In-Reply-To: <20030905211557.GB8010@flumpet.demon.co.uk> References: <20030905211557.GB8010@flumpet.demon.co.uk> Message-ID: <200309060214.40350@home.crazygreek.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 05 September 2003 10:15 pm, Steve Marvell wrote: > Marlborough, in Wilts, lond way away from the rest of you :/ wwhoeeps, posting from work addy. sorry! ~ theo - -- Theo Zourzouvillys - --------------------------------------- /"\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - --------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/WTT/448CrwpTn6YRApDTAJoCnF8M4Fp+ilCQd4az7xajP+ihOACg8eS9 5NmWHuHCKW4/6mL0U+0iCH4= =GarR -----END PGP SIGNATURE----- From mb at matthewb.org Tue Sep 9 14:20:41 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:48 2004 Subject: DCPM: meeting [some OT content] In-Reply-To: <20030905094626.GA5895@flumpet.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> Message-ID: <20030909192155.3E93DA3F9A@smtp2.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 05 September 2003 10:46, Steve Marvell wrote: > Right! > > For those want to meet up, where are you roughly? > I was going to say something like this myself soon. Having had more than enough of the London/Berkshire lifestyle, I have just (last Saturday) relocated to the glorious Teignmouth to telecommute. *Grin*. my $gloat = q[yes, we have ADSL here]; ++$gloat: and I'm not even paying for it. Some kind of meeting is the way forward, I think, for DCPM (having seen the London `scene'). I'm happy to go anywhere in Devon (favours Teignmouth's extensive drinking establishments), we also have a `yes' from Mrs. B (also programs Perl as part of her job) and from the dog, if a dog-friendly pub is chosen (doesn't know what Perl is). > The meeting will consist of some drinking, some chatting and possibly > some more boasting. Nothing formal and nothing too geeky. > Cool. Let's set a date and move this forward. MB - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/XigJy5o0lRFL2ooRAo9YAKDvCBVetq5ACxmaA/F17FEcUjCjaQCfZfgo Wu8EEFGHi0SYKH9bsZO2AWo= =45wV -----END PGP SIGNATURE----- From mb at matthewb.org Mon Sep 15 08:03:41 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: Am I the bug? Message-ID: <20030915130451.90B30A92A0@smtp2.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have an application here comprising eight modules and about twenty utility scripts. If I run it on perl 5.6.1 all is well. However, if I run it under 5.8.0 various scripts cause a segfault. I can stop this happening by commenting out and `use lib '...'; ' lines; but of course I sometimes need that lib! Same rules apply if I unshift dirs onto @INC. There appears to be no pattern by which to determine which are likely to fail. To clarify: if I try to `use' a module which is locally installed (i.e. in ~/lib), perl will segfault in some instances but not others, the requirement and environment being the same. I suspect that this is a bug in the .0 release that I have missed. Has anyone seen this before? How did you fix it? MB - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/Zbity5o0lRFL2ooRAvCkAJ9uf25S/AAis6Qz/JDnWTcoCeZckACgig8j 0W98SjmOuovAKvGKoE00uBI= =rg4H -----END PGP SIGNATURE----- From steve at devon-it.co.uk Mon Sep 15 08:44:05 2003 From: steve at devon-it.co.uk (Steve Marvell) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: Am I the bug? In-Reply-To: <20030915130451.90B30A92A0@smtp2.ex.eclipse.net.uk> References: <20030915130451.90B30A92A0@smtp2.ex.eclipse.net.uk> Message-ID: <20030915134405.GA17550@flumpet.demon.co.uk> Matthew Browning wrote: > There appears to be no pattern by which to determine which are likely > to fail. I suggest you strace it. Steve From mb at matthewb.org Mon Sep 15 08:55:13 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: Am I the bug? In-Reply-To: <20030915134405.GA17550@flumpet.demon.co.uk> References: <20030915130451.90B30A92A0@smtp2.ex.eclipse.net.uk> <20030915134405.GA17550@flumpet.demon.co.uk> Message-ID: <20030915135618.97913A53@smtp1.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 15 September 2003 14:44, Steve Marvell wrote: > Matthew Browning wrote: > > There appears to be no pattern by which to determine which are > > likely to fail. > > I suggest you strace it. > I'd not even seen that before. I'll give it a go. - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/ZcTBy5o0lRFL2ooRAtCdAKDTs6dbmga2CHp3wte46UoZZxIswwCg63ht e6ieuA2QAsSMr6hD8ksBwGs= =dCp0 -----END PGP SIGNATURE----- From Simon at wretched.demon.co.uk Sat Sep 20 14:30:58 2003 From: Simon at wretched.demon.co.uk (Simon Waters) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: De-SWENing In-Reply-To: <20030909192155.3E93DA3F9A@smtp2.ex.eclipse.net.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <20030909192155.3E93DA3F9A@smtp2.ex.eclipse.net.uk> Message-ID: <3F6CAAF2.10200@wretched.demon.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Argh, this virus was building up faster at Demon's mail server than the SMTP delivery could cope. So I thought lets do a custom Perl script to keep my hand in, because I couldn't find a simple "header" rule to kill the messages reliably. Some people were discussing uppercase headers - hmm. One thing I still find tricky is what to prefix variables with in Perl. Am I right in thinking that Net::POP3 ->list() is returning a reference to a hash, not a hash, hence the $mail->{$msg}, as programmers seem to say "returns a has" when they mean "returns a reference to a hash", or am I just showing my lack of sleep :( Okay it needs some comments, and a few extra "die" statements, but it seems to kill all messages with size betwee 139998 and 160616 with an uppercase "SUBJECT" in the headers in my POP3 mail box. Demon use "domain" rather than "username", but it makes no odds whatever you need to access your POP3 mail. Use at your own risk, no warranty applies. Comments on how it might be better written gratefully received. Feel free to pass onto people even less skiled at Perl but with more viruses (i.e. desparate). BEFORE: There are 514 messages waiting on punt-3.mail.demon.net for wretched.demon.co.uk AFTER: There are 198 messages waiting on punt-3.mail.demon.net for wretched.demon.co.uk Alas 100 odd of these are still obviously spam, and a few are viruses, but that is at least 44MB less junk to eat my bandwidth. #!/usr/bin/perl -w use strict; use Net::POP3; my $server = 'pop3.demon.co.uk' ; my $domain = 'wretched'; my $passwd = '???????'; my $min = 139998 ; my $max = 160616 ; my $popserv = Net::POP3->new($server); my $nummail = $popserv->login($domain,$passwd); printf("You have $nummail messages queued\n"); # Get size of messages my $mail = $popserv->list(); my $msg; foreach $msg (keys %$mail ) { my $size = $mail->{$msg} ; if ( ( $size > $min ) and ( $size < $max ) ) { my $headers = $popserv->top($msg); my $subject = grep {/^SUBJECT:/} @$headers; if ( $subject eq 1 ) { # Lets kill all uppercase subjects as we are mean like that $popserv->delete($msg); } } } $popserv->quit(); -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/bKrvGFXfHI9FVgYRApGZAJkBrwI5XSRk71JBNXS6UeGCnZirBwCff6WU wSu+Uvx4TyMAqtkHKWwXtqA= =By/i -----END PGP SIGNATURE----- From mb at matthewb.org Sun Sep 21 03:30:25 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: De-SWENing In-Reply-To: <3F6CAAF2.10200@wretched.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <20030909192155.3E93DA3F9A@smtp2.ex.eclipse.net.uk> <3F6CAAF2.10200@wretched.demon.co.uk> Message-ID: <20030921083131.27435A38FB@smtp2.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 20 September 2003 20:30, Simon Waters wrote: > One thing I still find tricky is what to prefix variables with in > Perl. > > Am I right in thinking that Net::POP3 ->list() is returning a > reference to a hash, not a hash, hence the $mail->{$msg}, as > programmers seem to say "returns a has" when they mean "returns a > reference to a hash", or am I just showing my lack of sleep :( > What you've done is right. Net::POP3->list does return a reference to a hash (see line 201 of the module). You correctly iterate over the keys to assign the corresponding value to $size in your loop. If you like, you could say %{$mail}{$msg) instead of $mail->{$msg} as a matter of personal taste; the arrow to dereference is more commonly seen. > Use at your own risk, no warranty applies. Comments on how it might > be better written gratefully received. Feel free to pass onto people > even less skiled at Perl but with more viruses (i.e. desparate). > If it works for you then it is right ;) What happens if I send you a genuine email with an uppercase subject for some convoluted but legitimate reason? I don't tend to use parentheses where there is no method argument. It could be a bit shorter because you copy values in a couple of places but that can't matter on something this size. If you want to be really humbled, perlmonks.org usually does the job. - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/bWGhy5o0lRFL2ooRAqJUAKCkfXnJUhC+/eHXDrgvSqLDBzSR6QCfRRR+ XnsrZRTjSVtw+vjqKzPmoSc= =EzwN -----END PGP SIGNATURE----- From mb at matthewb.org Sun Sep 21 03:37:23 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: Practical mod_perl Message-ID: <20030921083828.D5B9EA7A45@smtp2.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I picked up this book last week: http://www.oreilly.com/catalog/pmodperl/ ...haven't finished it yet but it is most cool so far. It is as much about mod_perl/apache admin as it is about programming but it is superbly comprehensive. Worth the cost of entry, however, are the appendices on Template::Toolkit and AxKit, not previously covered by ORA but widely used. The first of these is so unbelievably useful I can't start a project without it now, the second I am just starting to tinker with. Also check out the `recipes' section, for those who have used mod_perl but not neccessarily known all the cool things you can do with it. File next to `Writing Apache Modules with C and Perl'. Matthew Browning - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/bWNDy5o0lRFL2ooRAldPAKDpdlSUyZj2y7n50e+tqs3ytkXvrQCfXOR3 wD7q3Kz8omf3KTbyvCDFrbc= =SKBs -----END PGP SIGNATURE----- From Simon at wretched.demon.co.uk Sun Sep 21 04:06:49 2003 From: Simon at wretched.demon.co.uk (Simon Waters) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: De-SWENing In-Reply-To: <20030921083131.27435A38FB@smtp2.ex.eclipse.net.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <20030909192155.3E93DA3F9A@smtp2.ex.eclipse.net.uk> <3F6CAAF2.10200@wretched.demon.co.uk> <20030921083131.27435A38FB@smtp2.ex.eclipse.net.uk> Message-ID: <3F6D6A29.8070206@wretched.demon.co.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matthew Browning wrote: > > If it works for you then it is right ;) What happens if I send you a > genuine email with an uppercase subject for some convoluted but > legitimate reason? Well if its size is between "min" and "max" in size it stands a fair chance of being zapped. I did ponder trying to trap subject lines, but SWEN is generating them by putting phrases together, so I'd have to reverse engineer it into some wonderful regular expression. Almost all the subject lines I examied were unique! Something like, but much longer than...... /(New|Newest|Latest) (MS|Microsoft|Outlook|Microsoft Security) (Patch|Update)/ Any such regexp stands a fair chance of matching genuine email. A quick grep suggests ^SUBJECT: 2 ^Subject: 37157 The two are both from "Top Jobs on the Net", so probably rejecting all uppercase "^SUBJECT:" message is sufficient to bounce the virus early, indeed I might go with this as it'll sure speed up my mail delivery. -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/bWonGFXfHI9FVgYRAvEHAKCnfAcRCyGMeU3YzJXUttjPJhBzjACfYxQP ygTzSDR0kWLpgxKxPchqMuw= =4bRx -----END PGP SIGNATURE----- From mb at matthewb.org Mon Sep 22 03:02:23 2003 From: mb at matthewb.org (Matthew Browning) Date: Thu Aug 5 00:28:49 2004 Subject: DCPM: De-SWENing In-Reply-To: <3F6D6A29.8070206@wretched.demon.co.uk> References: <20030905094626.GA5895@flumpet.demon.co.uk> <20030921083131.27435A38FB@smtp2.ex.eclipse.net.uk> <3F6D6A29.8070206@wretched.demon.co.uk> Message-ID: <20030922080328.64F05E95@smtp1.ex.eclipse.net.uk> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Coincidentally enough: http://perlmonks.org/index.pl?node_id=292982 [links to a different approach to the same thing] Matthew Browning - -- http://matthewb.org/public_key.txt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/bqyPy5o0lRFL2ooRAg97AJwNQX0SPrCApRykwAn6pLHGIr0RMgCgixmB YxKUP2KGrYDI5HULlLxHpZ0= =0Tkd -----END PGP SIGNATURE-----