[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Copy & forward email
- Subject: RE: [cobalt-users] Copy & forward email
- From: "Colin J. Raven" <cjraven@xxxxxxxxxxx>
- Date: Wed May 16 00:10:06 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> so ....I have two servers which handle mail, My raq 3 recieves and i
> have a mail server that only excepts from certain domains,
OK, so this being a coblat list, I assume that we're dealing with the
RAQ :-)
Some of the comments you made in this post aren't clear,
but I kept them in there for contextual purposes. It might matter in 2-3
posts from now :-)
> one of my clients in automatically forwarding copies of their mail on
to accounts
> not on their domain,
Uuuhhh, not sure I understand the meaning of this at all.
> this means that all this forwarded mail get blocked
> by my other server.
<baffled look> you're not making this easy...what does the "other
server"
have to do with mail handling for *one* domain?
> I want to know if there's any way that we can set the
> raq to keep 1 copy of the mail and forward the rest on to each
individual
> mail account.
err...ummm...getting clearer now...I think. See below
> It is currently set up as a catchall account which is then
> accessed by my clients office mail server.
> So we'd like a way that doesn't involve
> creating up all the individual users on the raq.
Your answer is procmail.
In /etc/procmailrc (the global procmailrc file) you should probably have
something like this;
decide where you want a logfile, touch and chmod 600
Be sure to set VERBOSE=ON
to allow you to see debug output. Watch your logfile size since if the
domain gets a lot of traffic
the log will grow VERY quickly. When you are satisfied that everything
is working, turn verbose logging off
but set LOGABSTRACT=ALL instead which will write out a modified (and
leaner)logfile. Even so, you may want
to logrotate the procmail logfile. Your call.
If you don't want to mess with logrotate, you could roll your own
solution as follows:
If the siteadmin doesn't have shell access, (although I can't think why
this might be) I'd write a small tar/gzip backup script that grabs the
contents of the siteradmin's mail directory and cron it to run daily at
some ungodly quiet hour. Maybe stuff the thing in an FTP directory for
good measure so that the client can grab it (even if they can't do
anything with it, they can always send it back to you for opening if
necessary)
-------------------<cut below this line>-----------
#Catches all mail and stuffs a *carbon-copy*
#of the mail into the siteadmin's maildir
#leaves the mail in the spool to be grabbed
#by _some_ external mail server via _some_
#retrieval method
#
#uses a lockfile to prevent a bigmess (tm)
#if several procmail processes are concurrently
#writing to the maildir
#
#use of the TO_ macro catches Cc's as well as
#mail sent directly to the domain
#
#to deploy:
#Right after the macro underscore (* ^TO_) substitute your domain_name
#_without a space between the underscore and the domain name_
#
#note that the mailpath is ficticious of course
#a figment of the imagination
#adjust to suit your environment
:0c :
* ^TO_customer_domain\.com
/home/sites/site69/users/site_admin_dude/mail
HTH
Groetjes,
-Colin
--
Colin J. Raven