procmail
[Top] [All Lists]

Re: Primitive things

1997-02-21 19:15:43
Primitive answers!

On Fri, 21 Feb 1997, [iso-8859-1] Narve Sætre wrote:
2) I have my own domain, narve.com. So all mails to 
whatever(_at_)narve(_dot_)com
are forwarded to my real adress. 
(s432(_at_)lstud(_dot_)ii(_dot_)uib(_dot_)no). 
Normally, I use narve(_at_)narve(_dot_)com as my email adress. 

I would like to have some simple services: 

- Aliasing: mail to myfriend(_at_)narve(_dot_)com should be forwarded (or 
bounced, to
be precise) to, lets say myfriend(_at_)anotherdomain(_dot_)com

is the following correct: 

:0 :
* ^TOmyfriend(_at_)narve(_dot_)com
! myfriend(_at_)anotherdomain(_dot_)com

Change the ":0 :" to ":0". you don't need the file locking, (provided
by the second colon,) on a recipe that doesn't write to a file.

It seems to be working, but I'm not sure... And if I add one c ( :0 c: )
in the first line, would I get a copy myself then? 

:0c     Will ensure that a copy of the mail continues in your
procmail. If nothing else does something with it and if your DEFAULT
is your mail-spool, then it will go to your mail-spool.

- Simple mailing lists: mail to mygroup(_at_)narve(_dot_)com should be 
forwarded to
several persons, of which I am one: 

All of your examples loop the mail back to you. To avoid that, you
need to _not_ loop a copy to yourself, but put your copy directly in a
file. Below is an example of a brutally primitive mailinglist that may
work for your application. It is not as good as it should be because
it doesn't modify the headers the way one ought to when creating an
automated mailinglist. Headers are modified with formail. See the
manpages for that info. If any of your recipients might even
accidentally send an automated reply to the list, you could have an
endless loop, so this example is _not_ recommended for general use
beyond a tiny number of trusted users.

## begin example ##

:0      # Intercept mail to list _and_ from any listmember.
* ^TOmygroup(_at_)narve(_dot_)com
* ^From:.*(user(_at_)some(_dot_)site|\
user(_at_)anutha(_dot_)site|\
user(_at_)yetanutha(_dot_)site|\
YOU(_at_)YOUR(_dot_)ADDRESS)
{
        :0c     # Mail a copy to all recipients _except_ list-owner.
        ! user(_at_)some(_dot_)site, user(_at_)anutha(_dot_)site, 
user(_at_)yetanutha(_dot_)site

        :0:     # Put my copy in my mailbox.
        $DEFAULT
}

## end example ##

I actually run a slightly more complex version for banter between some
family and friends. It works quite well, and doesn't get junkmail. The
part of my list that I omitted in the example was using formail to
customize the header of outgoing mail.

- Finally, I would like to have a simple file server service; is there any
(readable) introduction to this? The procmailrc manual file isn't very
intuitive... But this can wait, the most important thing is to get the
mailing lists working. 

Get the manpage for procmailex for the above. You probably want to get
all the following manpages:
        procmail
        procmailrc
        procmailex
        formail
        sendmail

There is another program in the procmail groupo called Smartlist that
you should look into if you are going to run a mailinglist.

Lastly, I am certain others will point you to some other recources.

David Hunt <dnhunt(_at_)rain(_dot_)org>


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