PAGERMAP(5)

πŸ’– PAGERMAP(5) πŸ’–

okay so bestie, welcome to the File Formats Manual β€” today's main character is pagermap, the SNPP pager identifier mapping file. she's giving ✨ config file energy ✨ and honestly? she ate.


🌸 NAME 🌸

pagermap β€” the SNPP pager identifier mapping file. literally her whole job is matching pager IDs to where they need to go. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

so the file etc/pagermap (that's the default btw, not always the vibe) gets used by the SNPP support in hfaxd(8) to map pager identifiers β€” the ones specified with the PAGE directive β€” to IXO/TAP or SMS service providers, and optionally to a Pager Identification Number (PIN). and the PIN thing? that's the whole reason you can define aliases for pagers. iconic behavior fr fr.

lowkey important: etc/pagermap might be called something totally different in your setup. the filename is specified with the PagerIDMapFile configuration parameter, which gets read by hfaxd(8). so don't come for me if yours is named something else πŸ’…

the pagermap file is made of one or more lines, and every line looks like this:

<pattern> <dialstring>[/<pin>]

each line has a <pattern> that gets matched against a client-specified pager identifier string. a pattern can be a plain string or a POSIX 1003.2 extended regular expression:

  • plain strings must compare exactly
  • regular expressions are unanchored, and any substring match counts as a hit

how do you tell them apart? regular expressions have one or more of the magic characters []*.^$-+{}() in them. plain strings don't. that's the whole vibe check. ✨

the <dialstring> is the one that identifies the IXO/TAP or SMS service provider to contact for delivery. or β€” plot twist β€” if <dialstring> is the string reject (case insensitive), then the pager identifier gets rejected. no page for you, bestie. 🚫

and if the optional <pin> is specified? it's used to deliver the page instead of the client-specified identifier. so it's like, the glow-up version of your ID.

now, if the matching expression is a regular expression, the optional <pin> can reference the entire string matched by that regex using the & character. and substrings matched with the (...) constructs? you reference those with \n, where n is a single numeric digit between 1 and 9 that refers to the n-th matched substring. c.f. re_format(7), sed(1), etc. iykyk. πŸŽ€

here's how hfaxd actually processes it: it reads the lines in the mapping file sequentially, and the first line with a pattern that matches the pager identifier is the one used to deliver or reject the page. first come, first served, no takebacks. πŸ’€

  • lines that begin with a # are treated as comments and discarded (so go ahead and annotate, you're safe)
  • leading whitespace on a line is also ignored

πŸŽ€ EXAMPLES πŸŽ€

okay so here's a cute little example that does three things: defines an alias for sam, submits all destinations with a leading Sky to a particular IXO/TAP service provider, and otherwise rejects the pager ID.

ngl, using alphabetics in dial strings requires a dialstring rules file that understands how to map alphabetics to key codes β€” or one that passes them through verbatim. so don't forget that part, bestie 😭
# a simple mapping example
sam        5551212/99
Sky(.*)    1800SkyTel/\1
.*         reject

see how clean that is?? sam gets her alias, Sky(.*) catches everything starting with Sky and shoves the captured bit in with \1, and then .* catches absolutely everything else and just says reject. chef's kiss. πŸ‘‘


🌈 SEE ALSO 🌈

hfaxd(8), hylafax-server(5)


and that's the whole page, bestie!! 🫢 this one's from May 8, 1996 and it's the PAGERMAP(5) page β€” go forth and map those pager IDs, you absolute icon πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from