[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with "mail"
From: |
Alain Magloire |
Subject: |
Re: problems with "mail" |
Date: |
Thu, 28 Mar 2002 15:17:49 -0500 (EST) |
>
> > (gdb) r --mail-spool=pop3://localhost
> > Starting program: /home/alain/GNU/mailutils/frm/.libs/frm
> > --mail-spool=pop3://localhost
> [...]
> > 1: mailbox_name = 0x0
> > (gdb) display argv[0]
> > 4: argv[0] = 0x0
> > (gdb)
>
> This is correct behavior. --mail-spool argument has nothing to do with
> mailbox_name variable. It specifies the mailspool url, nothing more.
> If you did `display mu_path_maildir', gdb would have displayed
> $5 = "pop3://localhost", as is intended.
Ok, I see what you getting at. Then the problem is a policy
one. If I say:
1)
# frm pop://address@hidden
or with the new syntax
2)
# frm --mail-spool=pop://address@hidden
I expect the command line argument to override any environment variables.
If not, I do see the purpose of having command line arguments.
The command "frm" is a little more annoying since we are trying to
clone the original "frm" and add more functionnalities. In theorie
I should be able to do:
# frm <--- default mailbox i.e. /var/mail/alain
# frm joe <-- default spoolmail /var/mail/joe
# frm /home/alain/Mail/received <-- override my default
# frm pop://address@hidden <-- overritde my default
# frm imap://address@hidden <-- overritde my default
Should work the same with --mail-spool, for other utilities
when the argv is not the mailbox name:
# frm <--- default mailbox i.e. /var/mail/alain
# frm --mail-spool=/home/alain/Mail/received <-- override my default
# frm --mail-spool=pop://address@hidden <-- overritde my default
# frm --mail-spool=imap://address@hidden <-- overritde my default
The only thing that is unclear is this:
# frm --mail-spool=joe <--- relative path is user? filename?
Sam did put some interesing expansion, like '~', '=' and '+'.
> > The call to
> > status = mailbox_create_default (&mbox, mailbox_name);>
> > will always ignore the option --mail-spool.
>
> I see now. Mailbox_create_default should be a bit more
> intelligent about urls. Now it simply appends username to the end
> of the url, no matter what the protocol is. I'll fix it.
Yes. There was a hack in the old mailbox_create_default() trying
to detect urls with something like:
strchr(mail, ':') != NULL /* probably a url, contains ':' now check
for known schemes(pop, imap, mbox, file, etc ..)
*/
I can propose a patch ... if we agree on the policy for mbx_create_default() 8-)
> > # FOLDER=imap://localhost mail
> >
> > oops!! dumps core. Bactrace shows trying to access a null.
> > (Using our IMAP server)
>
> :^) I'll take a look...
>
Thanks.
- Re: problems with "mail", (continued)
Re: problems with "mail", maildir -> renamed to mailspool, Sam Roberts, 2002/03/27
Re: problems with "mail", Alain Magloire, 2002/03/28
Re: problems with "mail", Sergey Poznyakoff, 2002/03/28
Re: problems with "mail", Sergey Poznyakoff, 2002/03/28
- Re: problems with "mail",
Alain Magloire <=