procmail
[Top] [All Lists]

Delivering to several users

1996-11-13 03:13:35
Hi!

At our ISP we have our own domain.
All mail sent to anyone @our.domain goes into one
main account.

I have set up a Linux-box to act as a mailserver.

To fetch the mail I use popclient:
popclient -3 -s -u $POPUSER -p $POPPASS -o $TEMPMAIL $POPSERVER

And to sort out mail to my local users:
cat $TEMPMAIL | /usr/local/bin/formail -I Status: -ds /usr/local/bin/procmail

This is run by cron as root. And have a .procmailrc in /root

Is this ok btw?

--- Start .procmailrc ---

# Please check if all the paths in PATH are reachable, remove the ones that
# are not.
#VERBOSE=on
HOME=/root
PATH=$HOME:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail                      # You'd better make sure it exists
DEFAULT=/var/spool/mail/root
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail
SHELL=/bin/sh
#LOGABSTRACT=on

# To make a backup of all incoming mail in case
# some one looses his mail-folder:
:0 c
safe.copy

:0
* ^TOtore.andersson
!tore

:0
* ^TOper.brorson
!per

[ Deleted ~20 users for readability ]

# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT

--- End .procmailrc ---

- All mail gets copied into safe.copy alright
- Mail for a user gets delivered alright.
- Other mail goes into $DEFAULT alright.

But what happens if someone sends a mail to "tore" AND "per" ?

When matching "tore" the recipe is finished and next mail is
processed.

Or isn't it?

Do I have to add a c-flag on every recipe?
Then $DEFAULT will also get a copy of all mail?

How about lockfiles?
Do I have to use ":" on all recipes?
 (probably not becasue "!user" invokes sendmail, or what?)

Any comments, tips, hints?

Another question:
How can I use /etc/aliases instead of specifying all users?

/etc/aliases:
tore.andersson :tore
per.brorson    :per

Whee.. that was a lot of questions! Sorry!

Maybe someone have done tha same thing?
If so: please can I have a look at your .procmailrc file?

regards Martin/

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