Download Documentation FAQ Related


htnews Frequently Asked Questions 


Table of Contents

1. Introduction
2. Installation
3. Troubleshooting

1.1. 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.2. Where can I get it?

[ top ]


1.3. 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 ]


1.4. Is there more documentation available?

Yes, of course! There is a manpage available, which you can read using the command man htnews. It describes the configuration and troubleshooting of the program.
There are some additional files available, a README and a FAQ (which you are reading currently). You can view these files via the htnews website too (htnews.org).

[ top ]


1.5. Is there a mailinglist available?

Yes. Refer to the page mailinglist.html for mre informations!

[ top ]


2.1. Do I have to do something before compiling?

Normally not. The provided script configure ckecks all dependencies and configuration parameters required in order to successful compile htnews.
Anyway, you can modify many parameters, or predefine them. Issue the command ./configure --help to get more informations.
You have to make sure, sendmail is installed. Htnews needs it to send out the notification messages and error messages.

[ top ]


2.2. How do I complie htnews?

issue the following commands in the same order:
  • ./configure
    This script determines all dependencies (C++-Headerfiles, program-locations and the like), you will receive a message from the script, if something is wrong. Follow these instructions and run it again.
  • make
    GNU make will compile the program. If configure ran successful, you will probalby not encounter any problems here.
  • make install
    You must become root before running "make install". This installs the program, the man-page and a default configfile.

[ top ]


2.3. I am having problems understanding the configuration of htnews!

Within the source distribution you will find a directory called sample. There is a README. Follow exactly the intructions there and play with the configuration.

[ top ]


2.4. What I need to do, if I downloaded the binary package?

You have only to issue the command make install. That's all. If you encounter problems during installation of the binary package, I recommend you to use the sources and to compile them in order to get properly working binaries.

[ top ]


3.1. 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.2. 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.3. 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.4. 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 create 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.
Take also a look to the permissions of the directories where the file is located.

[ top ]


3.5. How can I test htnews from commandline?

In the source directory you will find a file called fake.mail. Change to the source directoy and issue the following command:
"cat textfile | htnews -c /where/ever/the/configfile/is/htnews.conf".
Now see, what hapens.

[ top ]


3.6. 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 ]


3.7. How is it possible to run htnews without sendmail?

You can successfull install htnews without root permissions on a system. You need at least a mail account and a homedirectory with a shell.
You have to use procmail to filter incoming mails. Procmail will based on your filter pipe the message to htnews - the rest will work like it should be :-)
Add the following line to your .procmailrc:
* 2147483647^1 htnews@yoursite
"|/home/you/bin/htnews -c /home/you/htnews.conf"

If you want to use it with exim you can use /etc/aliases as well, but you have to allow the exim-user the right to execute external commands:
  driver = pipe
  user = 

It is also possible to use qmail with htnews. Please refer to the documentations of these programs to learn more about how to pipe a message to an external program.

[ top ]


this page was generated using the faq-system 0.3.5 by T.L..