procmail
[Top] [All Lists]

Please unsubscribe me

1996-12-01 14:06:23
Please unsubscribe me.
 
------------------------------

Content-Type: text/plain

procmail-d Digest                             Volume 96 : Issue 170

Today's Topics:
  Re: Virtual domain with his own user  [ Philip Guenther 
<guenther(_at_)gac(_dot_)edu> ]
  mail question - on delivery           [ Mark J Elkins 
<mje(_at_)mje99(_dot_)posix(_dot_)co(_dot_)z ]
  Re: Only doing stuff for one recipe   [ Jason Tang 
<jasont(_at_)padd(_dot_)press(_dot_)net> ]
  Re: Only doing stuff for one recipe   [ Stephane Bortzmeyer 
<bortzmeyer(_at_)pas ]
  Getting date to use in outputfile     [ Jason Tang 
<jasont(_at_)padd(_dot_)press(_dot_)net> ]
  Re: mail question - on delivery       [ Philip Guenther 
<guenther(_at_)gac(_dot_)edu> ]
  Re: Getting date to use in outputfil  [ bodysurf(_at_)netcom(_dot_)com 
(Tim) ]
  Skimming files out of a mail folder   [ Bill Costa - NIS/CIS - University o 
]
  Re: Skimming files out of a mail fol  [ "Alan K. Stebbens" 
<aks(_at_)anywhere(_dot_)en ]
  Re: Skimming files out of a mail fol  [ Tony Nugent 
<tony(_at_)trishul(_dot_)sci(_dot_)gu(_dot_)ed ]
  Help needed with .procmailrc protect  [ Herbert Hotz 
<herbert(_dot_)hotz(_at_)symmetri ]
  Re: Procmail dumping core             [ Dave Horsfall 
<dave(_at_)fgh(_dot_)oz(_dot_)au> ]
  Is this a bug?                        [ David Pesticcio 
<davidp(_at_)cableol(_dot_)net ]
  Re: Is this a bug?                    [ David Pesticcio 
<davidp(_at_)cableol(_dot_)net ]
  Frep 'Word list too long' ???         [ paul milligan 
<pjm(_at_)pobox(_dot_)com> ]
  Re: Frep 'Word list too long' ???     [ bodysurf(_at_)netcom(_dot_)com 
(Tim) ]
  Address ONLY Match/Variable Recipe?   [ Doctor(_at_)netcom(_dot_)com (The 
Doctor {Who? ]

------------------------------

Date: Wed, 27 Nov 1996 00:58:41 -0600
From: Philip Guenther <guenther(_at_)gac(_dot_)edu>
To: David Graves <www(_at_)graves(_dot_)com>
cc: procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Virtual domain with his own user list 
Message-Id: <199611270658(_dot_)AAA04126(_at_)solen(_dot_)gac(_dot_)edu>

David Graves <www(_at_)graves(_dot_)com> writes:
Now lemme get this straight:

Even if I WERE to hack sendmail and do the following:

1) Add procmail as a delivery agent using the -a to accept the user
2) Add rules in Rulset 0 that would call this new delivery agent.

I'd STILL have problems with BCC's due to various other problems such as 
sendm
ail collapsing duplicates, etc...


Sorry, I didn't make myself clear.  Given your two points above, if
you crafted those lines in ruleset 0 correctly, then it would all work,
even in the face of Bcc's and mailing lists.  Heck, if you use procmail
as the local mailer (that is, the "Mlocal" definition calls procmail),
you could even use that and skip step 1, but the local mailer is overloaded
enough (with aliasing and stuff) that I would _not_ suggest doing that.
The hard part is getting the lines that invoke the procmail mailer correct.
When make the database lookup to see whether the address being processed
is that of a virtual domain, you need to save the 'current' address past
the database lookup and then give that as the user ($:) part of the mailer
call ($#procmail) line.

For example, to quote the mailertable related lines in sendmail 8.8.3's
m4 generated config, here's the ruleset 0 lines:

# not local -- try mailer table lookup
R$* <@ $+ > $*                $: < $2 > $1 < @ $2 > $3        extract host 
name
R< $+ . > $*          $: < $1 > $2                    strip trailing dot
R< $+ > $*            $: < $(mailertable $1 $) > $2   lookup
R< $~[ : $+ > $*      $>95 < $1 : $2 > $3             check -- resolved?

And here's ruleset 95:

S95
R< > $*                               $@ $1                   strip off null 
relay
R< error : $- $+ > $*         $#error $@ $1 $: $2     special case errors
R< local : > $* < @ $* >      $#local $@ $1(_at_)$2 $: $1     no host: use 
old user
R< local : $+ > $* <@ $* . > $*       $#local $@ $2(_at_)$3 $: $1     special 
case local
R< $- : $+ @ $+ > $*<$*>$*    $# $1 $@ $3 $: $2<@$3>  use literal user
R< $- : $+ > $*                       $# $1 $@ $2 $: $3       try qualified 
mailer
R< $=w > $*                   $@ $2                   delete local host
R< $+ > $*                    $#_RELAY_ $@ $1 $: $2   use unqualified mailer


Watch what happens when an address like
      user<@virtualdomain.>
goes through this:
      user<@virtualdomain.>
      <virtualdomain.>user<@virtualdomain.>
      <virtualdomain>user<@virtualdomain.>
  lookup "virtualdomain" in mailertable, get back "procmail:/some/dir/virtdom"
      <procmail:/some/dir/virtdom>user<@virtualdomain.>
  call 95
     unchanged until ....
      $#procmail $@ /some/dir/virtdom $: user<@virtualdomain.>

The key thing to note is that the original recipient address being processed
is still availible past the database lookup for passing to the mailer via $:.

You should note that while this appears to require a procmailrc for each
virtual domain, that is not true.  You can either have several all linked
together and use $_ to figure out what name it was 'called' under, or
you can just look at the recipient address, as it will look like:

      user(_at_)virutaldomain

(don't forget that it gets passed through ruleset 4, not to mention the
ones listed in the mailer definition, thus the 'missing' braces.)


...
If that IS the case, then does that mean that I throw my Solaris stock 2.4 
sen
dmail in the crapper, throw my 
procmail in the crapper and pull my hair out compiling and installing 
V8.whate
ver sendmail and use THAT to deliver 
mail to my thousands of virtual users on my dozens of virtual domains?


Well, I would suggest upgrading the sendmail V8 anyway, and that it really
isn't that hard, but your environment is different from mine, so it's your
call.  You _should_ be able to do the above without compiling sendmail V8
yourself, but I haven't done so myself.

Perhaps now is a good time to throw in a disclaimer: I don't run an ISP,
but rather a medium sized (60+ unix hosts, 1000+ hosts total) academic
network, and there's only one 'virtual host' here, though there is some
other sendmail trickery involved.  What I haven't done myself, I have
either heard from others whom I consider experts, or reasoned from too
much documentation and experimentation.  After that it was just a matter
of my mind (to invoke Lovecraft) "correlating all of its contents".  If
you think something I've said is flakey, feel free to bash it, just be
prepared to back yourself up with logic (and 3km of 1/2" tape).

Philip Guenther

------------------------------

Date: Wed, 27 Nov 1996 09:23:13 +0200
From: Mark J Elkins <mje(_at_)mje99(_dot_)posix(_dot_)co(_dot_)za>
To: procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
Subject: mail question - on delivery
Message-Id: 
<199611270723(_dot_)JAA31532(_at_)mje99(_dot_)posix(_dot_)co(_dot_)za>

Bit off the point - but looks like there is a lot of sendmail folk out
there. I come from an smail background - but have moved to sendmail
now. I have one uucp connection to a machine called 'zeusa', but he is
the domain 'zeusa.co.za'. His domain is MX'ed to come to me. I used to have a
'paths' entry ...

.zeusa.co.za    zeusa!%s        300
zeusa           zeusa!%s        300
zeusa.co.za     zeusa!%s        300

What is the equilivant of doing this in sendmail language? I'm running
sendmail 8.7.3.  I've asked various people locally - but no one has come up
with an answer for me yet.  I'm getting bored forwarding all his mail manually
and don't thing I really need to resort to procmail for this...

-- 
  .  .     ___. .__      Olivetti Systems & Networks, Unix Support - Sth 
Africa
 /| /|       / /__       mje(_at_)posix(_dot_)co(_dot_)za  -  Mark J Elkins, 
SCO ACE, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 11 456 3125  Cell: +27 82 601 0496

------------------------------

Date: Wed, 27 Nov 1996 09:27:10 +0000 (GMT)
From: Jason Tang <jasont(_at_)padd(_dot_)press(_dot_)net>
To: "Karl E. Vogel" 
<vogelke(_at_)c17mis(_dot_)region2(_dot_)wpafb(_dot_)af(_dot_)mil>
Cc: Procmail <procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE>
Subject: Re: Only doing stuff for one recipe
Message-Id: 
<Pine(_dot_)SUN(_dot_)3(_dot_)91(_dot_)961127092210(_dot_)2671G-100000(_at_)garlic(_dot_)compnews(_dot_)co(_dot_)uk>
Content-Type: TEXT/PLAIN; charset=US-ASCII

Done what you've said below, but it still only executes for the first 
recipe it encounters. At present the .procmailrc is:

=== .procmailrc
:HB
* ^Subject:.*Air Quality Bulletin
| /home/dill/isps/src/air/do_level > 
/home/dill/isps/src/air/Output/air.level
:HB
* ^Subject:.*Air Quality Bulletin
| /home/dill/isps/src/air/do_quality > 
/home/dill/isps/src/air/Output/air.quality

=== Log
procmail: [14163] Wed Nov 27 09:18:16 1996
procmail: Match on "^Subject:.*Air Quality Bulletin"
procmail: Executing " /home/dill/isps/src/air/do_level > 
/home/dill/isps/src/air/Output/air.level"
procmail: Assigning "LASTFOLDER= /home/dill/isps/src/air/do_level > 
/home/dill/isps/src/air/Output/air.level"

<Prev in Thread] Current Thread [Next in Thread>
  • Please unsubscribe me, Dick Adams <=