procmail
[Top] [All Lists]

Re: problem distributing mail from a POP mailbox :((

1996-01-12 12:35:36
On Fri, 12 Jan 1996, Michel Coste wrote:

You wrote sometime ago (and I didn't saw any answer...):

hello, I'm using linux and I'm connected to Internet with an
Internet access provider. I have a POP mailbox. When I get my mail
(w/ popclient) it goes to a single user (I've created a special
user called 'maildist').

I'm in the same case as you and for sure (see: (*)) the standard
procmail setup doesn't work with this configuration...
I'm puzzled why it's so rare to see this case here! Are you all
connected directly to the Internet????


This user has a ..forward file and a .procmailrc with receipes
that let him distribute the mail to the different users (to their
mail spool dir /usr/spool/mail/$USER), and setting a special user
that will receive all the mail that haven't been distributed
(because no matching receipes) via the $DEFAULT variable.

Maybe /etc/procmailrc should work without creating a special user?

Then each user will have a .forward and put their own mail in the
right folders. But will procmail being executed when they'll
receive the mail in their spool dir from the user maildist ?

Anyone knows how to do that properly ? (with an exemple please).
Stephen R. van den Berg has told me to use the
"procmail -d recipient" command to deliver the mail to individual
users, but I can't figure how to use it. Any exemple ?

Thank you very much.



ps: I've done a procmailrc script for the maildist user that
distributes the mail to the different users but it work only for
_local_ delivery mail ! (why?!) --

(*) Just because there is no invocation of sendmail when you get mail
from a pop account! But when you send _local_ you run sendmail...
I think one solution could be a script to launch procmail from ipdown.
But what when we get connected one hour or more? We would have to wait
to quit ppp to be able to read new mail...
And a script launched by crontab.local would not be much elegant too...


What is the right solution??????

Michel, 

        I believe that the right solution is to, somehow, throw the stuff
we fetch using POP-3 or whatever on sendmail locally, and have sendmail
configured with xaliases a' la' IDA-sendmail so sendmail 'knows' that
e.g. Leif(_dot_)Erlingsson(_at_)mailbox(_dot_)swipnet(_dot_)se is a local user.

Another user could use the real account name - my wife uses that.
xaliasing (generics.db) would take care of sending her mail to her.

I believe sendmail can be configured to call on e.g. procmail or other
programs to decide who to deliver to. And of course, procmail should be
the local delivery agent!

The tricky part in all this is to reformat the mailbox into something
that can be handled by sendmail properly. I have a hunch that TIS
firewall toolkit's smapd and smap programs, that are public domain,
can be modified to do the trick! (What they usually do is smap listens on
port 25 and receives all mail into a special spooling directory. smapd
picks the mails up and feeds them into sendmail. sendmail itself does not
listen to port 25 - for security reasons.)

I intend to work on this --- someday!

(Currently I use a hack - one of my mailfolders is emptied every 5 minutes and
delivered to my wife's inbox.)

-- Leif

Hyvaa Joulua ja Onnellista uutta vuotta! --> Merry Christmas and Happy New 
Year!
----------------------------------------------
Alexandre Molari *** Geneva, Switzerland molari(_at_)iprolink(_dot_)ch
----------------------------------------------------------+
__________________________________________________
Michel Coste  <mailto:mic(_at_)micmac(_dot_)com>
MiCMAC - Online Publishing  <http://www.micmac.com>

-- Leif Erlingsson, http://www.geocities.com/RodeoDrive/1998, +46 8 604 0995
                        Use the Internet Address Finder, http://www.iaf.net