engarde-users May 2002 archive
Main Archive Page > Month Archives  > engarde-users archives
engarde-users: [EnGarde] Re: Procmail & defining Variables:

[EnGarde] Re: Procmail & defining Variables: How do I type question?

From: Pete O'Hara <pete_at_nospam>
Date: Mon May 20 2002 - 13:00:29 GMT
To: engarde-users@engardelinux.org

Jon Wyrick wrote:

> I am not a strings/variable person and need some help so I was wondering if one anyone out there could help me with this question. I am using engarde community as well as pro. I have installed several squirrelmail plugins, one of which is called Block_Senders which has a simple recipe, but the recipe depends on several variables. I can make the recipe work if I remove most of the variables and use actual locations or use it in a local users ~/.procmailrc file. I however do not want to do this. I would like to have this as my Global procmailrc file so that it is system wide. In order to do this I need to know how to define a certain variables.
>
> Essentially I need to know how to define
>
> $HOME so that it is each individual users home/INBOX.Trash
>
> and
>
> $LOGNAME.block which is each users name with .block added to the end ( jon.block)

Read output of "man procmailrc". It talks about the these variables.

>

>
>
> ** Bonus Question:
> Should I have to change anything in my /etc/postfix/main.cf for Procmail to handle other utilities/scripts like Sanitizer (http://www.impsec.org/email-tools/procmail-security.html)?

I haven't looked at Sanitizer so I can't say for sure.

Pete

> I have read all the engarde posts I could and I noticed that one person mentioned his mailbox_command was set as " mailbox_command = /usr/bin/procmail -m /etc/procmailrc " while all I did to make my procmail work was simply create /etc/procmailrc file and put a few simple recipes in it. Nothing else. I originally thought the above was required, so I tried it.. and it didn't seem to work for me, so I reverted back to the default of " mailbox_command = /usr/bin/procmail "
>
> Thanks in advance,
>
> -jon
>
> Recipe is below if it helps
> ---------------------------------------------------------------------------------------------------------
> # This file is to be included in the global procmailrc (/etc/procmailrc) using
> # the INCLUDERC directive. You could also cut and paste this file into an
> # appropriate portion of your global procmailrc file.
> #
> # THE USE OF THIS RECIPE IN YOUR /etc/procmailrc GIVES THIS RECIPE FULL (ROOT)
> # ACCESS TO YOUR SYSTEM. THOUGH EVERY EFFORT HAS BEEN MADE TO ENSURE ITS
> # ACCURACY AND SAFETY, THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF
> # ITS USE. PLEASE BE SURE TO PROPERLY MODIFY THE VARIABLES DIRECTLY BELOW!
>
> # Modify these variable as required for your system setup
>
> # Location of the SquirrelMail user data files
> SQDATA=/home/httpd/mail.mydomain.com-443/html/webmail/data
>
> # Location of the user's SM Trash file ($HOME represents the user's home dir)
> SQTRASH=$HOME/INBOX.Trash
>
> # Full, absolute path of the test utility on the system
> TESTPATH=/usr/bin/test
>
> # Full, absolute path of the formail utility on the system
> FORMAILPATH=/usr/bin/formail
>
> # Full, absolute path of the grep utility on the system
> GREPPATH=/bin/grep
>
> # DO NOT MODIFY ANYTHING BELOW UNLESS YOU (REALLY) KNOW WHAT YOU'RE DOING!
>
> BLOCKLIST=$LOGNAME.block
>
> :0
> * ? $TESTPATH -f $SQDATA/$BLOCKLIST
> {
> # Get the sender's email address
> :0h
> SENDER=|$FORMAILPATH -IReply-To: -rtzxTo:
>
> :0:
> * ? $GREPPATH $SENDER $SQDATA/$BLOCKLIST
> $SQTRASH
> }
>
> ------------------------------------------------------------------------
> To unsubscribe email engarde-users-request@engardelinux.org
> with "unsubscribe" in the subject of the message.
-- Pete O'Hara Systems Engineer Guardian Digital, Inc. ------------------------------------------------------------------------ To unsubscribe email engarde-users-request@engardelinux.org with "unsubscribe" in the subject of the message.