[CLUE-Tech] .forward question

Adam Bultman adamb at glaven.org
Thu May 29 12:40:29 MDT 2003


> Yeah, I have procmail running SA, but I use sendmail, that's why I have 
> to launch procmail using the .forward file.  I don't know of another way 
> to do it since I'm very, very new to using procmail.  And I have another 
> question about this config... this line:


sendmail will call procmail directly if it is in the .cf file: 

- cut from sendmail.cf - 
Mlocal,         P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, 
S=EnvFromL/HdrFromL,
 R=EnvToL/HdrToL,
                T=DNS/RFC822/X-Unix,
                A=procmail -Y -a $h -d $u
- end cut -

If you build procmail into your cf file (via the mc file) it'll just call 
it directly and deliver it according to your ~/.procmailrc file (or 
/etc/procmailrc, if it exists, I think).  If the above lines aren't in 
your .cf file, you might want to regenerate it using the mc file (easy).  
You can write/IM me if you need help with that, it's not always obvious 
how to do it at first.



As for :0: , I think it just locks the file before writing.

:0fw

Will lock, fix the 'From' line (the f option explained in 'man
procmailex') and the w makes sure that the lockfile isn't removed until
the pipe is finished.

I *think*.  :)

Adam

> 
> :0:
> 
> What does it do differently than this line:
> 
> :0fw
> 
> I think I pretty much understand this config - I think that the mail 
> gets a first pass through procmail and if it's less than 256k, SA scans 
> it.  Then it passes through again, and if it's flagged as spam, it gets 
> dumped in "spam".  Then, if it's not spam, it gets forwarded.  And yeah, 
> I may want him to be able to read his spam... but the reason I'm running 
> SA through his mail first is because somehow he got on a bunch of porn 
> mailing lists (I won't ask) and when the mail gets bounced to his other 
> account dave at somewhere.com, the spam blocking software on their server 
> sends it right back to my server, which tries to bounce it back to the 
> source.  Most spam doesn't resolve, so the mail bounces back to the root 
> account mail box as undeliverable mail after 4 hours.  It's ticking me 
> off since it all gets bounced back to my server which really has nothing 
> to do with it, so I wouldn't mind sending it directly to /dev/null so 
> that other server doesn't waste any more of my servers resources by 
> sending back through me.
> 
> Adam Bultman wrote:
> 
> >If you have procmail installed, and sendmail uses it to deliver the mail 
> >(as opposed to something else), you could do this:
> >
> >
> >.procmailrc:
> >
> >:0fw
> >* < 256000
> >| /usr/bin/spamc
> >
> >:0:
> >* ^X-Spam-Status: Yes
> >spam
> >
> >:0:
> >! some at where.com
> >
> >I *think* that should run spamassassin on everything smaller than 256k, 
> >filter the spam to spam, and then forward the rest to the new address.  
> >I'm not sure if curly braces are needed... just a second... Nope. Not 
> >needed.  
> >
> >If you don't like that many rules, or are afraid stuff might drop through, 
> >you could put the spam-status to 'yes', and forward that stuff on.  Same 
> >thing, different way.  
> >
> >a 'man procmailex' will get you tons of info on procmail.   Remember that 
> >you can set the threshold on SA and that you might want to give him the 
> >option of reading his spam, since every now and then stuff gets flagged as 
> >spam when it isn't really spam.
> >
> >HTH
> >
> >Adam
> >  
> >
> 
> 



More information about the clue-tech mailing list