On Wed, 9 Jan 2002, Andreas Hansson wrote:

> > > Also I had a lot of trouble today with filters, until I realized that
> they
> > > fail if they print to standard output. I just wanted a simple filter to
> make
> > > a copy of every mail to another directory so I wrote a .bat file to do
> that,
> > > but the copy command wrote a line to stdout and then nothing worked.
> That's
> > > a nuisance. Couldn't xmail start the .bat file with write access to its
> own
> > > console? It would be nice to see the messages when running xmail in
> debug
> > > mode too.
> >
> > You've to run the .bat file with "cmd.exe -c ..."
> >
>
> No, that was not the problem. As an example, this doesn't work:
>
> [mailproc.bat]
> c:\inetpub\xmailroot\bin\sendmail --xinput-file %1 -- [EMAIL PROTECTED]
> exit /b 0
>
> whereas this works:
>
> [mailproc.bat]
> @echo off
> c:\inetpub\xmailroot\bin\sendmail --xinput-file %1 -- [EMAIL PROTECTED]
> exit /b 0
>
> It's easy to make this mistake of not turning off echo in a .bat file or
> doing something that generates output, and I think it would be a big
> advantage not having to remember do it. If I hadn't had a vague memory of an
> old post about this issue I would've never figured out why the bat file
> didn't work.
>
> There's also something I don't quite understand: My filter works when I in
> the .tab file put in the line
>
> "c:\winnt\system32\cmd.exe" "/C" "c:\inetpub\xmailroot\bin\mailproc.bat"
> "@@FILE" "@@FILE"
>
> but not when I put in the line
>
> "c:\winnt\system32\cmd.exe" "/C" "c:\inetpub\xmailroot\bin\mailproc.bat"
> "@@FILE"
>
> To me the second line seems like it should work for calling the previous
> batch file to copy the mail to another user.
>
> I know I could call sendmail directly, but I originally had a .bat file to
> copy the file and I'm still working out how I want to archive the copies.

I'll take a look before 1.4




- Davide


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to