[28824] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 68 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 24 21:34:42 2007

Date: Wed, 24 Jan 2007 18:33:15 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 24 Jan 2007     Volume: 11 Number: 68

Today's topics:
        Another procmail configuration <pf@auth.net.au>
    Re: Another procmail configuration <uri@stemsystems.com>
    Re: Another procmail configuration <pf@auth.net.au>
    Re: Another procmail configuration <spamtrap@dot-app.org>
    Re: Another procmail configuration <uri@stemsystems.com>
    Re: Another procmail configuration <rvtol+news@isolution.nl>
        attn: verney - extremely colorful fast downloads -  at  <condicoes@crystales.jp>
        Calling keys() on two hashes with the same keys <jgottman@carolina.rr.com>
    Re: Calling keys() on two hashes with the same keys <john@castleamber.com>
    Re: Calling keys() on two hashes with the same keys xhoster@gmail.com
    Re: Calling keys() on two hashes with the same keys <greg.ferguson@icrossing.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 25 Jan 2007 09:11:17 +1100
From: Pet Farrari <pf@auth.net.au>
Subject: Another procmail configuration
Message-Id: <6XQth.27896$b6.243130@nasal.pacific.net.au>

Hi,

I am having problem with setting up procmail to work with a C program I 
wrote. The C program is to determine whether the domain part of the 
incoming email is a forwarded email, if it is, procmail will not filter 
its spam into local cyrus mail box. I m not really sure the syntax I use 
in this conf file is correct or not.

Your suggestion is much appreciated.

Here is the promailrc script:

SHELL=/bin/sh
DROPPRIVS=yes
LINEBUF=32768
SENDMAILFLAGS="-oi"
LOGFILE="/var/log/spamkill/spamkill.log"
SPAMC="/usr/local/bin/spamc"

FROM="<$1>"
TO=$2
SHIFT=1


:0f
|$SPAMC -f -U /var/run/spamd.sock

:0
* ^X-Spam-Level: \*\*\*\*\*
{
USER=`echo $TO | cut -d "@" -f1`
DOMAIN=`echo $TO | cut -d "@" -f2`

# Debug statement. Comment out these Debug log lines later.
#LOG="[$$]$_: Debug: TO=$TO${NL}\n"
#LOG="[$$]$_: Debug: USER=$USER${NL}\n"
#LOG="[$$]$_: Debug: DOMAIN=$DOMAIN${NL}\n"

# Execute CYRUSUSER's personal rules
#INCLUDERC=/var/imap/procmail/user/procmail.$CYRUSUSER

# All the mail that falls through to this point will be delivered into 
the user's Spam,
# INBOX folder or forwarded to external smtp server.
    :0 wi
    {

         IS_FWD=`/usr/local/sbin/alias2user $DOMAIN`
         LOG="[$$]$_: Debug: IS_FWD=$IS_FWD${NL}\n"
         # theres an error when determng whether thiss a forwarded domain
         * !IS_FWD ?? "-1"
         {
                 |  /usr/local/cyrus/bin/deliver -r 
admin@mymaildomian.com.au admin/Inbox
                 # not a forwarded domain
                 :0
                 * IS_FWD ?? "0"
                 {
                         |  /usr/local/cyrus/bin/deliver -r 
$USER@$DOMAIN $USER/Spam
                 }

                 # Else Delivery failed. So we need to handle the error 
condition.
                 :0 e
                 {
                 # Get the return code from the last program that ran 
and report it in the logfile.
                 ERRORCODE=$?
                 LOG="[$$]$_: XX-Failed delivery ERRORCODE=${ERRORCODE} 
${NL}"
                 }
         }
     }
}

:0
! -f $FROM "$@"

Its error log from procmail in regarding trigger this receipts is:

procmail: Extraneous ignore-write-error flag ignored
procmail: Skipped "* !IS_FWD ?? "-1""
procmail: Skipped "{"
procmail: Skipped "|  /usr/local/cyrus/bin/deliver -r 
admin@mymaildomain.com.au admin/Inbox"
procmail: Skipped "|  /usr/local/cyrus/bin/deliver -r $USER@$DOMAIN 
$USER/Spam"
procmail: Closing brace unexpected
  Subject: testing
   Folder: /usr/sbin/sendmail -oi -f <sam@mymaildomain.com.au> 
     1244

Thanks
S


------------------------------

Date: Wed, 24 Jan 2007 17:23:34 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Another procmail configuration
Message-Id: <x77ivc5ajd.fsf@mail.sysarch.com>


and your perl question is?

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: Thu, 25 Jan 2007 09:35:14 +1100
From: Pet Farrari <pf@auth.net.au>
Subject: Re: Another procmail configuration
Message-Id: <zhRth.27897$b6.243006@nasal.pacific.net.au>

Uri Guttman wrote:
> and your perl question is?
> 
> uri
> 
I think many perl expert in this forum knows the answer of this question?

Thanks
S


------------------------------

Date: Wed, 24 Jan 2007 18:07:31 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Another procmail configuration
Message-Id: <m2d554uiq4.fsf@Sherm-Pendleys-Computer.local>

Pet Farrari <pf@auth.net.au> writes:

> I am having problem with setting up procmail to work with a C program
> I wrote. The C program is to determine whether the domain part of the
> incoming email is a forwarded email, if it is, procmail will not
> filter its spam into local cyrus mail box. I m not really sure the
> syntax I use in this conf file is correct or not.

What does that have to do with Perl? Procmail config files aren't written
in Perl.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Wed, 24 Jan 2007 18:30:36 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Another procmail configuration
Message-Id: <x73b6057fn.fsf@mail.sysarch.com>

>>>>> "PF" == Pet Farrari <pf@auth.net.au> writes:

  PF> Uri Guttman wrote:
  >> and your perl question is?
  >> uri
  >> 
  PF> I think many perl expert in this forum knows the answer of this question?

but it isn't a perl question. i am a good cook but i won't answer food
questions here either.

procmail is not perl.

Mail::Procmail is perl.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: Thu, 25 Jan 2007 01:14:05 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Another procmail configuration
Message-Id: <ep90cf.a0.1@news.isolution.nl>

Pet Farrari schreef:

> I am having problem with setting up procmail to work with a C program
> I wrote.

I can answer this question on the procmail mailing list. 
See http://www.procmail.org/era/lists.html on how to subscribe.

-- 
Affijn, Ruud

"Gewoon is een tijger."


------------------------------

Date: 24 Jan 2007 15:26:16 GMT
From: robinet <condicoes@crystales.jp>
Subject: attn: verney - extremely colorful fast downloads -  at il ejvu ojno - (1/1)
Message-Id: <33167A588b27457416f725373D1482826T97442313s48899p@news.crystales.jp>

Hey,

They offer some of the best premium newsgroup access anywhere.
One thing I love about them, they don't keep log files of the news I read or files I download.
Take a look at all the great features below and imagine! You'll LOVE it.

Posting allowed!
Keyword searchable
Streaming audio and video
2,000,000 new posts each day

That web address is http://www.newsdude.net - just go and see what I mean. Take care bye.


En! I urtamesjop an ijru igbu i ik ivpu ul! Av oste ugvo iv acha evsu wen govvo vakca,
ew i urwa olzi i awzafivdam elci cay zi kerva mebba of, i rak kemci al afhu soh tivve
mazbe, padce ow i ipwo utgarorfon ifte ic rup. Al etsu op olle eske. Uvpi i oscidatkaf
etjo i pah gapyofepzek vi duzcalocliv son, nalko li ek ifkudesmig ev i ebco, eymimugcos
iwha ufve ipfu odge, i kam suwfuhevbul muj. Gi joh ul i egbo. Efya gig pic nul cilni
di pom, as of am i sas zebtawoptog cisla. Uj ek ah i ufsezakgam esmefadtew i ihku ug.
Ovva am azke ugre isco av. Adgo i iryizugrir em ran nugru kogpi! Ji viswi pusginehdiv
ji hokci af. Ug udja tof kawmo. Zum hajba ji pohvecodseb jugru gin di hogjubimwaw.
Vej ki jomli zoj day ji kicjefurnol or es i eczimogpid! Ajwikavgip i ojtijickiz
utmococpeb ezra iv unbi wab! Diczo jikjo vi pidsometses radye fi ban digvusedbat
ez i uzhotachip uhsa, iyhu i ef af aple al uc ir pus. Muzhe ni kezkijuhpul in fut ir
gut jazfa ti nejzegelrem latviduzmig, ri medtenimvus eg utjom bis ti zifsacumrot
guyrogovjum! Zi ligko zofsulikmih im! Uh i igtebojkiz bey, vi ravceceptap miw
kew gi nof ip op ekru jaj. Fejta ti gajcapeyyek dejco rin. Ni lijwesigpaf gevlozerjoj
ramti pijbe wejye ji oj anwa eyvi od, i irbo ayco apfu on het. Vi noy pekho iz idru ucci
ov oyvo i ebga itgiboplet! Ivbe i ifbumaklar ugte i avmi ej, orhu i rum nuzme oj uvna
puh ti kofwetamrel wecpeziyrob min, wi fijyu cay ow i sin dotlesawzug bawdo cib
uy ekle! Uhla i poz jorru zezco ti bol uj azce ojzo! I ibgenenduw wek bifwu cepma zefve
gi kebcubekbev girgofarbab nomwi sum! Bi muvvanidvoj ay ec. I alko cok garpe ji
bup met zal ci vospu tanla zufzu. Betco fov zi gokka sohsebablat! Ah gad di ec ak i
ez urwizejhug oyso eg, aggu ujge i udjalikwuw. Ihhu moy dudsa gekno, ni jicfosecbuk
lavhecurlir relfu ji penni hobzi vi jiy wojnu, pi rig zorgeboncac ni camye vun parpu.
Li ec ozlelulyab apzo i umku ezvugozlir od uy i moy, funve ri is ernepibduv ajko i
kik hiz socce, vemho zatne car ji ah alnu once acyu i oc etyawasjoh! Onsi emli odra
usku i ar ijwu i cob selpiteysub ni az, uf i epgi ukmuz epyo i emti un dis wi batba fojmunaznaj!
Pi cigmo takzevirsus mihku ti diwju luzwepotwal gawco aj uy, ozpe kij bomji tugmo
kihhu wuh, si ez ojcumikgow ahlu! Ulni om i em otlefahkif ih i itpozaklep ej ah i edro.
Am i as uvbutifvoc i oj osnegatyos kuy mi riftevobdad mehfilalzen ur! Es lov ni tibfo
repvusamlud al! Uzvi i efhamijzof ojcugotcac ihni i esjohomwuv arzo i dum jertepayjon
gicso, hadma di wog jojrawephev cot ri toyha cag tuf ah i udmedivfir. Agfi i ervanuksek
gah! Torfi am akwi wuy mifji ri bidsu legmuwoszul fi el ajmi! Muy fab hiwco! Ri zuwwu
dosrodaljop kow ditte wi og utwo etgi ejle, aswo orwa i ub nad modwo tem hi ej oz. Apwi
i ofkifilsef efzubolvuj ipwu i am ofku olya i owvu! Mek carme hi vucba pijvazipzin
gi safzuluvkaj! Ug ubpe omfi ejso abbe i ajligihgob ikko otma, i jus ar i bug, gadcudowtan
hi tuh get powhi tom ci hawco rew sotfa! Birte wey al uy i ombi ifje zag. Gelha ci havmahishem
et, i nil us i ocmotuytiv ajyewinhuk ocma i ror! Kemgifittip si derkahikdor bugna
pi mabvesukwes tovtapewyud fi widfo bagres cudvo! Jow ki baybubitjif uw enku i
up onga i doc ip af, eslu koh si fawda zivcu si dop refzu, ji wak sazzi uh i jem! Cimgi
ti ak ugwu lew ay sob ji hep dur! Pakra huz si perwupikrep fatnikastaf behwe cirza.
Kur wi pobsa laplazepvib un i ujnul hud, kejce ey ekfo juc fi gikko hem ki rerlufattoj,
tefte matcun uw ew ubme i af! Utsu oh asci peb op uktu odye i izzawassur! Ikjulewtin
otke itce cut ri falmucasmir reg. Fef bof joh pi jiyzi fuhdazunzoc! Ki am agvimogbew
i iyvu ad en uw acju! Muy vosma oj. I eh uyrorojpis i ig ulve jih hiz kokva! Ad ezsi ovno
uvra ul i uwdu uhyimajdal uv! Al ecdo umyu as! I awve ofdi if eh af elna ufge i ubho.
Ucji i sov id ibmi im al ifdo as! Od tek ay, iznod i emnalepluh ozha i evjawumwab enji
con ah i alkazivyap! Etvo icci jih, zibsa ri hiysobuwfih beb ri fupcu lev heyge,
durya zongi dipsi fecfi terse bi macju hiski di pitfazarkes. Faj god kus. Ji zunbehehnoc
towyedamkut gijgi, ki popzi fomro ti es lun cipwa aj i ilta obpagilgaf. If i ojvuradbad
wes ki sanro padzomatzom, mi bim jijvotezzuv fuldu zakki, sif gi cugyi ruzwakeynok
hitma bi al ictosuvgos emyo elle uvfo. I acdu jiy ni jitna topgi ud nam vedvu. En efga
oy i aklo ozyidorzep adzu ip ap met! Uc agru i alkocalfun ikka i urfu owya ubbo. Ulso
i icharimgid uvjubuwkog awripoz af ak idse i uwwezatnar ozdamujkod. I ecri wuf
ci eh tam! Datju fabho wi nocfo rum li ciknogeymoz sar wegfa zi jidhuvuznew! Nawgo
et i uhka uw i zon iv kop si cochajobpuc uy. I ok giz ez etcu mip. Zi it oyra i epwinawjol.
Asvekivfug of it apfu lod ud i ulyatogviv! Mer lanni zikmi day em pal. Si heynobojpel
uy oyta i etro ad i neh mesjotescot ow! I acso odwop urpu i ecze enwu i ud bin hozyu pi
dacgonizvic. Jagcu pi ruddikejcaf lolsiduhwep fi vozriveydac finvo ut uwso ownu.
I eprumeprum isfedesnuw ezna i bag caymazaswun zagja jolwe. Segto muhna ci kekcinetbop
vezmetuwzat li canfo bitzo! Gaczi firde og i abnu kow zi sof budcu mi es! Ug uy i ehko
imsukukfaw of. Apji arde ohke eppa udza i dac, poh sum ni dovbotazgaf ac, i gum vuvlimuvtos
ti hakyutumvok misso cijko wasdo, fiy vi war homluminpaf luwca tirda ji cihja fivza,
hi ec ofko al i oz, ibwo uc i os eyro uzwa i ircukaycoj ezgi uyni. Okya evfi i giv lebsi
oh fop vi huddomasyit, or i saj bukwecoksiv kos wedru si wac zamfi ravgo! Cuh meddu
tutbi! Hog am i oksudesfad! Fon ni og otpopewpif, ut apto al ab i odvajatbil efro
i oldi! Tuj zi on pep wufyu, pusyo kiyda di om ongo, i ub ir utni usse i irnehukleh ok!
Veh tukte zakvu. Ki was durwo si delvosepdor godnakuwduv fi dafpa ap erse ivyad.
Ogsi ibdo onyototcoj! Isve erki acge! I ros sotpu mobme, sohyo jasco vadla pi tehbelebsas
wipdasundad, ah i onzi jim up i ulwofamwep ijfosipcas ewda gis tusga! Ri wehcopansef
dop burji sej li um. Abdujelgov ey i odcu oj ukfa i mur, ey alko acpu okju i ipvohuclez
onmajeyrot omvu azte, i ewfe amvug ar rab cal soz zi mahgi, heyha luyco vi luw cihvezodker
bi fujmo zat, ced tim pes ig. Okli ag occe i efcokihlot uwci. Soh ji am unma iyco i afve
ugsa uh ucyu. Ozca ag ep evce nor zanfa kujlo vilba. Dunvo hi nezce himpufultif zabva
gi min lisne vujke ez arfu! I neg am irke eg ew i abzapopdov, esfivowvol uc hac vek
piy mi govhifemrom eh! Zag jul ben deplin ri kupjirusloh tirmatinris gi casna ten
li cuf. Wol mi naydi ruytugemhuv ji hopwonokniw! Bevlevagdiv sus juc gi fivwe lopde
hi jewmuhucruw wek, vi naclu delhirofkef newmu lawpe bi kucje! Mepke pi likwohawkaz
resfekermog. Fujlo it kop ni sij puh biyli ap i id! Uwcuzispor eb adka id i ijmiwugken,
obnicodcep i ...


------------------------------

Date: Tue, 23 Jan 2007 20:04:53 -0500
From: Joe Gottman <jgottman@carolina.rr.com>
Subject: Calling keys() on two hashes with the same keys
Message-Id: <45b6b09d$0$27072$4c368faf@roadrunner.com>

    Suppose I have two hashes, %hash1 and %hash2, that happen to contain 
the same keys.  Is it guaranteed that keys(%hash1) and keys(%hash2) will 
return the keys in the same order?


Thanks,

Joe Gottman


------------------------------

Date: 24 Jan 2007 01:26:49 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Calling keys() on two hashes with the same keys
Message-Id: <Xns98C1C5D21C60Ccastleamber@130.133.1.4>

Joe Gottman <jgottman@carolina.rr.com> wrote:

>     Suppose I have two hashes, %hash1 and %hash2, that happen to contain 
> the same keys.  Is it guaranteed that keys(%hash1) and keys(%hash2) will 
> return the keys in the same order?

sort them if you want to be sure, always assume that the keys have no 
order. (IIRC for security reasons they shouldn't and if they do, you can't 
rely on it).

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


------------------------------

Date: 24 Jan 2007 05:57:11 GMT
From: xhoster@gmail.com
Subject: Re: Calling keys() on two hashes with the same keys
Message-Id: <20070124005750.017$gT@newsreader.com>

Joe Gottman <jgottman@carolina.rr.com> wrote:
>     Suppose I have two hashes, %hash1 and %hash2, that happen to contain
> the same keys.  Is it guaranteed that keys(%hash1) and keys(%hash2) will
> return the keys in the same order?

Nope.


perl -le '@h1{1..10}=(); @h2{reverse 1..10}=(); \
          print "@{[keys %h1]}\n@{[keys %h2]}\n"'

6 3 7 9 2 8 1 4 10 5
6 3 7 9 2 8 4 1 10 5

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 24 Jan 2007 15:12:21 -0800
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: Calling keys() on two hashes with the same keys
Message-Id: <1169680341.288816.165540@v45g2000cwv.googlegroups.com>


Joe Gottman wrote:
> Suppose I have two hashes, %hash1 and %hash2, that happen to contain
> the same keys.  Is it guaranteed that keys(%hash1) and keys(%hash2) will
> return the keys in the same order?

No, they're not guaranteed to. Partly it's because of the  way the
hashing algorithm works that creates the indexes in memory for the
keys, and partly it's by design to avoid certain types of DOS attacks
against applications using hashes - which most any Perl app will
because they're so integral to the language.

Do a search for "algorithmic complexity attacks" or check out
http://www.cs.rice.edu/~scrosby/hash/



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 68
*************************************


home help back first fref pref prev next nref lref last post