Re: User Manual fcc-hook example SOLVED
On Tue, Jan 27, 2004 at 12:54:24PM -0800, Gary Johnson wrote:
> On 2004-01-27, Mike M <linux-support@xxxxxxxxxxxxx> wrote:
> > I still don't understand what I am reading in section 3.15 of the User
> > Manual. I am not able to get the example in
> > section 3.15 working:
> >
> > --------------------
> > Usage: fcc-hook [!]pattern mailbox
> >
> > This command is used to save outgoing mail in a mailbox other than
> > $record. Mutt searches the initial list of message recipients for the
> > first matching regexp and uses mailbox as the default Fcc: mailbox. If
> > no match is found the message will be saved to $record mailbox.
> >
> > See Message Matching in Hooks for information on the exact format of
> > pattern.
> >
> > Example: fcc-hook aol.com$ +spammers
> >
> > The above will save a copy of all messages going to the aol.com domain
> > to the `+spammers' mailbox by default. Also see the fcc-save-hook
> > command.
> > --------------------
> >
> > I use:
> > fcc-hook yadatech.com$ +yadatech
> >
> > I created +yadatech, +yadatech/new, +yadatech/cur, and +yadatech/tmp
> > (b/c I use Maildir).
> >
> > When I compose a message to anybody@xxxxxxxxxxxx the Fcc field is set to
> > =sent (b/c that's what $record is set to).
> >
> > When I change to this:
> > fcc-hook '~t yadatech.com' +yadatech
> >
> > then when I compose a message to anybody@xxxxxxxxxxxx the Fcc field is set
> > to
> > =yadatech.
> >
> > What am I doing wrong such that the example in 3.15 does not work for me?
>
> I don't know for sure, but take a look at the manual, section
> 6.3.35, default_hook. The default_hook variable contains the
> default pattern used by several hooks including fcc-hook. Note that
> the default pattern matches if the message is to a user matching the
> given regular expression _AND_ is from you, according to
> 'alternates'. Since using '~t' works but the default pattern does
> not, my guess is that mutt doesn't recognize the from address as
> you. See what the manual says about 'alternates' and check how
> yours is set. One way to see if mutt is recognizing you as you is
> to open a mailbox containing copies of messages from you, execute
>
> l ~P
>
> and see what, if anything, shows up in the limited display.
>
You got it. Thanks.
I added:
set alternates="acb@xxxxxxxx|efg@xxxxxxx|etc@xxxxxxxx"
The example now works.
Mike