<<< Date Index >>>     <<< Thread Index >>>

matching mails sent to the local system



I'm trying to match iwth a send-hook all the mail sent to an address
of the form:
\w+
without an exmplicit domain (e.g. as in alice@xxxxxxxxxxxxxx).

I've tried with the following patterns in a send-hook without success:

~t ^\\w+\\$
~t \\`\\w+\\' # this issues a syntax error
~t \\<\\w+\\>

I'm using these various rules in the following context:

# matches all mails sent outside
send-hook "~t .*@.*" \
     'my_hdr From:  My Name <my.name@xxxxxxxxxxx>'

# matches only mails sent locally and overrides the previous send-hook rule:
send-hook "~t .*@local ~t .*@my(\.local\.domain)? | <one of the above 
patterns>" \
    'my_hdr From: myself'
 
This works for external addresses, for local addresses of the form
"username@local" or "username@xxxxxxxxxxxxxxx" but not for addresses of
the form "username".

Can anyone suggests what I'm missing (or there is a simper way to
achieve the same result)?

Thanks in advance

Cheers
-- 
Stefano Sabatini
Linux user number 337176 (see http://li.count.org)