procmail
[Top] [All Lists]

Re: carriage returns and cygwin

2006-01-09 21:28:32
On  9 Jan, reader(_at_)newsguy(_dot_)com wrote:
I'm trying to learn enough about running winxp to get procmail fetchmail
working together on it.  An easy task in unix or linux but a little
more complicated on MS.

I've got it all working but I'm finding when fine tuning my recipies
that a carriage return is being inserted as mail goes thru procmail.

I don't think this was the case on unix but not able to test right
now.   I may have never really used the anchor $ in my regex since
most recipies don't require it but now I tried to use $ at the end and
it fails, apparently due to a ^M carraige return being inserted by
procmail or so it seems.

Checking the `To' line on the test message with vi and the :l command I
see a simple $ but after processing the same `To' line has ^M$.

Is this something compiled in by cygwin to be compat with win line
terminators?  Can I do anything about this? Or simple remember to
write my regex to include the ^M

It's not procmail. It's cygwin, and you're right it's a compatibility
"feature." One caveat: I've used cygwin for years, but have never
had the need to try procmail in that environment. I'm also using pretty
old versions of cygwin, so things may have changed.  This is just an
educated guess, but I think it's a pretty good one.

You probably need to change the mount options on the volume where
your procmail rcfiles reside. If you do 'mount' without options, I'm
guessing you'll see it is mounted in text mode. That's something akin
to text mode in an ftp client where it does line ending translation
automagically. You want binmode (-b), which will leave them alone.
I'm pretty sure that'll solve your problems.

Don


-- 
Email address in From: header is valid  * but only for a couple of days *
This is my reluctant response to spammers' unrelenting address harvesting


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>