wmf-1.0.5.orig/ 40755 1751 1751 0 6650061607 13262 5ustar christophclameterwmf-1.0.5.orig/doc/ 40755 1751 1751 0 6677505741 14042 5ustar christophclameterwmf-1.0.5.orig/doc/ToDo100644 1751 1751 756 6467061042 14703 0ustar christophclameterBefore release stable version ----------------------------- - Update documentation - Update manpages - Update html Normal development ------------------ 1 check all string for correct freeing 2 a reference doc for layout the mail-html (corporate identity) 2 time correction (for those with wrong system time) 3 mail cgi (with arguments:receive-addr,Subject,reference-ID) 3 more mime 4 additional program for searching 4 additional program for (re)moving outdated files wmf-1.0.5.orig/doc/README100644 1751 1751 4174 6467062577 15027 0ustar christophclameter========================================================================== WMF - Web Mail Folder ========================================================================== Converting Emails to HTML and make index files (author, data, subject, thread). Of course there are other programs making the same, but here are some points which not all have: - correct threading without level limitation - quoted-printable text encoding - HomePage-Hyperlink (X-URL) - faces support - breake indexes in different pages to make them smaller (don't break between threads) - index time limitation (older mail dissapears from the index) - frame support Of course there are some points which this program currently not has. MORE INFORMATION ---------------- Take a look to the ToDo and the FAQ file. COPYRIGHT --------- COPYRIGHT (C) 1996 by Norbert Kuemin See the file "COPYRIGHT" for the terms for distribution and warranty of this program. OPERATING SYSTEMS ----------------- Take a look to http://www.lugs.ch/LUGS_Members/norbert.kuemin/wmf.html to see all supported OS. INSTALL ------- 1. Extract the package with tar -zxvf wmf-.tar.gz 2. cd wmf- 3. Edit the Makefile for customize the configuration part 4. make 5. make install EXAMPLES ------- wmf -m /home/foobar/Mail/mbox -d /www/data/mailinglist -l 60 -w 2 Getting all datas from /home/foobar/Mail/mbox and putting the html-file (including the index files) to /www/data/mailinglist. Mail which are older then 60 days won't be displayed in the index files. All previous files will be overwritten. wmf -m- -p 200 -w 1 Getting all datas from STDIN and putting the html-file (including the index files) to the current directory. After 200 entries in the index files there will be a pagebreak. All mails will be append to the previous. wmf -c test.wmfrc Takes all configuration from the file test.wmfrc. THANKS ------ Special thanks to : - Roland Alder for beta-testing and ideas. - Many failure-reporters for bug-hunting - All people spending their time for linux. Without you, this software wouldn't be here ... wmf-1.0.5.orig/doc/ChangeLog100644 1751 1751 13720 6656370740 15730 0ustar christophclameter1999/02/04 NoK 1.0.5 code correction for mime. code correction for multiple receipients. ----- 1999/01/23 NoK 1.0.4 Custom file extension. See man wmfrc. Add mimetype graphic/x-xbitmap. Remove a bug in the statistics. Doc including now alsofor the index and stats ----- 1999/01/16 NoK 1.0.4 Bug hunting Memory allocation cleanup ----- 1998/04/02 NoK 1.0.3 Make ChangeLog ready for year 2000 :-) Bugfix for Mailaddresses und Names. ----- 1998/03/16 NoK 1.0.2 Thread bug in empty subject fixed. ----- 1998/03/07 NoK 1.0.2 Date bugfix. ----- 1998/02/20 NoK 1.0.1 Frame bugfix. ----- 1998/02/07 NoK 1.0 Frame support. See man wmfrc. Statistic page. See man wmfrc. ----- 1998/01/03 NoK 0.94 Remove a bug in config.c HtmlBodyEnd. ----- 1998/01/02 NoK 0.94 Message counter. See man wmfrc. ----- 1997/12/31 NoK 0.94 New directory structure. "No Subjects" wont be threaded. Breaking lines greater than x chars (LineSize = x in the config file). ----- 1997/08/03 NoK 0.93 Remove a bug in index.c 5 more config features. See man wmfrc. ----- 1997/08/01 Nok 0.93 Speedup AppendFile in file.c manfile for wmfrc More config features. See man wmfrc. ----- 1997/07/06 NoK 0.91 Remove a bug in GetName ----- 1997/06/29 NoK 0.91 Addition work for Bug removed in threading (changing subject in a thread) ----- 1997/06/27 NoK 0.91 Bug removed in reading the mail header data from html Marking the end of the mail header data with Bug removed in threading (changing subject in a thread) ----- 1997/06/07 NoK 0.91 Patch "#include " Patch for dmalloc Bugs removed in mime.c, file.c and mail.c New html-link to wmf ----- 1997/05/11 NoK 0.9 Configuration file summary - MailCommand - FilePermission - DayLimit - PageSize - SortOrder - WriteMode - NoFaceFile -> FaceNoData - FaceSupport - FaceDirectory Now use " insteed of * in warnings ----- 1997/05/08 NoK 0.9 Configuration file summary - ReplyChars -> BodyReplyChars - BodyHtmlConvert - BodyLinkUrl - BodyLinkEmail Start for new mime type decoding text/enriched ----- 1997/05/02 NoK 0.9 Configuration file summary - AboutLink - Directory - MailboxFile - FolderName - DebugLevel ----- 1997/04/26 NoK 0.9 Now it works also with SCO Mail ----- 1997/04/13 NoK 0.9 Configuration file summary - HtmlBodyStart,HtmlBodyEnd - HtmlSeparator (HR) - ReplyChars,ReplyStart,ReplyEnd - NoFaceFile ----- 1997/04/02 NoK 0.9 Begin with configuration file reading Another Thread bug found (Space after Subject) ----- 1997/03/29 NoK 0.9 Mailheader mime decoding Mailheader html convert Thread improvement ----- 1997/03/29 NoK 0.9 Uudecoding with/without mime ----- 1997/03/19 NoK 0.9 Bug removed (empty Mail) ----- 1997/03/17 NoK 0.9 If a filename (mime multipart) exist, save as file and make a href Base64 Decoding GIF implementation (currently hardcoded) Bug redetected in thread. If there was a mail without a MessageID = wrong thread Add an example how I think a configurationfile should look like ----- 1997/03/15 NoK 0.9 Check Directory where the html's should be write to. ----- 1997/03/12 NoK 0.9 Bug removed (empty mbox-file) Cleanups for Solaris Ignore leading tabs in head datas ----- 1997/03/11 NoK 0.8 additional mime, octetstream -> save as file linked by a hyperlink ----- 1997/03/07 NoK 0.8 New switch -a for about-hyperlink Handel < and > correctly in the senders name use <> instead of () at from: and to: to hold the email Clean html in the mailbody line break in quoted befor a "=\n" ----- 1997/03/03 NoK 0.8 LSM added to the doc Removing bugs from date.c (getutc) and index.c (ReadHtmlHeader) ----- 1997/03/02 NoK 0.8 Hyperlinking Names with Email in thread,subject and date index ----- 1997/02/27 NoK 0.8 HomePageLink to the Sender name or if not exist append the url ----- 1997/02/26 NoK 0.8 write-mode 3 = append without indexing ----- 1997/02/25 NoK 0.8 Bug detected in thread. If there was a mail without a MessageID = wrong thread Bug detected in index-files. "Page:" if there is only one Sorting (Author,Subject) new Hyperlink email in author.html and date added better quoted-printable support start of mime support ----- 1997/02/23 NoK 0.7 Detect email-addresses and make a hypelink threading level limitation Preparation for a new release (doc,cleanup) ----- 1997/02/22 NoK 0.7 Handle To: fields with more than one address ----- 1997/02/20 NoK 0.7 New switch -f for filepermissions Modify mail.c (checking for empty mails) Exchange Append/Overwriting in doc and help DebugLevel default = 0 ----- 1996/12/21 NoK 0.7 Modify Makefile (MAILTO -> mailto) ----- 1996/12/13 NoK 0.7 Modify config.c (null-string) Update README ----- 1996/12/01 NoK 0.6 writing README begin with html document add news to ToDo ----- 1996/11/23 NoK 0.6 writing man little Makefile changes doc/LICENCE added ----- 1996/11/20 NoK 0.5 compiler switch -Wall added cleanup done begin writing man ----- 1996/11/15 NoK 0.5 Bug removed at AddData in mail.c face support implemented and tested new routine to handel malloc ----- 1996/10/19 NoK 0.4 Bugs removed stdin tested face support started (linking compface) ----- 1996/10/14 NoK 0.3.0 quoted text url hyperlinks ----- 1996/10/13 NoK 0.2.0 Update ToDo Threaded index ----- 1996/10/12 NoK 0.2.0 HomePage Hyperlink added Bug removed (empty lists) ----- 1996/10/10 NoK 0.2.0 List-Datelimit Header-Cleanup ----- 1996/10/08 NoK 0.2.0 Indexing (date,author,subject) Index can be splitted on more pages ----- 1996/09/28 NoK 0.1.0 getutc(date.c) -> convert datestring to utc. CleanMailMem(mail.c) -> free allocated memory bug removed at addbody(mail.c) ----- 1996/09/28 NoK 0.1.0 Starting ChangeLog,ToDo Status: - Converting mail -> html from a file - Different modes (append,overwrite,indexing) ----- wmf-1.0.5.orig/doc/wmf.1100644 1751 1751 6722 6652322347 15011 0ustar christophclameter.TH WMF 1 "November 1996" .UC 4 .SH NAME wmf \- convert and index mails in html format. .SH SYNOPSIS .B wmf [ .I options ] .SH DESCRIPTION WMF (Web Mail Folder) generates html-pages from email. Source can be a file or stdin. .SH OPTIONS Available command line options are the following: .TP -? Print a summary of command line options. .TP -a url About link. If this link presents it will be placed to the index section. .TP -c file Another configurationfile (default ~/.wmfrc) .TP -d directory Where all the files write to (default ./) .TP -e command Mail-command (default MAILTO:) .TP -f permission Set file permission after creation. Numeric mode only like chown (1) .TP -h Print a summary of command line options. .TP -l days Daylimit, mails older then day won't be listed in the indexes. 0 = no limit (default=0). .TP -m mbox Name of the mailbox file, - is used for stdin. .TP -n name Name of the mail folder. .TP -p lines Lines / page index. 0 = only one page (default 0). Threads won't be brocken. .TP -r Reverse sorting. .TP -t level threading level limitation .TP -v Print the programname and the version. .TP -w mode Write-mode (0=indexing 1=overwrite 2=append 3=append no index). .B Mode 0: If you made changes manual or anything went wrong until indexing. .B Mode 1: If you want to start from scratch witch one big mbox file. .I Warning: All files in the directory will be deleted !!! .B Mode 2: If you want to extend an existing archive. .B Mode 3: Specialy made if you need to convert emails stored in single files. After converting all files you can call WMF again in Mode 0 for indexing. .TP -x level Debug level (Bit0=Functions Bit1=Information Bit2=Fileoperations) .SH ENVIROMENT All switches can be defined with enviroments. .TP WMF_CONFIG Another configurationfile (default ~/.wmfrc) .TP WMF_DAYS Daylimit, mails older then day won't be listed in the indexes. 0 = no limit (default=0) .TP WMF_DEBUG Debug level (Bit0=Functions Bit1=Information Bit2=Fileoperations) .TP WMF_EXTENSION Define the file extension (default=".html"). .TP WMF_DIR Where all the files write to (default ./) .TP WMF_LINES Lines / page index. 0 = only one page (default 0) Threads won't be brocken. .TP WMF_MBOX Name of the mailbox, - is used for stdin .TP WMF_MCMD Mail-command (default MAILTO:) .TP WMF_NAME Name of the mailinglist .TP WMF_RSORT Reverse sorting .TP WMF_WMODE Write-mode (0=indexing 1=append 2=overwrite) .SH EXAMPLES .SH AUTHOR .NF Norbert Kuemin .FI .LP .SH FILES .NF ~/.wmfrc .FI .LP .SH SEE ALSO .NF wmfrc (1), procmail (1) .FI .SH NOTES .NF Thanks to all the people, who sent emails with bug-reports and suggestions. .FI .SH BUGS .NF There will always rest one bug (Murphys law). If you find it, so please report it to Norbert.Kuemin@gmx.net .FI .SH COPYRIGHT .NF Copyright 1996, 1997 by Norbert Kuemin. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. .FI wmf-1.0.5.orig/doc/LICENSE100644 1751 1751 43242 6323516426 15157 0ustar christophclameter GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. wmf-1.0.5.orig/doc/wmfrc.1100644 1751 1751 11621 6652321270 15342 0ustar christophclameter.TH WMF 1 "December 1997" .UC 4 .SH NAME wmfrc \- Configuration file for wmf. .SH DESCRIPTION Use the configuration file for all configurational features of wmf. Wmf is looking for .wmfrc as default if nothing else defined. .SH COMMANDS Available command line options are the following: .TP AboutLink = If this link presents it will be placed to the index section. .TP AuthorCaseSort = 0n|Off Sorting the author index case senitive .TP AuthorEmailSort = 0n|Off Sorting the author index by email address. .TP BodyHtmlConvert = 0n|Off Turning html convert of the mail-body on/off. .TP BodyLinkEmail = 0n|Off Turning email detecting in the mail-body on/off. .TP BodyLinkUrl = 0n|Off Turning url detecting in the mail-body on/off. .TP BodyReplyChars = Defining characters who indicate the begin of reply text. As example ">". .TP DayLimit = Mails older then days won't be listed in the indexes. 0 = no limit (default=0). .TP DebugLevel = Debug level (Bit0=Functions Bit1=Information Bit2=Fileoperations) .TP Directory = Where all the files write to (default ./) .TP DocEndFile = Includefile for the end of the document .TP DocStartFile = Includefile for the begin of the document .TP Extension = Define the file extension (default=".html"). .TP FaceDirectory = Directory where to store the face files. Attention: This directory is RELATIVE to the html directory. .TP FaceNoData = What to include, if there are no face datas. .TP FaceSupport = 0n|Off Turn face support on/off. .TP FilePermission = Set file permission after creation. Numeric mode only like chown (1) .TP FolderName = Name of the mail folder. .TP FrameNameIndex = Name of the frame where the index is. .TP FrameNameText = Name of the frame where the mailtext is. .TP FrameNameTitle = Name of the frame where the title is. .TP FrameSupport = 0n|Off Turn frame support on/off. .TP HtmlBodyStart = Replacement for .TP HtmlBodyEnd = Replacement for .TP HtmlSeparator = Replacement for
.TP HtmlReplyStart = If you want display the reply text italic put a here. .TP HtmlReplyEnd = If you want display the reply text italic put a here. .TP IndexAuthor = 0n|Off Turning indexing by author (author.html) on/off. .TP IndexDate = 0n|Off Turning indexing by date (date.html) on/off. .TP IndexSubject = 0n|Off Turning indexing by subject (subject.html) on/off. .TP IndexThread = 0n|Off Turning indexing by thread (thread.html) on/off. .TP LineSize = Lines greater then the defined limit will be breaked at the last space. If there wasn't any space the search continues to the next after the limit. If there isn't ANY space in the whole line, no breakes. .TP MailboxFile = Name of the mailbox file, - is used for stdin. .TP MailCommand = Mail-command (default MAILTO:) .TP MessageCount = 0n|Off Print the amount of messages in the first page of every index file. .TP NewSubjectThread = 0n|Off Make a new Thread if the Subject changes in a reply. .TP PageSize = Lines / page index. 0 = only one page (default 0). Threads won't be brocken. .TP SortOrder = NewFirst|NewLast Define sorting .TP Statistics = 0n|Off Turn statistic on/off. .TP SubjectCaseSort = 0n|Off Sorting the subject index case senitive .TP ThreadCaseSort = 0n|Off Sorting the thread index case senitive .TP WriteMode = Write-mode (0=indexing 1=overwrite 2=append 3=append no index). .B Mode 0: If you made changes manual or anything went wrong until indexing. .B Mode 1: If you want to start from scratch witch one big mbox file. .I Warning: All files in the directory will be deleted !!! .B Mode 2: If you want to extend an existing archive. .B Mode 3: Specialy made if you need to convert emails stored in single files. After converting all files you can call WMF again in Mode 0 for indexing. .SH AUTHOR .NF Norbert Kuemin .FI .LP .SH FILES .NF ~/.wmfrc .FI .LP .SH SEE ALSO .NF wmf (1) .FI .SH NOTES .NF Thanks to all the people, who sent emails with bug-reports and suggestions. .FI .SH BUGS .NF There will always rest one bug (Murphys law). If you find it, so please report it to Norbert.Kuemin@gmx.net .FI .SH COPYRIGHT .NF Copyright 1996, 1997 by Norbert Kuemin. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. .FI wmf-1.0.5.orig/doc/Decoding.txt100644 1751 1751 1322 6323516426 16400 0ustar christophclameterQuoted printable ================ Mime detection = "Content-Transfer-Encoding: quoted-printable" Other detection = None =\n Ignore the newline =xx xx=2 hex.-digits -> 8-Bit character Base64 ====== Mime detection = "Content-Transfer-Encoding: base64" Other detection = None Using the following alphabet (65 chars) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" Char 1-64 be used to convert (6Bit) Char 65 marks the end 4x6Bit = 3x8Bit AAAAAA AABBBB BBBBCC CCCCCC = AAAAAAAA BBBBBBBB CCCCCCCC Uuencode ======== Mime detection = "Content-Transfer-Encoding: x-uuencode" Other detection = "begin xxx filename" where xxx=fileperm. (octal) Using the ascii alphabet (SPACE = 0) and using 6 bit wmf-1.0.5.orig/doc/FAQ100644 1751 1751 1205 6467062736 14466 0ustar christophclameter Frequently Asked Questens (FAQ) and the Answers ------------------------------------------------------------------------------- 0. INDEX -------- 1. Mime types 1.1 warning: unknown mime type "TEXT" 2. More features 2.1 Next and the previous message. 1. MIME TYPES ------------- Q1.1 I get a warning (warning: unknown mime type "TEXT"). A1.1 This is true, this is not a real MIME Type. Elm seams to use this. 2. MORE FEATURES ---------------- Q2.1 What about linking the next and the previous message. A2.1 If you want use extended navigation, you have to use the frame support. wmf-1.0.5.orig/doc/wmf-1.0.lsm100644 1751 1751 1226 6510713464 15727 0ustar christophclameterBegin3 Title: wmf - Web Mail Folder Version: 1.0.3 Entered-date: 02APR98 Description: Converting mail to html and create index files Description: http://www.lugs.ch/LUGS_Members/norbert.kuemin/wmf.html Keywords: mail www face wmf webmailfolder Author: norbert.kuemin@gmx.net (Norbert Kuemin) Maintained-by: norbert.kuemin@gmx.net (Norbert Kuemin) Primary-site: sunsite.unc.edu /pub/Linux/apps/www/converters/ 45 kB wmf-1.0.3.tar.gz Alternate-site: Original-site: ftp.lugs.ch /pub/linux/mail Platforms: Linux, SCO, AIX, Solaris, Digital Unix, Sinix, Irix, FreeBSD Platforms: SunOS, HP UX, OS/2 EMX Copying-policy: GPL End wmf-1.0.5.orig/doc/frame.txt100644 1751 1751 2561 6456113333 15761 0ustar christophclameterWebMailFolder using frames ========================== Concept (grafical Layout) ------------------------- +-------------------------------------------------------------------+ l T i t e l l l [thread] [date] [subject] [author] [about] WebMailFolder l +---------------------+---------------------------------------------+ l l l l Index l Mail l l l l l l l l l l l l l l l l +---------------------+---------------------------------------------+ Frame name ---------- For title = title For index = index For mail = mail All frame names should be configurable. Files ----- index.html Creating frames, loading title, prefered index and statistics. *thread[_x].html threaded index file(s). *date[_x].html index file(s) sorted by date. *subject[_x].html index file(s) sorted by subject. *author[_x].html index file(s) sorted by author. *stats.html statistics. * = will be created by WMF wmf-1.0.5.orig/examples/ 40755 1751 1751 0 6652406360 15101 5ustar christophclameterwmf-1.0.5.orig/examples/procmailrc100644 1751 1751 1201 6323516426 17246 0ustar christophclameter# This is an example how to use wmf with procmail. # This examples is in use at the Linux User Group Switzerland (LUGS) # to make the Mailinglist visible by WWW. # All mails from the mailing list go to wmf and all the others will be # forwarded to me. # Please check if all the paths in PATH are reachable, remove the ones that # are not. PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin: MAILDIR = $HOME/Mail DEFAULT = $MAILDIR/mbox LOGFILE = $MAILDIR/from LOCKFILE= $HOME/.lockmail :0: *^Sender: owner-lugs@lugs.ch |/home/wwwadmin/bin/wmf -m - -d /home/wwwadmin/LUGS -n "LUGS Mailinglist Archiv" -w 2 -f 644 -r :0: !Norbert.Kuemin@LUGS.ch wmf-1.0.5.orig/examples/xfmail.sh100755 1751 1751 543 6323516426 16777 0ustar christophclameter#/bin/sh # # Converting a folder (xfmail) to html SRC_DIR="./mail" DEST_DIR="./html" LIST_NAME="Test archive" LIST_DEBUG=0 DIR="`ls ${SRC_DIR}/*`" for filename in ${DIR} ; do echo "${filename}" wmf -w 3 -m ${filename} -d ${DEST_DIR} -n "${LIST_NAME}" -x ${LIST_DEBUG} done echo "Indexing ..." wmf -w 0 -d ${DEST_DIR} -n ${LIST_NAME} -x ${LIST_DEBUG} wmf-1.0.5.orig/examples/wmfrc100644 1751 1751 2767 6652406337 16257 0ustar christophclameter# This should be an example how to use a configuration file in the future # Want some option more ??? Send me an email Norbert.Kuemin@LUGS.ch # Inactive (#) commands are NOT implemented # Include files #DocStartFile = "../inc_start.html" #DocEndFile = "../inc_end.html" # HTML-Commands HtmlBodyStart = "" HtmlBodyEnd = "" #HtmlSeparator = "" HtmlReplyStart = "" HtmlReplyEnd = "" # Of course you can configure all switches #AboutLink = "http://www.YourSite.com/MyMailinglist/about.html" Directory = "../html" MailCommand = "MAILTO:" FilePermission = 664 DayLimit = 400 MailboxFile = "../my-mail" FolderName = "My own stupid mailfolder" PageSize = 50 SortOrder = "NewFirst" WriteMode = "Overwrite" DebugLevel = 0 # Extended Faces support #FaceSupport = "On" # FaceDirectory is relativ to Directory #FaceDirectory = "faces" #FaceNoData = "../noface.gif" # Frame FrameSupport = "On" FrameNameTitel = "head" FrameNameIndex = "menu" FrameNameMail = "text" # Turn indexing off IndexAuthor = "On" IndexSubject = "On" IndexDate = "On" IndexThread = "On" # Some more goodies Statistics = "On" BodyReplyChars = ">" BodyHtmlConvert = "On" BodyLinkUrl = "On" BodyLinkEmail = "On" #MimeConfigFile = "/var/httpd/wmf/mime.conf" #LineSize = 60 MessageCount = "Off" Extension = ".htm" wmf-1.0.5.orig/examples/mime.conf100644 1751 1751 520 6323516427 16752 0ustar christophclameterContent-Type:image/gif = Content-Type:image/jpeg = Content-Type:image/x-xbitmap = Content-Transfer-Encoding:quoted-printable = Builtin/quoted Content-Transfer-Encoding:base64 = Builtin/base64 Content-Transfer-Encoding:x-uuencode = Shell/"uuencode %if test > %of" wmf-1.0.5.orig/examples/f_index.html100644 1751 1751 1470 6500237534 17477 0ustar christophclameter Sample mailinglist <body bgcolor="#FFFFFF"> <center> <b>Urgent:</b> <p> The following page contains frames. This function will be supported by Netscape 2.0 and MS Explorer 3.0. <p> <b>Wichtige Mitteilung:</b> <p> Die von Ihnen angewählte Seite enthält Frames. Diese Funktion wird erst ab Netscape 2.0 und MS Explorer 3.0 unterstützt. </body> wmf-1.0.5.orig/examples/f_head.html100644 1751 1751 1021 6500237640 17257 0ustar christophclameter

Sample mailinglist

[Thread] [Subject] [Date] [Author] Statistics WebMailFolder
wmf-1.0.5.orig/examples/Files100644 1751 1751 421 6500241641 16127 0ustar christophclameterFiles You are reading this right now ;-) f_head.html Sample head for frames f_index.html Sample structur for frames mime.conf Just an idea procmailrc Sample for procmail wmfrc Sample for a WMF configuration file xfmail.sh Shellscript for converting xfmail-folder to html wmf-1.0.5.orig/src/ 40755 1751 1751 0 6702305632 14046 5ustar christophclameterwmf-1.0.5.orig/src/config.c100644 1751 1751 62711 6677762706 15627 0ustar christophclameter/************************************************************* * WebMailFolder * * COPYRIGHT 1998 by Norbert Kuemin * *************************************************************/ #define CONFIG_FILE #include "wmf.h" /* Reading different configurations with the following priority: 1 = program switches 2 = giving configuration file (-c) 3 = enviroments 4 = defines */ void InitConfig() { config.ConfigFile = NULL; config.Directory = NULL; config.MailBoxFile = NULL; config.MailCommand = NULL; config.Name = NULL; config.AboutLink = NULL; config.NoFaceFile = NULL; config.ReplyChars = NULL; config.FaceDirectory = NULL; config.DocStartFile = NULL; config.DocEndFile = NULL; config.DebugLevel = WMF_NOVALUE; config.ListLimit = WMF_NOVALUE; config.PageSize = WMF_NOVALUE; config.SortOrder = WMF_NOVALUE; config.WriteMode = WMF_NOVALUE; config.BodyHtmlConvert = WMF_NOVALUE; config.BodyLinkUrl = WMF_NOVALUE; config.BodyLinkEmail = WMF_NOVALUE; config.FaceSupport = WMF_NOVALUE; config.ThreadNewSubject = WMF_NOVALUE; config.NewFilePerm = 0; config.ThreadLevelLimit = 0; config.AuthorEmailSort = WMF_NOVALUE; config.AuthorCaseSort = WMF_NOVALUE; config.SubjectCaseSort = WMF_NOVALUE; config.ThreadCaseSort = WMF_NOVALUE; config.IndexAuthor = WMF_NOVALUE; config.IndexDate = WMF_NOVALUE; config.IndexSubject = WMF_NOVALUE; config.IndexThread = WMF_NOVALUE; config.LineSize = WMF_NOVALUE; config.CountMessages = WMF_NOVALUE; config.FrameSupport = WMF_NOVALUE; config.FrameNameTitle = NULL; config.FrameNameIndex = NULL; config.FrameNameMail = NULL; config.Statistics = WMF_NOVALUE; config.Extension = NULL; } void DestroyConfig(void) { if (config.ConfigFile != NULL) { if (config.DebugLevel & 2) printf("..ConfigFile\n"); freechar(config.ConfigFile); config.ConfigFile = NULL; } if (config.Directory != NULL) { if (config.DebugLevel & 2) printf("..Directory\n"); freechar(config.Directory); config.Directory = NULL; } if (config.MailBoxFile != NULL) { if (config.DebugLevel & 2) printf("..MailBoxFile\n"); freechar(config.MailBoxFile); config.MailBoxFile = NULL; } if (config.MailCommand != NULL) { if (config.DebugLevel & 2) printf("..MailCommand\n"); freechar(config.MailCommand); config.MailCommand = NULL; } if (config.Name != NULL) { if (config.DebugLevel & 2) printf("..Name\n"); freechar(config.Name); config.Name = NULL; } if (config.AboutLink != NULL) { if (config.DebugLevel & 2) printf("..AboutLink\n"); freechar(config.AboutLink); config.AboutLink = NULL; } if (config.NoFaceFile != NULL) { if (config.DebugLevel & 2) printf("..NoFaceFile\n"); freechar(config.NoFaceFile); config.NoFaceFile = NULL; } if (config.ReplyChars != NULL) { if (config.DebugLevel & 2) printf("..ReplyChars\n"); freechar(config.ReplyChars); config.ReplyChars = NULL; } if (config.FaceDirectory != NULL) { if (config.DebugLevel & 2) printf("..FaceDirectory\n"); freechar(config.FaceDirectory); config.FaceDirectory = NULL; } if (config.DocStartFile != NULL) { if (config.DebugLevel & 2) printf("..DocStartFile\n"); freechar(config.DocStartFile); config.DocStartFile = NULL; } if (config.DocEndFile != NULL) { if (config.DebugLevel & 2) printf("..DocEndFile\n"); freechar(config.DocEndFile); config.DocEndFile = NULL; } if (config.FrameNameTitle != NULL) { if (config.DebugLevel & 2) printf("..FrameNameTitle\n"); freechar(config.FrameNameTitle); config.FrameNameTitle = NULL; } if (config.FrameNameIndex != NULL) { if (config.DebugLevel & 2) printf("..FrameNameIndex\n"); freechar(config.FrameNameIndex); config.FrameNameIndex = NULL; } if (config.FrameNameMail != NULL) { if (config.DebugLevel & 2) printf("..FrameNameMail\n"); freechar(config.FrameNameMail); config.FrameNameMail = NULL; } if (config.Extension != NULL) { if (config.DebugLevel & 2) printf("..Extension\n"); freechar(config.Extension); config.Extension = NULL; } } void GetConfigFile () { /* 1. Configfile from switches 2. Configfile from enviroment 3. Configfile from defaults */ if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 1)) printf(".GetConfigFile\n"); if ((char *)getenv("WMF_CONFIG") != NULL) { if (config.ConfigFile == NULL) { config.ConfigFile = newchar(strlen((char *)getenv("WMF_CONFIG"))+1); strncpy(config.ConfigFile,(char *)getenv("WMF_CONFIG"),strlen((char *)getenv("WMF_CONFIG"))+1); } } #ifdef WMF_CONFIG if (config.ConfigFile == NULL) { config.ConfigFile = dupchar(WMF_CONFIG); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..configfile = %s\n",(config.ConfigFile ? config.ConfigFile : "(null)")); } void ReadDefaults () { if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 1)) printf(".ReadDefaults\n"); #ifdef WMF_DEBUGLEVEL if (config.DebugLevel == WMF_NOVALUE) { config.DebugLevel = WMF_DEBUGLEVEL; } #endif #ifdef WMF_MBOX if (config.MailBoxFile == NULL) { config.MailBoxFile = newchar(strlen(WMF_MBOX)+1); strncpy(config.MailBoxFile,WMF_MBOX,strlen(WMF_MBOX)+1); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..mailboxfile = %s\n",config.MailBoxFile); #ifdef WMF_MBOX if (config.MailCommand == NULL) { config.MailCommand = newchar(strlen(WMF_MCMD)+1); strncpy(config.MailCommand,WMF_MCMD,strlen(WMF_MCMD)+1); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..mailcommand = %s\n",config.MailCommand); #ifdef WMF_DIR if (config.Directory == NULL) { config.Directory = newchar(strlen(WMF_DIR)+1); strncpy(config.Directory,WMF_DIR,strlen(WMF_DIR)+1); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..directory = %s\n",config.Directory); #ifdef WMF_NAME if (config.Name == NULL) { config.Name = newchar(strlen(WMF_NAME)+1); strncpy(config.Name,WMF_NAME,strlen(WMF_NAME)+1); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..name = %s\n",(config.Name ? config.Name : "(null)")); #ifdef HTML_APPEND if (config.WriteMode == HTML_NOMODE) { config.WriteMode = HTML_APPEND; } #endif #ifdef HTML_OVERWRITE if (config.WriteMode == HTML_NOMODE) { config.WriteMode = HTML_OVERWRITE; } #endif #ifdef WMF_DEFAULT_THREADNEWSUBJECT if (config.ThreadNewSubject == HTML_NOMODE) { config.ThreadNewSubject = TRUE; } #endif #ifdef HTML_INDEX if (config.WriteMode == HTML_NOMODE) { config.WriteMode = HTML_INDEX; } #endif #ifdef WMF_FRAME_TITLE if (config.FrameNameTitle == NULL) { config.FrameNameTitle = newchar(strlen(WMF_FRAME_TITLE)+1); strncpy(config.FrameNameTitle,WMF_FRAME_TITLE,strlen(WMF_FRAME_TITLE)+1); } #endif #ifdef WMF_FRAME_INDEX if (config.FrameNameIndex == NULL) { config.FrameNameIndex = newchar(strlen(WMF_FRAME_INDEX)+1); strncpy(config.FrameNameIndex,WMF_FRAME_INDEX,strlen(WMF_FRAME_INDEX)+1); } #endif #ifdef WMF_FRAME_MAIL if (config.FrameNameMail == NULL) { config.FrameNameMail = newchar(strlen(WMF_FRAME_MAIL)+1); strncpy(config.FrameNameMail,WMF_FRAME_MAIL,strlen(WMF_FRAME_MAIL)+1); } #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..writemode = %d\n",config.WriteMode); if (config.BodyHtmlConvert == WMF_NOVALUE) config.BodyHtmlConvert = TRUE; if (config.BodyLinkUrl == WMF_NOVALUE) config.BodyLinkUrl = TRUE; if (config.BodyLinkEmail == WMF_NOVALUE) config.BodyLinkEmail = TRUE; if (config.ThreadNewSubject == WMF_NOVALUE) config.ThreadNewSubject = FALSE; if (config.AuthorEmailSort == WMF_NOVALUE) config.AuthorEmailSort = FALSE; if (config.AuthorCaseSort == WMF_NOVALUE) config.AuthorCaseSort = TRUE; if (config.SubjectCaseSort == WMF_NOVALUE) config.SubjectCaseSort = TRUE; if (config.ThreadCaseSort == WMF_NOVALUE) config.ThreadCaseSort = TRUE; if (config.IndexAuthor == WMF_NOVALUE) config.IndexAuthor = TRUE; if (config.IndexDate == WMF_NOVALUE) config.IndexDate = TRUE; if (config.IndexSubject == WMF_NOVALUE) config.IndexSubject = TRUE; if (config.IndexThread == WMF_NOVALUE) config.IndexThread = TRUE; if (config.CountMessages == WMF_NOVALUE) config.CountMessages = TRUE; if (config.FrameSupport == WMF_NOVALUE) config.FrameSupport = FALSE; if (config.Statistics == WMF_NOVALUE) config.Statistics = FALSE; #ifdef WMF_EXTENSION if (config.Extension == NULL) config.Extension = dupchar(WMF_EXTENSION); #endif if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..EXTENSION = %s\n",config.Extension); } void ReadEnviroments () { if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 1)) printf(".ReadEnviroments\n"); if ((char *)getenv("WMF_DEBUG") != NULL) { if (config.DebugLevel == WMF_NOVALUE) { config.DebugLevel = atoi(getenv("WMF_DEBUG")); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_DEBUG = %d\n",config.DebugLevel); } } if ((char *)getenv("WMF_WMODE") != NULL) { if (config.WriteMode == WMF_NOVALUE) { config.WriteMode = atoi(getenv("WMF_WMODE")); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_WMODE = %d\n",config.WriteMode); } } if ((char *)getenv("WMF_DAYS") != NULL) { if (config.ListLimit == WMF_NOVALUE) { config.ListLimit = time(NULL) - atoi(getenv("WMF_DAYS")) * 24 * 60 * 60; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_DAYS = %s",ctime(&config.ListLimit)); } } if ((char *)getenv("WMF_LINES") != NULL) { if (config.PageSize == WMF_NOVALUE) { config.PageSize = atoi(getenv("WMF_LINES")); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_LINES = %d\n",config.PageSize); } } if ((char *)getenv("WMF_RSORT") != NULL) { if (config.SortOrder == WMF_NOVALUE) { config.SortOrder = SORT_REVERSE; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_SORT = SORT_REVERSE\n"); } } if ((char *)getenv("WMF_MBOX") != NULL) { if (config.MailBoxFile == NULL) { config.MailBoxFile = newchar(strlen((char *)getenv("WMF_MBOX"))+1); strncpy(config.MailBoxFile,(char *)getenv("WMF_MBOX"),strlen((char *)getenv("WMF_MBOX"))+1); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_MBOX = %s\n",config.MailBoxFile); } } if ((char *)getenv("WMF_DIR") != NULL) { if (config.Directory == NULL) { config.Directory = newchar(strlen((char *)getenv("WMF_DIR"))+1); strncpy(config.Directory,(char *)getenv("WMF_DIR"),strlen((char *)getenv("WMF_DIR"))+1); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_DIR = %s\n",config.Directory); } } if ((char *)getenv("WMF_NAME") != NULL) { if (config.Name == NULL) { config.Name = newchar(strlen((char *)getenv("WMF_NAME"))+1); strncpy(config.Name,(char *)getenv("WMF_NAME"),strlen((char *)getenv("WMF_NAME"))+1); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_NAME = %s\n",config.Name); } } if ((char *)getenv("WMF_MCMD") != NULL) { if (config.MailCommand == NULL) { config.MailCommand = newchar(strlen((char *)getenv("WMF_MCMD"))+1); strncpy(config.MailCommand,(char *)getenv("WMF_MCMD"),strlen((char *)getenv("WMF_MCMD"))+1); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_MCMD = %s\n",config.MailCommand); } } if ((char *)getenv("WMF_EXTENSION") != NULL) { if (config.Extension == NULL) { config.Extension = newchar(strlen((char *)getenv("WMF_EXTENSION"))+1); strncpy(config.Extension,(char *)getenv("WMF_EXTENSION"),strlen((char *)getenv("WMF_EXTENSION"))+1); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..WMF_EXTENSION = %s\n",config.Extension); } } } void ReadConfigFile (char *FileName) { FILE *fd; char line[BUFSIZ], *ls_temp, *ls_varname, *ls_varvalue; int li_temp; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 1)) printf(".ReadConfigFile %s\n",FileName); fd = fopen(FileName,"r"); if (fd != NULL) { while(fgets(line,BUFSIZ,fd) != NULL) { if (strlen(line) > 0) if (line[strlen(line)-1] == '\n') line[strlen(line)-1] = '\0'; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..Line read = >%s<\n",line); ls_temp = line; /* cut leading spaces */ while ((ls_temp[0] == ' ') || (ls_temp[0] == '\t')) ls_temp++; if((ls_temp[0] != '#') && (strchr(ls_temp,'=') != NULL)) { /* Get varname */ li_temp = 0; while((ls_temp[li_temp] != '=') && (ls_temp[li_temp] != '\0')) li_temp++; if (li_temp > 0) li_temp--; while (((ls_temp[li_temp] == ' ') || (ls_temp[li_temp] == '\t')) && (li_temp > 0)) li_temp--; ls_varname = newchar(li_temp+2); ls_varname[0] = '\0'; strncat(ls_varname,ls_temp,li_temp+1); for(li_temp=0;li_temp%s<\n",ls_varname); if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..Varvalue = >%s<\n",ls_varvalue); if (strcmp(ls_varname,"HTMLBODYSTART") == 0) { if (HtmlCmd.BodyStart != NULL) freechar(HtmlCmd.BodyStart); HtmlCmd.BodyStart = dupchar(ls_varvalue); } if (strcmp(ls_varname,"HTMLBODYEND") == 0) { if (HtmlCmd.BodyEnd != NULL) freechar(HtmlCmd.BodyEnd); HtmlCmd.BodyEnd = dupchar(ls_varvalue); } if (strcmp(ls_varname,"HTMLREPLYSTART") == 0) { if (HtmlCmd.ReplyStart != NULL) freechar(HtmlCmd.ReplyStart); HtmlCmd.ReplyStart = dupchar(ls_varvalue); } if (strcmp(ls_varname,"HTMLREPLYEND") == 0) { if (HtmlCmd.ReplyEnd != NULL) freechar(HtmlCmd.ReplyEnd); HtmlCmd.ReplyEnd = dupchar(ls_varvalue); } if (strcmp(ls_varname,"HTMLSEPARATOR") == 0) { if (HtmlCmd.HrStart != NULL) freechar(HtmlCmd.HrStart); HtmlCmd.HrStart = dupchar(ls_varvalue); } if (strcmp(ls_varname,"FACENODATA") == 0) { if (config.NoFaceFile != NULL) freechar(config.NoFaceFile); config.NoFaceFile = dupchar(ls_varvalue); } if (strcmp(ls_varname,"FACEDIRECTORY") == 0) { if (config.FaceDirectory != NULL) freechar(config.FaceDirectory); config.FaceDirectory = dupchar(ls_varvalue); } if (strcmp(ls_varname,"ABOUTLINK") == 0) { if (config.AboutLink == NULL) { config.AboutLink = dupchar(ls_varvalue); } } if (strcmp(ls_varname,"DIRECTORY") == 0) { if (config.Directory == NULL) { config.Directory = dupchar(ls_varvalue); } } if (strcmp(ls_varname,"MAILCOMMAND") == 0) { if (config.MailCommand == NULL) { config.MailCommand = dupchar(ls_varvalue); } } if (strcmp(ls_varname,"MAILBOXFILE") == 0) { if (config.MailBoxFile == NULL) { config.MailBoxFile = dupchar(ls_varvalue); } } if (strcmp(ls_varname,"FOLDERNAME") == 0) { if (config.Name == NULL) { config.Name = dupchar(ls_varvalue); } } if (strcmp(ls_varname,"DEBUGLEVEL") == 0) { if (config.DebugLevel == WMF_NOVALUE) { config.DebugLevel = atoi(ls_varvalue); } } if (strcmp(ls_varname,"BODYREPLYCHARS") == 0) { if (config.ReplyChars != NULL) freechar(config.ReplyChars); config.ReplyChars = dupchar(ls_varvalue); } if (strcmp(ls_varname,"BODYHTMLCONVERT") == 0) { for(li_temp=0;li_temp * *************************************************************/ #define DATE_FILE #include "wmf.h" static char *monthname[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug", "Sep","Oct","Nov","Dec"}; time_t getutc(char *atime) { /* converting datestring to time_t */ time_t iserialtime; int ioffset; char smonth[4], *tmpstr; struct tm timeval; if (config.DebugLevel & 1) printf(".getutc(%s)\n",atime); if (atime == NULL) return 0; tmpstr = atime; if (atime[3] == ',') tmpstr = tmpstr + 4; /* remove day of week */ /* remove all spaces */ while ((tmpstr[0] == ' ') && (tmpstr[0] != '\0')) tmpstr++; timeval.tm_mday = 0; while ((tmpstr[0] != ' ') && (tmpstr[0] != '\0')) { timeval.tm_mday = timeval.tm_mday * 10 + (tmpstr[0] - 48); tmpstr++; } if ((timeval.tm_mday < 1) || (timeval.tm_mday > 31)) return 0; /* remove all spaces */ while ((tmpstr[0] == ' ') && (tmpstr[0] != '\0')) tmpstr++; strncpy(smonth,tmpstr,4); smonth[3] = '\0'; timeval.tm_mon = 0; while (timeval.tm_mon < 11) { if(strcmp(smonth,monthname[timeval.tm_mon]) == 0) break; timeval.tm_mon++; } if (strlen(tmpstr)>3) tmpstr = tmpstr + 4; /* remove month */ timeval.tm_year = 0; while ((tmpstr[0] != ' ') && (tmpstr[0] != '\0')) { timeval.tm_year = timeval.tm_year * 10 + (tmpstr[0] - 48); tmpstr++; } /* remove all spaces */ while ((tmpstr[0] == ' ') && (tmpstr[0] != '\0')) tmpstr++; if (timeval.tm_year > 1900) timeval.tm_year = timeval.tm_year - 1900; if (strlen(tmpstr)>2) { timeval.tm_hour = (tmpstr[0] - 48) * 10 + (tmpstr[1] - 48); tmpstr = tmpstr + 3; /* remove hour */ } if (strlen(tmpstr)>1) { timeval.tm_min = (tmpstr[0] - 48) * 10 + (tmpstr[1] - 48); tmpstr = tmpstr + 2; /* remove minutes */ } if (tmpstr[0] == ':') { tmpstr++; if (strlen(tmpstr)>1) { timeval.tm_sec = (tmpstr[0] - 48) * 10 + (tmpstr[1] - 48); tmpstr = tmpstr + 2; /* remove seconds */ } } else { timeval.tm_sec = 0; } ioffset = 0; /* remove all spaces */ while ((tmpstr[0] == ' ') && (tmpstr[0] != '\0')) tmpstr++; if (strlen(tmpstr) > 4) { if((tmpstr[0] == '+') || (tmpstr[0] == '-')) { ioffset = ((tmpstr[1] - 48) * 10 + (tmpstr[2] - 48)) * 60; ioffset = ioffset + ((tmpstr[3] - 48) * 10 + (tmpstr[4] - 48)); ioffset = ioffset * 60; } } if (tmpstr[0] == '+') { iserialtime = mktime(&timeval) - ioffset; } else { iserialtime = mktime(&timeval) + ioffset; } if (config.DebugLevel & 2) printf("..getutc_Return(%d)\n",iserialtime); return iserialtime; } wmf-1.0.5.orig/src/file.c100644 1751 1751 12434 6656366515 15271 0ustar christophclameter/************************************************************* * WebMailFolder * * COPYRIGHT 1998 by Norbert Kuemin * *************************************************************/ #define FILE_FILE #include "wmf.h" int FileExist (char *FileName) { FILE *fd; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".FileExist(%s)\n",FileName); fd = fopen(FileName,"r"); if (fd == NULL) { return FALSE; } else { fclose(fd); return TRUE; } } char *CheckHomeDir(char *Name) { int newsize; char *newname; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".CheckHomeDir(%s)\n",Name); if (Name != NULL) { if (Name[0] == '~') { newsize = strlen(Name)+strlen((char *)getenv("HOME")+1); newname = newchar(newsize); strcpy(newname,(char *)getenv("HOME")); Name++; strcat(newname,Name); Name--; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf("..%s -> %s\n",Name,newname); } else { newname = dupchar(Name); } return newname; } return Name; } void NewFile(char *FileName, char *Text) { FILE *fd; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) if (config.NewFilePerm != 0) { printf(".NewFile(%s) Perm=%o\n",FileName,(int) config.NewFilePerm); } else { printf(".NewFile(%s)\n",FileName); } fd = fopen(FileName,"w"); if (fd != NULL) { fprintf(fd,"%s",Text); fclose(fd); } if (config.NewFilePerm != 0) { if ((chmod(FileName, config.NewFilePerm)<0) && (config.DebugLevel & 4)) { printf(".NewFile(%s) couldn't set perm to %o\n",FileName,(int) config.NewFilePerm); } } } void AppendFile(char *FileName, char *Text) { static FILE *fd1 = NULL; static char *LastFileName = NULL; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".AppendFile(%s,\"%s\")\n",FileName,Text); if ((LastFileName == NULL) || (strcmp(LastFileName,FileName) != 0)) { if (fd1 != NULL) { fclose(fd1); fd1 = NULL; } if (LastFileName != NULL) { freechar(LastFileName); LastFileName = NULL; } if (strlen(FileName) > 0) { LastFileName = dupchar(FileName); fd1 = fopen(FileName,"a"); } } if (fd1 != NULL) { fprintf(fd1,"%s",Text); } } void IncludeFile(char *FileName, char *FileInclude) { FILE *fd; char line[BUFSIZ]; if (FileExist(FileInclude) == TRUE) { fd = fopen(FileInclude,"r"); if (fd != NULL) { while (feof(fd) == 0) { fgets(line,BUFSIZ,fd); if (feof(fd) == 0) AppendFile(FileName,line); } fclose(fd); } } } char *GetFileName(int number) { int dirlen; char *file; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".GetFileName(%d)\n",number); /* calculate filename = dir + / + number.html + \0 */ if (config.Directory == NULL) { dirlen = 0; } else { dirlen = strlen(config.Directory); } if (dirlen == 0) { file = newchar(254); sprintf(file,"%d%s",number,config.Extension); } else { file = newchar(dirlen + 255); sprintf(file,"%s/%d%s",config.Directory,number,config.Extension); } return file; } int GetNextFileNumber(int start) { int counter; char *file; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".GetNextFileNumber\n"); counter = start; while ((counter >= 0) && (counter < 1000000)) { file = GetFileName(counter); if (!FileExist(file)) { freechar(file); return counter; } else { freechar(file); counter++; } } return counter; } void CleanDirectory(char *DirName) { DIR *dd; struct dirent *DirEntry; char *FileName; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".CleanDirectory(%s)\n",DirName); dd = opendir(DirName); DirEntry = readdir(dd); while (DirEntry != NULL) { if ((strcmp(DirEntry->d_name,".") != 0) && (strcmp(DirEntry->d_name,"..") != 0)) { FileName = newchar(strlen(DirName)+strlen(DirEntry->d_name)+2); sprintf(FileName,"%s/%s",DirName,DirEntry->d_name); remove(FileName); freechar(FileName); } DirEntry = readdir(dd); } closedir(dd); } void DelIndexFiles(void) { DIR *dd; struct dirent *DirEntry; char *FileName; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 4)) printf(".DelIndexFiles\n"); dd = opendir(config.Directory); DirEntry = readdir(dd); while (DirEntry != NULL) { if ((strncmp(DirEntry->d_name,"date",4) == 0) || (strncmp(DirEntry->d_name,"subject",7) == 0) || (strncmp(DirEntry->d_name,"thread",6) == 0) || (strncmp(DirEntry->d_name,"stats",6) == 0) || (strncmp(DirEntry->d_name,"author",6) == 0)) { FileName = newchar(strlen(config.Directory) + strlen(DirEntry->d_name) + 2); sprintf(FileName,"%s/%s",config.Directory,DirEntry->d_name); if (config.DebugLevel & 2) printf(".del %s\n",FileName); remove(FileName); freechar(FileName); } DirEntry = readdir(dd); } closedir(dd); } wmf-1.0.5.orig/src/html.c100644 1751 1751 14321 6656366515 15313 0ustar christophclameter/************************************************************* * WebMailFolder * * COPYRIGHT 1998 by Norbert Kuemin * *************************************************************/ #define HTML_FILE #include "wmf.h" void InitHtmlCmd() { HtmlCmd.DocStart = NULL; HtmlCmd.DocEnd = NULL; HtmlCmd.HeadStart = NULL; HtmlCmd.HeadEnd = NULL; HtmlCmd.TitleStart = NULL; HtmlCmd.TitleEnd = NULL; HtmlCmd.BodyStart = NULL; HtmlCmd.BodyEnd = NULL; HtmlCmd.RemarkStart = NULL; HtmlCmd.RemarkEnd = NULL; HtmlCmd.PreStart = NULL; HtmlCmd.PreEnd = NULL; HtmlCmd.Title1Start = NULL; HtmlCmd.Title1End = NULL; HtmlCmd.Title2Start = NULL; HtmlCmd.Title2End = NULL; HtmlCmd.Title3Start = NULL; HtmlCmd.Title3End = NULL; HtmlCmd.Title4Start = NULL; HtmlCmd.Title4End = NULL; HtmlCmd.Title5Start = NULL; HtmlCmd.Title5End = NULL; HtmlCmd.Title6Start = NULL; HtmlCmd.Title6End = NULL; HtmlCmd.BoldStart = NULL; HtmlCmd.BoldEnd = NULL; HtmlCmd.ItalicStart = NULL; HtmlCmd.ItalicEnd = NULL; HtmlCmd.HrStart = NULL; HtmlCmd.HrEnd = NULL; HtmlCmd.ReplyStart = NULL; HtmlCmd.ReplyEnd = NULL; } void EndHtmlCmd() { if (HtmlCmd.DocStart != NULL) freechar(HtmlCmd.DocStart); if (HtmlCmd.DocEnd != NULL) freechar(HtmlCmd.DocEnd); if (HtmlCmd.HeadStart != NULL) freechar(HtmlCmd.HeadStart); if (HtmlCmd.HeadEnd != NULL) freechar(HtmlCmd.HeadEnd); if (HtmlCmd.TitleStart != NULL) freechar(HtmlCmd.TitleStart); if (HtmlCmd.TitleEnd != NULL) freechar(HtmlCmd.TitleEnd); if (HtmlCmd.BodyStart != NULL) freechar(HtmlCmd.BodyStart); if (HtmlCmd.BodyEnd != NULL) freechar(HtmlCmd.BodyEnd); if (HtmlCmd.RemarkStart != NULL) freechar(HtmlCmd.RemarkStart); if (HtmlCmd.RemarkEnd != NULL) freechar(HtmlCmd.RemarkEnd); if (HtmlCmd.PreStart != NULL) freechar(HtmlCmd.PreStart); if (HtmlCmd.PreEnd != NULL) freechar(HtmlCmd.PreEnd); if (HtmlCmd.Title1Start != NULL) freechar(HtmlCmd.Title1Start); if (HtmlCmd.Title1End != NULL) freechar(HtmlCmd.Title1End); if (HtmlCmd.Title2Start != NULL) freechar(HtmlCmd.Title2Start); if (HtmlCmd.Title2End != NULL) freechar(HtmlCmd.Title2End); if (HtmlCmd.Title3Start != NULL) freechar(HtmlCmd.Title3Start); if (HtmlCmd.Title3End != NULL) freechar(HtmlCmd.Title3End); if (HtmlCmd.Title4Start != NULL) freechar(HtmlCmd.Title4Start); if (HtmlCmd.Title4End != NULL) freechar(HtmlCmd.Title4End); if (HtmlCmd.Title5Start != NULL) freechar(HtmlCmd.Title5Start); if (HtmlCmd.Title5End != NULL) freechar(HtmlCmd.Title5End); if (HtmlCmd.Title6Start != NULL) freechar(HtmlCmd.Title6Start); if (HtmlCmd.Title6End != NULL) freechar(HtmlCmd.Title6End); if (HtmlCmd.BoldStart != NULL) freechar(HtmlCmd.BoldStart); if (HtmlCmd.BoldEnd != NULL) freechar(HtmlCmd.BoldEnd); if (HtmlCmd.ItalicStart != NULL) freechar(HtmlCmd.ItalicStart); if (HtmlCmd.ItalicEnd != NULL) freechar(HtmlCmd.ItalicEnd); if (HtmlCmd.HrStart != NULL) freechar(HtmlCmd.HrStart); if (HtmlCmd.HrEnd != NULL) freechar(HtmlCmd.HrEnd); if (HtmlCmd.ReplyStart != NULL) freechar(HtmlCmd.ReplyStart); if (HtmlCmd.ReplyEnd != NULL) freechar(HtmlCmd.ReplyEnd); } void InitHtml(char *FileName) { if (HtmlCmd.DocStart == NULL) { NewFile(FileName,HTMLCMD_DOC_START); } else { NewFile(FileName,HtmlCmd.DocStart); } AppendFile(FileName,"\n"); } void EndHtml(char *FileName) { if (HtmlCmd.DocEnd == NULL) { AppendFile(FileName,HTMLCMD_DOC_END); } else { AppendFile(FileName,HtmlCmd.DocEnd); } AppendFile(FileName,"\n"); } void HtmlRemark(char *FileName, char *Text) { char *tempstr; if (HtmlCmd.RemarkStart == NULL) { AppendFile(FileName,HTMLCMD_REMARK_START); } else { AppendFile(FileName,HtmlCmd.RemarkStart); } if ((FileName == NULL) || (Text == NULL)) return; tempstr = newchar(strlen(Text)+11); sprintf(tempstr," %s ",Text); AppendFile(FileName,tempstr); freechar(tempstr); if (HtmlCmd.RemarkEnd == NULL) { AppendFile(FileName,HTMLCMD_REMARK_END); } else { AppendFile(FileName,HtmlCmd.RemarkEnd); } AppendFile(FileName,"\n"); } void WriteHtmlValue(char *FileName, char *Name, char *Value) { char *tempstr; tempstr = newchar(strlen(Name)+strlen(Value)+4); sprintf(tempstr,"%s=\"%s\"",Name,Value); HtmlRemark(FileName,tempstr); freechar(tempstr); } char *ReadHtmlVarname(char *Line) { char *tempstr; char *returnstr; int length; if ((config.DebugLevel != WMF_NOVALUE) && (config.DebugLevel & 2)) printf(".ReadHtmlVarname(%s)\n",Line); tempstr = Line; /* remove spaces */ while(((tempstr[0] == ' ') || (tempstr[0] == '\t')) && (tempstr[0] != '\0')) tempstr++; if (HtmlCmd.RemarkStart == NULL) if (strncmp(tempstr,HTMLCMD_REMARK_START,strlen(HTMLCMD_REMARK_START)) == 0) { tempstr = tempstr + strlen(HTMLCMD_REMARK_START); /* remove " #define HTMLCMD_PRE_START "
"
#define HTMLCMD_PRE_END		"
" #define HTMLCMD_BOLD_START "" #define HTMLCMD_BOLD_END "" #define HTMLCMD_ITALIC_START "" #define HTMLCMD_ITALIC_END "" #define HTMLCMD_HR_START "
" #define HTMLCMD_HR_END "" wmf-1.0.5.orig/src/mime.h100644 1751 1751 1333 6652406213 15244 0ustar christophclameter#define MIME_CHARSET_UNKNOWN -1 #define MIME_CHARSET_NONE 0 #define MIME_CHARSET_USASCII 1 #define MIME_CHARSET_8859_1 2 #define MIME_TYPE_UNKNOWN -1 #define MIME_TYPE_NONE 0 #define MIME_TYPE_TEXT_PLAIN 1 #define MIME_TYPE_TEXT_ENRICHED 2 #define MIME_TYPE_TEXT_HTML 3 #define MIME_TYPE_MULTIPART_MIXED 4 #define MIME_TYPE_MULTIPART_SIGNED 5 #define MIME_TYPE_APPLICATION_OCTETSTREAM 6 #define MIME_TYPE_APPLICATION_PGP 7 #define MIME_TYPE_IMAGE_GIF 8 #define MIME_TYPE_IMAGE_XBITMAP 9 #define MIME_ENCODE_UNKNOWN -1 #define MIME_ENCODE_NONE 0 #define MIME_ENCODE_7BIT 1 #define MIME_ENCODE_8BIT 2 #define MIME_ENCODE_QUOTED 3 #define MIME_ENCODE_BASE64 4 #define MIME_ENCODE_UUENCODE 5 wmf-1.0.5.orig/src/wmf.h100644 1751 1751 16267 6652406213 15142 0ustar christophclameter#include #include #include #include #include #include #include #include #include #include #include #include "mime.h" #include "html.h" #ifdef FACES #include #endif #ifdef DMALLOC #include #endif #define SORT_FORWARD 0 #define SORT_REVERSE 1 #define HTML_VERSION "1.1" #define HTML_NOMODE -1 #define HTML_INDEX 0 #define HTML_OVERWRITE 1 #define HTML_APPEND 2 #define HTML_APPENDNOINDEX 3 #define WMF_NOVALUE -1 #define WMF_NOSUBJECT "(None)" #define WMF_FRAME_TITLE "title" #define WMF_FRAME_INDEX "index" #define WMF_FRAME_MAIL "mail" #ifndef WMF_DEBUGLEVEL #define WMF_DEBUGLEVEL 0 #endif #ifndef WMF_EXTENSION #define WMF_EXTENSION ".html" #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef BUFSIZ #define BUFSIZ 10240 #endif /* global constantes */ #ifdef INDEX_FILE static char *reply_prefix[] = {"Re:","RE:","Re^2:","Re^4:","Aw:","AW:","re:",NULL}; #endif #ifdef MAIL_FILE static char *protocols[] = {"http:","gopher:","ftp:","news:","file:", "wais:","telnet:",NULL}; #ifdef FACES unsigned char FaceConvertTable[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, }; #endif #endif /* global variables */ #ifndef MAIN_FILE extern #endif struct { char *ProgramName; int DebugLevel; int WriteMode; char *ConfigFile; char *MailBoxFile; char *MailCommand; char *Directory; char *Name; char *AboutLink; char *NoFaceFile; char *ReplyChars; char *FaceDirectory; char *DocStartFile; char *DocEndFile; int SortOrder; int PageSize; time_t ListLimit; time_t ListStart; time_t ListEnd; mode_t NewFilePerm; int ThreadLevelLimit; int ThreadNewSubject; int BodyHtmlConvert; int BodyLinkUrl; int BodyLinkEmail; int FaceSupport; int AuthorEmailSort; int AuthorCaseSort; int SubjectCaseSort; int ThreadCaseSort; int IndexAuthor; int IndexDate; int IndexSubject; int IndexThread; int LineSize; int CountMessages; int FrameSupport; char *FrameNameTitle; char *FrameNameIndex; char *FrameNameMail; int Statistics; char *Extension; } config; #ifndef MAIN_FILE extern #endif struct { char *DocStart; char *DocEnd; char *HeadStart; char *HeadEnd; char *TitleStart; char *TitleEnd; char *BodyStart; char *BodyEnd; char *RemarkStart; char *RemarkEnd; char *PreStart; char *PreEnd; char *Title1Start; char *Title1End; char *Title2Start; char *Title2End; char *Title3Start; char *Title3End; char *Title4Start; char *Title4End; char *Title5Start; char *Title5End; char *Title6Start; char *Title6End; char *BoldStart; char *BoldEnd; char *ItalicStart; char *ItalicEnd; char *HrStart; char *HrEnd; char *ReplyStart; char *ReplyEnd; } HtmlCmd; #ifdef DEBUG #ifndef MAIN_FILE extern #endif struct DebugStruct { int StrAlloc; int StrDeAlloc; int MhAlloc; int MhDeAlloc; int MbAlloc; int MbDeAlloc; } Debug; #endif struct MAILHEAD { struct MAILHEAD *Next; struct MAILHEAD *Prev; char *SendName; char *SendAddress; char *ReceiveName; char *ReceiveAddress; char *SentDate; char *MsgId; char *Reference; char *Subject; char *Xface; char *HomePage; char *FileName; char *AttachFile; int Printed; int InReply; time_t isort; char *ssort; int MimeType; int MimeCharset; int MimeEncode; char *MimeBoundary; char *MimeDescription; }; struct MAILBODY { char *Line; struct MAILBODY *Next; }; #ifndef CONFIG_FILE /* config.c */ void *InitConfig(void); void *DestroyConfig(void); void *ReadConfig(void); #endif #ifndef DATE_FILE /* index.c */ time_t getutc(char *atime); #endif #ifndef INDEX_FILE /* index.c */ void CreateIndex(void); #endif #ifndef FILE_FILE /* file.c */ int FileExist(char *FileName); char *CheckHomeDir(char *Name); void AppendFile(char *FileName, char *Text); void IncludeFile(char *FileName, char *FileInclude); void NewFile(char *FileName, char *Text); char *GetFileName(int number); int GetNextFileNumber(int start); void *CleanDirectory(char *DirName); void *DelIndexFiles(void); #endif #ifndef MAIL_FILE /* mail.c */ char *Email2Html(struct MAILHEAD *mh); void WriteIndexNavigation (char *Filename); void Mail2Html(char *FileName); #endif #ifndef HTML_FILE /* html.c */ void InitHtmlCmd(); void EndHtmlCmd(); void InitHtml(char *FileName); void EndHtml(char *FileName); char *ReadHtmlVarname(char *Line); char *ReadHtmlValue(char *Line); void WriteHtmlValue(char *FileName, char *Name, char *Value); #endif #ifndef SYS_FILE /* sys.c */ #ifdef DMALLOC #define newchar(x) malloc(x) #define dupchar(x) strdup(x) #define freechar(x) free(x) #else char *newchar(int size); char *dupchar(char *string); void freechar(char *string); int isoctal(char number); #endif #endif #ifndef MIME_FILE /* mime.c */ char *Quoted_2_Text(char *Zeile); char *Text_2_Html(char *Zeile); char *ByteConvert4to3(char *line, int *length, int MimeEncode); int GetContentType(char *Zeile); int GetContentEncode(char *Zeile); char *GetBoundary(char *Zeile); char *GetAttachmentName(char *Zeile); int IfUuencode(char *line); char *GetUuencodeFile(char *line); int IsUrlChar(char Zeichen); int GetCharset(char *Zeile); int HeaderIsMimeEncoded(char *Zeile); char *DecodeMimeHeader(char *line); #endif wmf-1.0.5.orig/src/Makefile100644 1751 1751 3377 6702305626 15620 0ustar christophclameter# # Makefile for webmailfolder # created 1996/08/16 by Norbert Kuemin # # Configuration begins here BINDIR= /usr/local/bin MANDIR= /usr/local/man/man1 CC=gcc LDFLAGS= COPTS=-O2 CLIBDIR=-L../../compface CINC=-I../../compface #if you have/want face-support uncomment the two following lines #FACELIB=-lcompface #FACEDEF=-DFACES # Configuration ends here # Program initials CONFIGFILE= \"~/.wmfrc\" MBOXFILE= \"~/mbox\" MAILCMD=\"mailto:\" DIRECTORY=\"./\" EXTENSION=\".html\" NEWSUBJECTTHREAD=0 #0=False 1=True # Program constants PROGRAM=wmf VERSION=1.0.5 PRG_NAME= \"WebMailFolder\" PRG_VERSION= \"$(VERSION)\" PRG_HREF= \"http://www.lugs.ch/lugs/mitglieder/norbert.kuemin/wmf.html\" PINIT= -DWMF_CONFIG=$(CONFIGFILE) -DWMF_MBOX=$(MBOXFILE) -DWMF_MCMD=$(MAILCMD)\ -DWMF_DIR=$(DIRECTORY) -DWMF_DEBUGLEVEL=0 -DWMF_EXTENSION=$(EXTENSION) PCONST= -DNAME=$(PRG_NAME) -DVERSION=$(PRG_VERSION) -DHREF=$(PRG_HREF) CDEFS= $(PINIT) $(PCONST) $(FACEDEF) -Wall CLIB= $(FACELIB) CFLAGS= $(COPTS) $(CDEFS) $(CINC) # Only for debugging (Should be commented) #CDEFS= -DDEBUG $(PINIT) $(PCONST) $(FACEDEF) -Wall #CDEFS= -DDEBUG -DMALLOC $(PINIT) $(PCONST) $(FACEDEF) -Wall #CLIB= $(FACELIB) -ldmalloc OBJS= wmf.o config.o mail.o file.o index.o html.o date.o sys.o mime.o .c.o: $(CC) -c $(CFLAGS) $< all: wmf wmf: $(OBJS) $(CC) -o $(PROGRAM) $(CFLAGS) $(OBJS) $(CLIBDIR) $(CLIB) chmod 0755 $(PROGRAM) $(OBJS): Makefile wmf.h install: install -cs -m 0755 $(PROGRAM) $(BINDIR) chmod 0644 ../doc/wmf.1 chmod 0644 ../doc/wmfrc.1 install -c -m 0644 ../doc/wmf.1 $(MANDIR) install -c -m 0644 ../doc/wmfrc.1 $(MANDIR) clean: rm -f ./$(PROGRAM) *.o *~ core DEADJOE ../doc/*~ ../examples/*~ ../doc/DEADJOE package: clean ( cd ../.. ; tar -zcvf $(PROGRAM)-$(VERSION).tar.gz wmf )