HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: Configuring access with hosts file
At 22:18 01/12/1997 +0100, Ramon Arxer i Galabert wrote:
>Hello!
>
>I've to configure my HylaFAX server to accept mails from two domains,
>and after trying the manual examples I always receive a mail telling me
>that I've no access. The system only works for the root user if there's
>a line like:
> root@fax.pangea.org
>in the hosts file.
>The file has the 600 rights and is owned by uucp.uucp.
>Is there a place where I can find the newest manual?
Well, the man page is the place to look ( You may have to use the command
'man 5 hosts' to get the right one ).
Whether it makes any sense depends on whether you know what a
'regular expression' is. I didn't, up to last week, until I had to
change CR/LFs into LFs at the end of each line in a series of text files.
A combination of the substitute command and a regular expression suggested
by a friend did the job quickly and efficiently. I was impressed.
Assuming that the two domains you need access from are :
bcn.servicom.es
casal.upc.es
then, using an example from the man page, the following should work:
.*bcn\.servicom\.es$
.*casal\.upc\.es$
What does this all mean, then? Well, the dot '.' means any visible
character and the star '*' means zero or more of them. (Apologies to
gurus if this is not 100% technically correct). So, for a client
called 'arxer@bcn.servicom.es' this will match up to and including the
'@'. Now we have restrict the pattern to the domains we allow, so they
come next, but note the dot '.' is a dot and not a wildcard, so we have
to put a slash '\' in front of it. Lastly, the dollar '$' means the end
of the line.
Yep, it's bizarre. But it's the Unix standard and a lot of programs use
it. More details? Well, 'man grep' is a good place to start. The
documentation with your vi or vi clone will also have some info.
Then re-read the man page.
Good Luck,
Phil Watkinson,
Boston, UK.