[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Copying Mail
- Subject: RE: [cobalt-users] Copying Mail
- From: "Colin J. Raven" <cjraven@xxxxxxxxxxx>
- Date: Thu Sep 6 21:58:17 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> RaQ4R - I want to copy mail from a user to another user. If I forward
> mail, the original user doesn't receive the message. How can this be
> achieved please.
>
Easily achieved with procmail.
In /etc create a file called procmailrc
chmod it to 700
using your favorite text editor (vi, emacs, pico, joe, jove..whatever)open
the file and at the top put something like this: (tweak to your local
settings)
-------------------------cut below this line----------------------------
SHELL=/bin/sh #leave this as-is, don't touch it!!
VERBOSE=ON #set to off once you know everything is working
MAILDIR=$HOME/mail
LOGFILE=/home/mylogs/procmaillog #create this dir & file
#and also chmod dir & file to 700
LOGABSTRACT=ALL
#man procmailrc for more cool variables, this will get you started
####################################################################
#now to business
:0
* ^To: .*\<user@sitename\.tld>
{
:0c
! otheruser@xxxxxxxxxxxx
}
-------------------------cut above this line-----------------------------
Read the logfile and ensure that test mail is going where the recipe states
it should, when you are completely satisfied that all is working as it
should, return to /etc/procmailrc and set VERBOSE=OFF which will give you an
abbreviated logfile.
Make sure you either do up a shell script or else add the logfile to your
logrotataion 'cos the file will grow huge if there is any appreciable
traffic to the users account.
Once this is working, read up on the following:
man:
procmail
procmailrc
procmailex
procmailsc
If anything misfires or refuses to work, post your log to the list and we'll
help you out.
Good luck with your first exploration of procmail.
HTH
Groetjes,
-Colin
--
Colin J. Raven