On Fri, Mar 19, 2004 at 08:53:02PM +0000, Bob Crandell wrote:
> There are no local users so 'other' needs to be a variable that I can attach
> to the front of @there.com so it will be delivered to the proper mailbox on
> the other server.  Does Procmail have that stored?
> 
> [EMAIL PROTECTED]
The calling program may set some variables.  Postfix sets $USER $LOGNAME $LOCAL
and $RECIPIENT.  Sendmail will likely set one.  Recipient is the full email,
local/user/logname is the username only.  Read sendmail's man page for
variables set.

Reading through man procmailrc, I see it looks for:
$LOGNAME

Also, with procmail, I used ! to forward mail:

:0
* conditions here
! [EMAIL PROTECTED]

Failing those you can actually set it yourself.  I did something like this on
an old procmail script:
:0B                     # Get real address
EMAILFROM=|egrep "^From:"|head -2|tail -1|\
    perl -pe 's/(^.*<|^From: |>.*$)//g; '
    #debug open (INFO, ">>/tmp/emailfrom"); print INFO $_;'

>From this point on, $EMAILFROM contained the address listed in the From:
header.  You'll have to make modifications to get To: but it gives you an idea.

Cory

-- 
Cory Petkovsek                                       Adapting Information
Adaptable IT Consulting                                Technology to Your
(858) 705-1655                                                   Business
[EMAIL PROTECTED]                                  www.AdaptableIT.com
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to