On Mon, Jun 10, 2002 at 06:51:49AM -0500, David T-G wrote:
> % Can anyone point me in the right direction? Does Mutt need
> % to have a "%"-escaped username or username@domain, and are
> % the %T and %F "escapes" a cross-platform (*nix/Win32) way to
> % get these?
>
> Ahhh... That's a good point. The % is under DOS/Win what the $ is under
> a *NIX shell; you write a loop, for instance, as
DOS/Win, eh? Well,that would explain why I couldn't find
any documentation... :-)
> for %i in ...
>
> and when you do that in a batch file, where %1 is the first parameter and
> so on, you have to
>
> for %%i in ...
>
> to protect it. Even though I *think* you've said that this is all within
> mutt and not in a pipeline (which I would almost bet a twinkie would get
> mucked up), you still might be experiencing some of these problems.
Well, I'm not sure that protecting a parameter with another %
(the DOS/Win equivalent of "\$"?) is really what's happening
in this case. Unixmail is set up to get my mail thus:
cd c:/cygwin/unixmail
cat etc/fetchmailrc users/$USERNAME/fetchmailrc |
bin/fetchmail.exe -f - --nodetach --mda 'perl bin/spoolmail.pl %%F'"
where (I think) the %F argument is getting through with an extra "%",
so that a Perl command in spoolmail.pl:
# Default header
print SPOOL "From $from " . localtime() . "\n";
will generate headers such as:
From [EMAIL PROTECTED] Fri Jun 7 13:59:03 2002
From [EMAIL PROTECTED] Fri Jun 7 15:27:22 2002
From [EMAIL PROTECTED] Fri Jun 7 14:27:23 2002
From [EMAIL PROTECTED] Fri Jun 7 14:27:25 2002
From [EMAIL PROTECTED] Fri Jun 7 14:38:17 2002
My Cygwin/Mutt apparently needs that prepended "%" because
if I generate a From-line without it -- eg, for the mbox
that Procmail wrote which had no From-lines at all -- Mutt
will not recognize that line as a message delimiter. So "%"
would seem to be not just a DOS/Win thing, but a Mutt thing??
And the %F and %T parameters are discussed in my version of
the fetchmail man page under Delivery Control Mechanisms,
flag "-m/--mda" -- though the man does not say what they are,
just that they are potential security risks.
> % Or am I in the wrong list to pose the question?
>
> That's quite probable. Even though this is all about mutt and fetchmail
> and such, you may find better expando answers on the cygwin list.
> Wouldn't hurt to try.
I have already moved a related question to that list,
but I'm still not clear on whether this "%" business is
Cygwin-specific??
Thanks,
Tom
--
Dr. Thomas Baker [EMAIL PROTECTED]
Institutszentrum Schloss Birlinghoven mobile +49-171-408-5784
Fraunhofer-Gesellschaft work +49-30-8109-9027
53754 Sankt Augustin, Germany fax +49-2241-14-2619