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

Re: locale and external address



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, December  6 at 10:36 PM, quoth Mauro Sacchetto:
> Alle giovedì 6 dicembre 2007, Rado S ha scritto:
>>> I've an address for outgoing mail (with my provider's domain) and 
>>> a local one (samiel@debian). When I send local mail, in the header 
>>> I fond always, as "From" field, the external address. There is a 
>>> way to tell Mutt to use the external address only for outgoing 
>>> emails and the internal one for local mail?
>
> I tried the following:
> send-hook '~t ^@debian$' 'my_hdr From: Mutt User <samiel@debian>' 
> to send local email (the domain is "debian") having "samiel@debian" 
> as sender, but it doesn't work. There is a misteke in format? 

Yes. When you use the ^ in your pattern, you're telling it to match 
the beginning of the address (the $ at the end tells it to match the 
end of the address). Thus ^@debian$ will ONLY match "@debian" and 
nothing else---it will not match samiel@debian, foo@debian or 
whydoesntthisstupidthingwork@debian either. ;)

If you use this hook instead:

     send-hook '~t @debian$' 'my_hdr From: Mutt User <samiel@debian>'

...then it WILL match all three examples I listed above, but will NOT 
match samiel@xxxxxxxxxxxxxxxxxx (because the $ at the end is still 
there). Make sense?

For more details, read up on "regular expressions" (Google should have 
plenty of info).

~Kyle
- -- 
Come to me, son of Jor-El. Kneel before Zod. Snootchie-bootchies.
                                                                 -- Jay
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFHWHATBkIOoMqOI14RArFdAJ0ek6TMAK3j0z0BuTXHtXHdZ4CuWwCfSbu7
vrcxV2l++TRrM1NI1hILibk=
=tOEU
-----END PGP SIGNATURE-----