Hi All,
I've got a little problem thats stumping me right
now.
I've got a mail setup where mail for various domains
is all forwarded to one e-mail address. To make it easier
for me to deal with this I'd like to show the domain
it was sent to in the subject.
Currently I'm using the following:
:0
* $ ${HEADERS}(_at_)domain1(_dot_)com
{
TAG = "[Domain1]"
}
:0E
* $ ${HEADERS}(_at_)Domain2(_dot_)org(_dot_)uk
{
TAG = "[Domain2]"
}
MATCH # kill this
:0 fhw
* ! TAG ?? ^^^^
* ^Subject: *\/[^ ].*
| $FORMAIL -I "Subject: $TAG - ${MATCH:-<no subject>}"
As you can see this handles each domain seperately, and
isn't terribly generic.
I'd like to change this to use the TO header, and have
something like the following, but I can't get it to work:
:0 fhw
* ^TO:.*@([\.]).* # Attempt to match on anything between "@" and "."
{
TAG = "$1" # What should I put here?
}
Any assistence would be, greatly, appreciated.
Steve Kemp
---
Network Administrator / Toolsmith
Voxar Limited
Edinburgh - Corporate Headquarters | Boston | Charlotte | Toronto
Bonnington Bond, 2 Anderson Place, Edinburgh, EH6 5NP, UK
Tel: +44 (0) 131 472 4792 Fax: +44 (0) 131 472 4799
Email: info(_at_)voxar(_dot_)com Web: www.voxar.com
Registered in Scotland No. 145641 Registered Office as above.
This email is sent subject to the legal requirements set out
at www.voxar.com/legal/email_policy.htm