l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Jun 07 02:32

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] spamassassin + procmail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] spamassassin + procmail

Milver S. Nisay said:
> hi guys,
> i am trying to call a shell script before SENDMAIL will deliver a mail
> message,
> can it be done using procmail ? if so, any hints?
> can anyone advise me on this. thanks in advance.
> //milver

This may be of some help. Here is a generic Template with some basic vars
as used in a .procmailrc to get you started:

(You can see several examples of prgrams being called from the script and
you should be able to find a way to work one of these into call a prgram
at a specific time in processing of a message.)

(If you find you have problems, you can always create a "wrapper" script
which includes a "cat" and a subsection which does other things. Then when
you pipe things through this script, it spits out what it gets, *and* does
your extra "sub commands" when it is called. (one of those interesting
tricks I have used.)

----------------cut after this line --------------
#Set on when debugging settings
#How to "run" things we call:
#Path for Shell:
#Dynamic username loading:

#If you use "MailDir" format, make sure the path to the mail
# storgae ends with a "/"
#If you are using mbox, then make sure it sends without a "/"

#Your mail directory
# optional:

# Include user-specific files:

# I have an alias for abuse reports of spam to me:
# If "to" a user, put in one folder:
:0 H
* ^To:.*spam@passwall.com

# Many ways to do this:
# If message size is less than 356kB, then call pipe message through
#  program: (SpamAssassin has a feature for this too)
* < 256000
|/usr/local/bin/spamc -f

# If marked as sam, put in spam maildir:
:0 H
* ^X-Spam-Status: Yes

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped.  This will re-add it.
:0 H
* ! ^From[ ]
* ^rom[ ]
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e 's/^rom /From /'

#Our default catch-all:

--------------------cut above here-----------------


vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.