[    DAEMON.DE    ]  
  

htnews 0.6.3 Frequently Asked Questions  
   
   

 
 

Table of Contents


1. Introduction
2. Installation
3. Troubleshooting


1.0. What is htnews?

htnews is a mail-robot. That means, one can send an email to a special e-mail address and htnews will take this mail and parses the containing stuff.
htnews creates one news item per incoming mail. A new item will be inserted to a webpage to the top of the page. The page will be created based on a template file and on various switches in the config-file.
htnews can, if you like, store only the N recent messages on a "front page" and the older ones to a archiv-page.




[ top ]



1.1. Where can I get it?

There are several download locations:




[ top ]



1.2. Features of htnews

A brief list of the features of htnews:
  • uses templates to generate the output, one for the "front page" and one for the archive page.
  • highly configurable, you can format every field of a news item, like "From" or "Subject", itself.
  • suports basic authentication. htnews can check, if the sender is valid and it is additionally possible to use a password in the subject line.
  • archiv functionality. htnews can be configured to display only N recent messages to the "front page", the older ones will be stored to the archive-page.
  • basic MIME support. htnews can handle text/html (multipart/alternative) mails. You can specify, which part of such a mail you want to use, either the text or the html part.
  • you can specify on the commandline, which config-file htnews should use. With this feature you can have multiple "instances" of htnews installed.





[ top ]



2.0. Do I have something to do before compiling?

You may edit the source file htnews.cc. You can specify the location of sendmail, the default is /usr/sbin/sendmail. Sendmail is required to run htnews.
You may also edit the Makefile. You can uncomment the 3rd line if you want to test htnews from the commandline and want to see, what it does. You can also comment out the 4th line "-D_EGCS", if you are not using egcs, but gcc.
In the Makefile you can specify the location, where htnews will be installed to, the default is /usr/sbin.

You may also edit the define in the source "admin_mail". The default is root@localhost. This parameter is used for error mails, if in the config-file nobody is defined to be the admin.




[ top ]



2.1. How do I compile htnews?

Quick:

type: make.
and if it is ready, type make install.




[ top ]



2.2. I am getting an error like "Makefile", line 31 Missing dependency operator...

This error occurs mostly on *BSD* systems. Try to comment the last 3 lines out. This should help!




[ top ]



3.0. I am getting the error "user not found" from sendmail.

This happens mostly, if you have edited the "aliases" file, but you did not issue the command newaliases, which will build a database from aliases, this is required for sendmail.

Try to aktivate your changes to aliases with this command and then try to send an email to htnews.
But you can still get this error message. Why? Here some various possibilities:

  • It might be possible that the user part and the domain part of the email-address you used do not match with the reality. An example:
    You have the domain foo.bar which sendmail is configured for. But the hostname is: host.nofoo.bar. If you only create an entry in /etc/aliases like "htnews: "|/usr/sbin/htnews", but nothing in the virtusertable, then sendmail assumes that the user "htnews" is a user on the local domain, "htnews@host.nofoo.bar". And not "htnews@foo.bar".

    You can solve it by creating an entry in the virtusertable like

    "htnews@foo.bar		htnews"
    . And don't forget to "aktivate it:
    makemap hash virtusertable < virtusertable
    .
  • It might be possible you typed something wrong, check your settings!





[ top ]



3.1. I am getting an error like "unknown mailer error..." from sendmail.

If this happens, something really strange error has occured. Such a "unknown mailer error" occurs mostly, if sendmail did not know, what to do.
In our case it happens, when htnews exits with an error-code other than 0! I.e. -1 will have this error as a result.

But, why? At first note, that htnews never exits with an other exit-code than 0! But htnews calls some external programs, i.e. sendmail. If the location of sendmail could not be found or something else went wrong, then the "shell" or sendmail itself will exit with -1.
In this case, read carefully the errormessage and try to use htnews directly from the commandline. Please refer to the man-page about this topic!




[ top ]



3.2. I am getting an error mail back from htnews!

If you get an error message back from htnews, then you will know, what was wrong, if you read the error message.
In most cases htnews could not read or write a file, or the user made a mistake or was not allowed to use htnews(if the authentication feature is turned on). Additionally htnews sends back an error message, if the subjectline was empty and if the body itself was empty!




[ top ]



3.3. Why htnews cannot write to my output page?

Normaly htnews will create this file, if it not exist. But, of course, it is only possible to vreate a file, if the user running htnews (sendmail, mostly daemon or root), has write and execute access to the directory, where the file will go.




[ top ]



3.4. How can I test htnews from commandline?

Create a textfile with the following content (example):

To: htnews@foo.bar
From: foo@somehost.bar
Subject: Any subject

This is a test line.

And now issue the following command:
"cat textfile | htnews -c /where/ever/the/configfile/is/htnews.conf".





[ top ]



3.5. Config has changed, how to update the output file?

Write a mail to htnews with the term "refresh" in the subject. You must be the person defiined in the configfile as the admin to be allowed to do this, otherwise you will get an error-mail!




[ top ]





this page was generated using the faq-system 0.3.4 by Thomas Linden.


Copyright © 1999 Thomas Linden