public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: procmail on cygwin
       [not found] <017101c181a0$b47a29e0$738ffe0c@pwork>
@ 2001-12-10 12:00 ` Jason Tishler
  2001-12-31  1:22   ` procmail (and SmartList) " Greg Matheson
  2002-03-22  6:24   ` procmail locking problem warning (was Re: procmail on cygwin) Jason Tishler
  0 siblings, 2 replies; 9+ messages in thread
From: Jason Tishler @ 2001-12-10 12:00 UTC (permalink / raw)
  To: C. Porter Bassett; +Cc: Cygwin

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

In the future, please post to cygwin@cygwin.com instead of sending
private email, so others can benefit too.

On Mon, Dec 10, 2001 at 10:32:56AM -0700, C. Porter Bassett wrote:
> Did I understand from some of your cygwin posts that you have procmail
> working with cygwin?

Yes.

> If so, would you be willing to help me set it up on my machine?

You can find a pre-built procmail at:

    http://www.dd.iij4u.or.jp/~madokam/

Otherwise, you can try my attached build recipe.  Note the following:

    1. You will need BIND installed to build procmail -- search the
       archives for the Cygwin BIND patch.
    2. Building procmail under Cygwin is a little touchy.  Sometimes I
       have to restart the make part to get the build to complete.
    3. You will be prompted during the make part -- this is indicated by
       "# <CR> /usr/sbin/ssmtp".

I use fetchmail to retrieve my mail.  Since fetchmail defaults to using
procmail as its MDA, no extra setup is required.

Jason

[-- Attachment #2: Type: message/rfc822, Size: 3104 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 194 bytes --]

mv INSTALL INSTALL.txt
apply autoconf patch
make LN=cp # <CR> /usr/sbin/ssmtp
make BASENAME=/tmp/procmail/usr/local BINS='new/procmail.exe new/lockfile.exe new/formail.exe new/mailstat' install

[-- Attachment #2.1.2: autoconf.diff --]
[-- Type: text/plain, Size: 678 bytes --]

--- ../../procmail-3.22.orig/src/autoconf	Tue Sep 11 00:55:46 2001
+++ ./autoconf	Thu Sep 27 16:01:19 2001
@@ -881,6 +881,7 @@ then
 else
   echo "#define NO_COMSAT" >>$ACONF
 fi
+echo "#define NO_COMSAT" >>$ACONF
 
 $RM _autotst.$O
 
@@ -1349,7 +1350,7 @@ openerr:
 	envs=(char*)((nenv=nenviron)+diff);
 	while(--diff)				       /* put in some colour */
 	   sprintf(*nenviron++=envs,arg,diff),envs+=sizeof arg;
-	*(environ=nenv)="PATH=.";*nenviron=0;diff=argc;	   /* start doubling */
+	*nenviron=0;diff=argc;	   /* start doubling */
       }
      if(MAX_ARGMEM/sizeof arg<=argc)			 /* we are satisfied */
       { einfo=" /* soft limit */";		  /* no reason to hog memory */

[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail (and SmartList) on cygwin
  2001-12-10 12:00 ` procmail on cygwin Jason Tishler
@ 2001-12-31  1:22   ` Greg Matheson
  2002-01-03  6:07     ` Jason Tishler
  2002-03-22  6:24   ` procmail locking problem warning (was Re: procmail on cygwin) Jason Tishler
  1 sibling, 1 reply; 9+ messages in thread
From: Greg Matheson @ 2001-12-31  1:22 UTC (permalink / raw)
  To: Cygwin

On Mon, 10 Dec 2001, Jason Tishler wrote:

> You can find a pre-built procmail at:

>     http://www.dd.iij4u.or.jp/~madokam/

> Otherwise, you can try my attached build recipe.  Note the following:

>     2. Building procmail under Cygwin is a little touchy.  Sometimes I
>        have to restart the make part to get the build to complete.

and

> mv INSTALL INSTALL.txt
> apply autoconf patch
> make LN=cp # <CR> /usr/sbin/ssmtp
> make BASENAME=/tmp/procmail/usr/local BINS='new/procmail.exe new/lockfile.exe new/formail.exe new/mailstat' install

I had trouble with autoconf (not the GNU autoconf program),
determining how many 16 byte arguments execv() takes, but
sticking the autoconf.h at the above site in procmail-3.22, and
then running make bins and make mans, and then make install.bin
and make install.man, instead of install in the above make
sequence, I was able to get it to build.

I also got SmartList, the accompanying mailing list package of
scripts, C programs and procmail recipes, to build and 
list creation and subscriptions, and mail distribution
seems to be OK, except the recipes and scripts which should be
linked aren't linked and I sometimes have file locking problems. 

Why is it necessary to rename LN=ln to cp?

I have to run the pre-built fetchmail from the above site to
download the mails but ssmtp sends the distributed mail back out
automatically. I hardlinked a sendmail to ssmtp.

-- 
Greg Matheson
Chinmin College Taiwan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail (and SmartList) on cygwin
  2001-12-31  1:22   ` procmail (and SmartList) " Greg Matheson
@ 2002-01-03  6:07     ` Jason Tishler
  2002-01-03 20:10       ` Greg Matheson
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Tishler @ 2002-01-03  6:07 UTC (permalink / raw)
  To: Greg Matheson; +Cc: Cygwin

Greg,

On Mon, Dec 31, 2001 at 03:38:10PM +0800, Greg Matheson wrote:
> On Mon, 10 Dec 2001, Jason Tishler wrote:
> > Otherwise, you can try my attached build recipe.  Note the following:
> 
> >     2. Building procmail under Cygwin is a little touchy.  Sometimes I
> >        have to restart the make part to get the build to complete.
> 
> and
> 
> > mv INSTALL INSTALL.txt
> > apply autoconf patch
> > make LN=cp # <CR> /usr/sbin/ssmtp
> > make BASENAME=/tmp/procmail/usr/local BINS='new/procmail.exe new/lockfile.exe new/formail.exe new/mailstat' install
> 
> I had trouble with autoconf (not the GNU autoconf program),
> determining how many 16 byte arguments execv() takes, but
> sticking the autoconf.h at the above site in procmail-3.22, ...

Did you apply the patch from the above mentioned email?  IIRC, then it
should have solved the problem with the execv() test.

> Why is it necessary to rename LN=ln to cp?

IIRC, to workaround missing ".exe" suffixes -- cp can handle them, ln
cannot.

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail (and SmartList) on cygwin
  2002-01-03  6:07     ` Jason Tishler
@ 2002-01-03 20:10       ` Greg Matheson
  2002-01-04  5:03         ` Jason Tishler
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Matheson @ 2002-01-03 20:10 UTC (permalink / raw)
  To: Cygwin

On Thu, 03 Jan 2002, Jason Tishler wrote:

> > > mv INSTALL INSTALL.txt
> > > apply autoconf patch
> > > make LN=cp # <CR> /usr/sbin/ssmtp
> > > make BASENAME=/tmp/procmail/usr/local BINS='new/procmail.exe new/lockfile.exe new/formail.exe new/mailstat' install

> Did you apply the patch... IIRC, then it
> should have solved the problem with the execv() test.

It seems the patch had been applied. So, I changed line 1353 of
autoconf back to

   *(environ=nenv)="PATH=.";*nenviron=0;diff=argc;    /* start doubling */

and now I get 2 error messages from Windows, about not being able to find
CYGWIN1.DLL, but the script continues and I get an autoconf.h
like this:

/* This file was automagically generated by autoconf */

#define NO_const
#define P(args) ()
#define NO_COMSAT
/* 1 move in 64 steps of size 16384 when reallocing */
#define NOpw_class
#define NOstrlcat
#define NOsetrgid
#define NOsetregid
#define NOsetresgid
#define GOT_bin_test
#define MAX_argc 3
/* Your system's strstr() is 1.65 times SLOWER than my C-routine */
#define SLOWstrstr                            /* using my substitute instead */
#define setrgid_RUNTIME_CHECK
#define MAILSPOOLDIR "/var/spool/mail/"
#define SENDMAIL "/usr/sbin/sendmail"
#define CAN_chown
#define CF_no_procmail_yet
#define buggy_SENDMAIL
#define defPATH "PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin"
#define defSPATH "PATH=/bin:/usr/bin:/usr/local/bin"
#define PM_VERSION "3.22"
/*locktype: 4, countlocks: 80, timeout 0, watchdog 1a, /tmp/_locktest*/
/*locktype: 2, countlocks: 80, timeout 0, watchdog 17, /tmp/_locktest*/
/*locktype: 1, countlocks: 80, timeout 0, watchdog 1a, /tmp/_locktest*/
/* Hotwire LOCKINGTEST=000 */
/* Procmail will lock via: dotlocking */
#define NOfcntl_lock
/* autoconf completed */

This is on Windows 98. But as it builds already with your
autoconf.h, I don't think this is a problem.

I mentioned the existence of the executable on the procmail list,
but there was no reaction.

-- 
Greg Matheson                What I allow I teach,
Chinmin College              and all I teach is all that is allowed.
                                 
Taiwan Penpals Archive <URL: http://netcity.hinet.net/kurage>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail (and SmartList) on cygwin
  2002-01-03 20:10       ` Greg Matheson
@ 2002-01-04  5:03         ` Jason Tishler
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Tishler @ 2002-01-04  5:03 UTC (permalink / raw)
  To: Greg Matheson; +Cc: Cygwin

Greg,

On Fri, Jan 04, 2002 at 12:13:06PM +0800, Greg Matheson wrote:
> On Thu, 03 Jan 2002, Jason Tishler wrote:
> > Did you apply the patch... IIRC, then it
> > should have solved the problem with the execv() test.
> 
> It seems the patch had been applied. So, I changed line 1353 of
> autoconf back to
> 
>    *(environ=nenv)="PATH=.";*nenviron=0;diff=argc;    /* start doubling */
> 
> and now I get 2 error messages from Windows, about not being able to find
> CYGWIN1.DLL,

This makes perfect sense since the above changes PATH to only contain
the current directory (i.e., ".").  Hence, cygwin1.dll will not be found
unless you copy it into the procmail source tree.

Note this is what I initially did while trying to debug this problem.
After this worked, I removed the (ill-advised) copy and tried the
following:

    *(environ=nenv)="PATH=/usr/bin";*nenviron=0;diff=argc;

Unfortunately, this caused the test program to crash.  I was lame and
gave up debugging and just settled with:

    *nenviron=0;diff=argc;

which seemed sufficient.

> [snip]
> This is on Windows 98.

My experience is on Windows 2000 so we may be observing some differences
due to different platforms

IIRC, http://www.dd.iij4u.or.jp/~madokam/ has a Windows 9x/Me specific
patch that you may consider using.

> I mentioned the existence of the executable on the procmail list,
> but there was no reaction.

No surprise.  My experience on other lists seems to indicate that Cygwin
is considered to be the "Rodney Dangerfield" of platforms.  Sigh...

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* procmail locking problem warning (was Re: procmail on cygwin)
  2001-12-10 12:00 ` procmail on cygwin Jason Tishler
  2001-12-31  1:22   ` procmail (and SmartList) " Greg Matheson
@ 2002-03-22  6:24   ` Jason Tishler
  2002-03-23 19:14     ` Greg Matheson
  1 sibling, 1 reply; 9+ messages in thread
From: Jason Tishler @ 2002-03-22  6:24 UTC (permalink / raw)
  To: Cygwin

On Mon, Dec 10, 2001 at 01:49:58PM -0500, Jason Tishler wrote:
> Otherwise, you can try my attached build recipe.

I found an issue with my procmail build recipe that causes a mbox file
locking problem.  So, I'm posting this warning.

If interested, see the following for the aforementioned recipe:

    http://sources.redhat.com/ml/cygwin/2001-12/msg00543.html

Occasionally, I would get errors such as the following in my procmail.log
file:

    procmail: Error while writing to "/var/spool/mail/jt"
    procmail: Truncated file to former size

The above is due to procmail's autoconf (script) adding the following
to autoconf.h:

    /*locktype: 4, countlocks: 80, timeout 0, watchdog 1a, /tmp/_locktest*/
    /*locktype: 2, countlocks: 80, timeout 0, watchdog 17, /tmp/_locktest*/
    /*locktype: 1, countlocks: 80, timeout 0, watchdog 1a, /tmp/_locktest*/
    /* Hotwire LOCKINGTEST=000 */
    /* Procmail will lock via: dotlocking */
    #define NOfcntl_lock

The specific culprit is the "#define NOfcntl_lock" which disables fcntl()
locking support in procmail.  Since, mutt uses fcntl() and dotlocking,
there is a small window in which a mbox file is locked via fcntl() but
not yet via dotlocking.  This is the root cause to my transient procmail
write errors.

My WAG is that procmail's autoconf is having problems with missing
".exe" strings in executable names during mv operations:

    Initiating fcntl()/kernel-locking-support tests
    mv: preserving times for `_locktst': No such file or directory
    mv: preserving ownership for `_locktst': No such file or directory
    mv: cannot unlink `_autotst': No such file or directory
    mv: cannot remove `_autotst': No such file or directory

I have temporarily "fixed" the problem by commented out the "#define
NOfcntl_lock" in autoconf.h while I wade through the obfuscated procmail
coding style.

Maybe it's time for maildrop... :,)

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail locking problem warning (was Re: procmail on cygwin)
  2002-03-22  6:24   ` procmail locking problem warning (was Re: procmail on cygwin) Jason Tishler
@ 2002-03-23 19:14     ` Greg Matheson
  2002-03-25  8:41       ` Jason Tishler
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Matheson @ 2002-03-23 19:14 UTC (permalink / raw)
  To: Cygwin

On Fri, 22 Mar 2002, Jason Tishler wrote:

> I found an issue with my procmail build recipe that causes a mbox file
> locking problem.  

> Occasionally, I would get errors such as the following in my procmail.log
> file:

>     procmail: Error while writing to "/var/spool/mail/jt"
>     procmail: Truncated file to former size

Mmh. I see one such error in my procmail log.

> I have temporarily "fixed" the problem by commented out the "#define
> NOfcntl_lock" in autoconf.h while I wade through the obfuscated procmail
> coding style.

An alternative would be not to look at your mail while
downloading it. 

Is there any reason for not crossposting your message to a
procmail list, eg procmail-dev@procmail.org or
procmail@lists.RWTH-Aachen.DE? The number of people on both
procmail and cygwin lists must be very small, but the procmail
developers (ie Philip Guenther) should be made aware of the
autoconf problem.

-- 
Greg Matheson			Taiwan Penpals Site
Chinmin College, Taiwan		http://netcity.hinet.net/kurage
lang@ms.chinmin.edu.tw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail locking problem warning (was Re: procmail on cygwin)
  2002-03-23 19:14     ` Greg Matheson
@ 2002-03-25  8:41       ` Jason Tishler
  2002-03-25  8:52         ` Jason Tishler
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Tishler @ 2002-03-25  8:41 UTC (permalink / raw)
  To: Cygwin; +Cc: cygwin

Greg,

On Sun, Mar 24, 2002 at 05:50:32AM +0800, Greg Matheson wrote:
> On Fri, 22 Mar 2002, Jason Tishler wrote:
> > Occasionally, I would get errors such as the following in my procmail.log
> > file:
> 
> >     procmail: Error while writing to "/var/spool/mail/jt"
> >     procmail: Truncated file to former size
> 
> Mmh. I see one such error in my procmail log.

I guess that you are lucky then or your MUA only uses dotlocking (i.e.,
does not use fcntl).  What MUA are you using?  My MUA is mutt 1.3.24i
and it uses both fcntl() and dotlocking.

> > I have temporarily "fixed" the problem by commented out the "#define
> > NOfcntl_lock" in autoconf.h while I wade through the obfuscated procmail
> > coding style.
> 
> An alternative would be not to look at your mail while
> downloading it. 

IMO, the above is unacceptable -- it defeats the whole purpose of
running fetchmail as a daemon.

> Is there any reason for not crossposting your message to a
> procmail list, eg procmail-dev@procmail.org or
> procmail@lists.RWTH-Aachen.DE?

Just laziness.

> The number of people on both
> procmail and cygwin lists must be very small, but the procmail
> developers (ie Philip Guenther) should be made aware of the
> autoconf problem.

Agreed, but I give no ETA.  Although, note that this is important to
me so it will probably happen sooner rather than later.  Nevertheless,
you are welcome to beat me to it.  If so, then please CC me so I won't
duplicate the effort.

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: procmail locking problem warning (was Re: procmail on cygwin)
  2002-03-25  8:41       ` Jason Tishler
@ 2002-03-25  8:52         ` Jason Tishler
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Tishler @ 2002-03-25  8:52 UTC (permalink / raw)
  To: Cygwin; +Cc: cygwin

Greg,

On Sun, Mar 24, 2002 at 05:50:32AM +0800, Greg Matheson wrote:
> On Fri, 22 Mar 2002, Jason Tishler wrote:
> > Occasionally, I would get errors such as the following in my procmail.log
> > file:
> 
> >     procmail: Error while writing to "/var/spool/mail/jt"
> >     procmail: Truncated file to former size
> 
> Mmh. I see one such error in my procmail log.

I guess that you are lucky then or your MUA only uses dotlocking (i.e.,
does not use fcntl).  What MUA are you using?  My MUA is mutt 1.3.24i
and it uses both fcntl() and dotlocking.

> > I have temporarily "fixed" the problem by commented out the "#define
> > NOfcntl_lock" in autoconf.h while I wade through the obfuscated procmail
> > coding style.
> 
> An alternative would be not to look at your mail while
> downloading it. 

IMO, the above is unacceptable -- it defeats the whole purpose of
running fetchmail as a daemon.

> Is there any reason for not crossposting your message to a
> procmail list, eg procmail-dev@procmail.org or
> procmail@lists.RWTH-Aachen.DE?

Just laziness.

> The number of people on both
> procmail and cygwin lists must be very small, but the procmail
> developers (ie Philip Guenther) should be made aware of the
> autoconf problem.

Agreed, but I give no ETA.  Although, note that this is important to
me so it will probably happen sooner rather than later.  Nevertheless,
you are welcome to beat me to it.  If so, then please CC me so I won't
duplicate the effort.

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-03-25 16:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <017101c181a0$b47a29e0$738ffe0c@pwork>
2001-12-10 12:00 ` procmail on cygwin Jason Tishler
2001-12-31  1:22   ` procmail (and SmartList) " Greg Matheson
2002-01-03  6:07     ` Jason Tishler
2002-01-03 20:10       ` Greg Matheson
2002-01-04  5:03         ` Jason Tishler
2002-03-22  6:24   ` procmail locking problem warning (was Re: procmail on cygwin) Jason Tishler
2002-03-23 19:14     ` Greg Matheson
2002-03-25  8:41       ` Jason Tishler
2002-03-25  8:52         ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).