procmail
[Top] [All Lists]

Re: Newbie questions...

1997-09-11 13:32:36
At 09:02 PM 9/11/97 +0200, jacek(_at_)netcologne(_dot_)de wrote:

well I'd like to setup a procmailfilter. Currently I have only ftp
access to the server...and I suppose that it's not possible to upload
dotfiles.

Uh oh, timewarp - my reality is bending...

What exactly is the problem with uploading dotfiles.  You mean on your
local machine (prob, non-unix) you can't create a dotfile?  try this:

locally edit "procmailrc" and "forward".

use FTP client to upload:

put procmailrc .procmailrc
put forward .forward

This would send the local non-dotted files to the remote system as dotted
files.

Your biggest issue with FTP will be setting file modes if the umask isn't
friendly.

My question is, whether I'll only need to let the sysadmin put a
.procmailrc file into my home dir? As much as I know, the server is
running sendmail and procmail for local delivery...

See above.  If you can't FTP it though, yes, the admin should be the one to
set it up.

Note of course that simply having an FTP space doesn't constitute that as
being your home directory where procmail and .forward would go.

If this remains the case, I would suggest setting yourself down and writing
a filter to allow you to replace files via email.  No, I don't have one -
have no need for it.

Do I have to setup any PATH data, or do I just enter my recipies??

It'd be a good idea to set up a path (I like having everything explicitly
declared), but as I recall some things will be there by default.  Don't
count on anything YOU haven't set yourself though.

How would I setup a .procmailrc and a non dot file containing the
headers etc. to filter?

Well, ALL of it could be in the .procmailrc, though I prefer to use INCLUDE
statements to include "child" recipes.  This modularizes the recipes greatly.

I would suggest poking through the procmail archives and pulling out some
of the ready-made base configurations you should find there.

Can someone give me a recipie which would bounce the unwanted mails with
an Exitcode? As I said, we have no shell accounts due to security.

If you have no shell account, then how is it you expect to be able to have
a .procmail.  How do you plan to filter mail?  Before asking this list, did
you ask your sysadm whether it is possible with the system?

A simple example of bouncing:

:0 
* ^From:.*some-spammer-address
{ 
        EXITCODE = 77

        :0 
        /dev/null 
}

It should be noted though that bouncing spam is less and less a viable
thing to do -- so much spam is entirely forged that the bounce won't get to
the spammer, and so simply bogs the net with trash.

How to prevent Loops? Is there a FAQ about FROM_DAEMON, FROM_MAILER and
X-Loop??

One method would be to not autoreply to a certain address more than a
certain number of times (say, 3).  If you're autoreplying that many times,
then you're most certainly in a loop or dealing with a dolt user.  Again, I
don't have a system like this set up myself.  I'd be prone to write a small
C app to take the address and check a database - if it isn't there, add it,
and return OK.  If it is there, increment the hit count, and if the hit is
your cutoff, return FAIL, otherwise return OK.  The recipe would continue
on to either ditch the email or autoreply to it, depending on FAIL or PASS
type return.

X-Loop seems to work fine for me, but then, I don't do a lot of autoreply.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395

<Prev in Thread] Current Thread [Next in Thread>