procmail
[Top] [All Lists]

procmail question about ^TO

1996-05-23 16:12:27
Hi.
        I am new to the list, but I have been lurking for a few months.  My
workload doesn't alow me to read *every* message to the list, but I catch
as much as I can, and I'm learning procmail quickly.  This is a great list.

        But all that aside I do have a question.

        I set up procmail on our system and I use it for clients who have
their own registered domains.  Basically, anything that is addressed to
anybody at that domain gets delivered to their mailbox on our mailserver.
Normally they just dial up and download it all via pop3.

        But some of them are "real" companies, and they'll have up to ten
different accounts on our system, each of whom wants to get email sent to
them(_at_)theircompany(_dot_)com(_dot_)  So I set up procmail in the company's 
mail account
to bounce messages addressed to sombody(_at_)companyx(_dot_)com to
anotherbox(_at_)someplace(_dot_)com(_dot_)  Someplace.com can be my system or 
anyplace else
(even Compu$serve and AOL).

        I don't know if procmail is the best way to do this but I like it
so far and it's been enough of a challenge to set up properly to keep me
interested.  Maybe if I ever figure out how to make an autoresponder or a
mailing list I'll do that too, but nobody has asked me for one yet...

        So.  Right now I have things set up farily standard.  The .forward
looks like this:

"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #companyx"

        It seems to work fine in BSDI.

        Procmailrc sets variables and includes rc.companyx in the
$HOME/.procmail directory.  Nothing fancy.

        The rc.companyx file looks like this:

:0
* ^TO_{dummy|oneguy|oneguy2|otherguy|sebby|sbern|dummy}
{
        :0 c
        * ^TO{dummy|oneguy|oneguy2|dummy}
        !someone(_at_)somewhere(_dot_)else

        :0 c
        * ^TOotherguy
        !anotherone(_at_)eclipse(_dot_)net

        :0 c
        * ^TO{dummy|sebby|sbern|dummy}
        !sbern(_at_)eclipse(_dot_)net

        :0
        /dev/null
                                }

:0 E
!defaultaddress(_at_)eclipse(_dot_)net

        Obviously, I am sbern and I include myself in there so I can test
things out without sending someone else 2000 test messages that they won't
know what to do with.

        I have come up with this setup after some experimenting and I would
be happy to explain to those who ask why I do it this way, but it isn't
necessarily on point to my problem.  I'm long-winded enough already.

        The problem is that when I send messages to 
oneguy(_at_)companyx(_dot_)com or
anotherguy(_at_)companyx(_dot_)com, I get a copy of the message.  My address,
sbern(_at_)eclipse(_dot_)net appears in the header in the From: field but not 
in any
of the To: or Cc: fields.

        There are no errors in the log file.  With verbose mode switched on
everything operates as it should, except that it shows a match on the third
nested condition when it should show no match.  I'll send a copy to anyone
who wants one.  I can't figure out why it's doing this.  Perhaps there is
something I don't understand about the ^TO condition?

        Well, anyway, if you have any hints, suggestions, or helpful tips I
would greatly appreciate them.  Flames should be directed to me alone (not
the rest of the procmail list), and I apologize for the length of this
message.

        What can I say?  I'm a chronic yakker!  <:^)



+-----------------------------------------------------------------------+
|Sebastian @ Eclipse Tech Support - (800)483-1223 - 
support(_at_)eclipse(_dot_)net |
+-----------------------------------------------------------------------+
| A computer lets you make more mistakes faster than any invention in   |
| human history--with the possible exceptions of handguns and tequila.  |
|  - Mitch Ratcliffe, _Technology Review_, April, 1992                  |
+-----------------------------------------------------------------------+


<Prev in Thread] Current Thread [Next in Thread>
  • procmail question about ^TO, Sebastian Bernheim <=