NONE TITLE 3.html
Keywords: NONE TITLE,fml, flexible mailing list manager, not listserv style but fmlserv emulates listserv or majordomo style

[PREVIOUS CHAPTER] [NEXT CHAPTER]

3 How to debug

    3.1	How to debug (1)

    in fml-support: 5282
    1. check OS's maillog.
       following the check list in INSTALL file Appendix A.

    2. check fml log, $DIR/log.

    3. check the connection between fml and MTA, $DIR/var/log/_smtplog.

    4. "makefml test ML" helps you to test fml.

    3.2	How to debug (2)

    From: fml-support: 01411

    * Printf debug is fundamental technique. FML has $debug variable. If
    you know the details of processing, set $debug = 1, which helps your
    debug. If $debug is 1, FML shows all debug information.

    * perl -d enables perl debugger. See perl manual for how to use it.

    Example:

    	% ($FML/bin/emumail.pl; echo something )|perl -d $FML/fml.pl $PWD
    	....debugger starts ...
    	<1> t
    	<2> c
    	.... debug information flood! ....

    * Which file is libraries for an object?
      A lib"NAME".pl library corresponds to functions on "NAME".
      e.g. libsmtp.pl is SMTP (Simple Mail Transfer Protocol) routines.

    	SMTP		libsmtp.pl

    	[Naming Convention Example]
    	ra  = remote administration
    	fop = file operation
    	...

    3.3	printf debug

    From: fukachan@phys.titech.ac.jp
    X-Mail-Count: 00702

    For example, insert the following string.

    	print STDERR "REQ:GUIDE $Envelope{'req:guide'}";

    &InitConfig;			# initialize date etc..
    &Parsing;			# Phase 1(1st pass), pre-parsing here
    &GetFieldsFromHeader;		# Phase 2(2nd pass), extract headers

    	print STDERR "REQ:GUIDE $Envelope{'req:guide'}";
    &InitConfig;			# initialize date etc..
    	print STDERR "REQ:GUIDE $Envelope{'req:guide'}";
    &Parsing;			# Phase 1(1st pass), pre-parsing here
    	print STDERR "REQ:GUIDE $Envelope{'req:guide'}";
    &GetFieldsFromHeader;		# Phase 2(2nd pass), extract headers
    	print STDERR "REQ:GUIDE $Envelope{'req:guide'}";

    % perl sbin/localtest.pl |sed 's/test/#guide/' | perl fml.pl $PWD -d

[PREVIOUS CHAPTER] [NEXT CHAPTER]