{
    # process all accounts

    use esmith::AccountsDB;
    my $adb = esmith::AccountsDB->open_ro();

    $OUT = "";

    foreach my $printer ( $adb->printers )
    {
        $OUT .= "\n";
        $OUT .= $printer->key; 
        $OUT .= "|" . $printer->prop('Description') . ":\\\n";
        $OUT .= "\t:server:\\\n";
        $OUT .= "\t:mx#0:\\\n";
        $OUT .= "\t:sh:\\\n";
        $OUT .= "\t:ff_separator=false:\\\n";
        $OUT .= "\t:sd=/var/spool/lpd/" . $printer->key . ":\\\n";

        if ($printer->prop('Location') eq 'remote') 
        {
	    $OUT .= "\t:rm=" . $printer->prop('Address') . ":\\\n";

	    # no trailing backslash for last entry

	    if (defined $printer->prop('RemoteName'))
	    {
	        $OUT .= "\t:rp=" . $printer->prop('RemoteName') . ":\n";
	    }
	    else
	    {
	        $OUT .= "\t:rp=raw:\n";
	    }
        }
        else
        {
	    # no trailing backslash for last entry
	    $OUT .= "\t:lp=/dev/" . $printer->prop('Location') . ":\n";
        }
    }

}
