From: bart(_dot_)haezeleer(_at_)ping(_dot_)be (Bart Haezeleer)
Subject: Double messages : (prior : Lost messsages ?)
Hi,
I want to give 'my users' of my Linux-box an Internet valid e-mail address.
Because they only want a e-mail address I don't want to spend money to a extra
PPP-account/user with my ISP and my ISP isn't very Linux minded.
I have the same setup.
1) Via www.pobox.com I can create aliases let say user1(_at_)pobox(_dot_)com,
user2(_at_)pobox(_dot_)com, ...
Yepp.
2) They redirect all the aliases to my PPP-account (e.g.
account(_at_)ISP(_dot_)com)
Yepp.
3) At my linux box I must split all the messages again to the different users.
user1(_at_)pobox(_dot_)com goes in IN.user1
user2(_at_)pobox(_dot_)com IN.user2
How do You get the mails from the ISP?
Why not use sendmail for delivery?
:0
* ^TOuser
!user <----- deliver to user using sendmail
For the moment I'm testing the output in files.
To create a file like I'll get later with POBOX, I sent a message to a few
users and concatinated the mail-files (/var/spool/mail)
The problem is the following :
If someone send a message to user1(_at_)pobox(_dot_)com and
user2(_at_)pobox(_dot_)com
e.g. All the users for whom it concern gets the messages X number of times.
X = number of users for whom it concern. Here 2 times.
Strange...
The following files are kept in the account who can read e-mail from the
internet :
~/.procmail/rc.testing :
------------------------
:0c:
* ^TOuser1*
IN.user1
:0c:
* ^TO.*user2*
IN.user2
:0c:
* ^TO.*user3*
IN.user3
:0
* ^TO (user1|user2|user3)
/dev/null
~/.forward :
------------
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #user0"
~/.procmailrc :
---------------
VERBOSE=off
Try VERBOSE=on and LOGABSTRACT=on
and examine the log.
MAILDIR=$HOME/mail
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/rc.testing
INCLUDERC=$PMDIR/rc.maillists
THX
I use popclient: (as root)
popclient -3 -s -u POPUSER -p POPPASS -o /tmp/incomming POPSERVER
and then: (also as root)
cat /tmp/incomming | formail -I Status: -ds procmail
/root/.procmailrc:
-------------------
VERBOSE=on
HOME=/root
PATH=$HOME:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail
DEFAULT=/var/spool/mail/root
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail
SHELL=/bin/sh
LOGABSTRACT=on
# For backup if a user deletes his mailbox...
:0 c
safe.copy
:0 c
* ^TO*user1*
!user1
:0 c
* ^TO*user2*
!user2
..etc..
:0
* ^TO(*user1*|*user2*|*user3*| .... )
/dev/null
# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT
-------------------
This works great for me!
No .forward is used as I from popclient save incomming mail
in a temporary file.
Then cat fil | procmail
Hope this helps!
Regards
Martin Wahlstr\xF6m/