Could some kind soul provide the .procmailrc rule for the above ?
Thanks in advance,
+-----------------------+-----------------------------------------------+
| Tan Tran, MEE, P.E. | Disclaimer: |
| Texas Instruments | Opinions expressed are mine and in no way |
| tt...@micro.ti.com | reflect those of my employers. |
+-----------------------+-----------------------------------------------+
Hmmm - well, you could plagiarize the "file-server" in the procmailex page, so you
would end up with something like this:
:0
* ^TO_yo...@yours.dom
* !^X-Loop: y...@youraddr.dom
* !^FROM_DAEMON
{
:0 fw
|formail -A "X-Loop: y...@youraddr.dom" -i "To: forw...@other.dom"
FILE="fname" # some file in your MAILDIR
:0 a
| cat - ./$FILE 2>&1 | $SENDMAIL -oi -t
:0 E :
IN.safety
}
So, for anything addressed to "your...@yours.dom" this adds a loop-prevention header
(after checking for its existence), and changes the To: address. If this step succeeds,
you append the file (whose name you assigned to an environment variable) to the msg
body and pipe the result to sendmail. If something didn't work, the message is filed
to the folder IN.safety for manual manipulation at your leisure. We are assuming that
sendmail is your MTA. (MDA?)
Note that the second "|" will cause the pipe to be started in your shell - I am just
assuming that the value of "./" is the same as MAILDIR at that point, and I'm too lazy
to wade through all the env stuff at the end of the procmail page. Just to be safe,
you may want to replace "./$FILE" with "$FILE", and set the value of FILE to the full
pathname of your append file. (Or you could just put the file in your home dir, and
make a link in your maildir. Or put files with the same name and different contents in
the two locations and see which one gets sent.)
Corrections, etc, welcome.
-Steve
any ideas - Phil -
here is my little script -
with the last line that retains the msg in the mail Q for later retrieval
in case it falls thru and does not match any names ...
:0
* ^TOphili
{ :0
! psch...@interserv.com
}
:0
* ^TOphils
{ :0
! ph...@symons.com
}
:0
* ^TOphilo
{ :0
! ph...@otcg.com
}
:0 hb
/var/mail/omnitech
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
Imagination is more important than knowledge.....
Knowledge is limited.....
Imagination is not....... Albert Einstein, (1879-1955)
:0
* ^TOphili
{ NEWFROM="`formail -XFrom:` (via XYZ Procmail postoffice)"
:0 fhw
| formail -I"${NEWFROM}"
:0
! psch...@interserv.com
}
:0
* ^TOphils
{ NEWFROM="`formail -XFrom:` (via XYZ Procmail postoffice)"
:0 fhw
| formail -I"${NEWFROM}"
:0
! ph...@symons.com
}
:0
* ^TOphilo
{ NEWFROM="`formail -XFrom:` (via XYZ Procmail postoffice)"
:0 fhw
| formail -I"${NEWFROM}"
:0
! ph...@otcg.com
}
:0 :
/var/mail/omnitech
(The last recipe should use a lockfile; the hb flags can be omitted.)
Regards,
Waldi
--
Never let your schooling interfere with your education.