Faxserver under Ubuntu / Debian

queue status
faxstat -s # shows fax in the queue waiting to be sent
faxstat -d # shows faxes sent
faxstat -r #shows faxes received

delete fax
faxrm JOB_ID
or if you can´t delete run under creator
sudo -u USERNAME faxrm JOB_ID

HylaFax spool directory

delete all send faxes
for i in $(ls /var/spool/hylafax/doneq); do
faxrm ${i:1}

get rejected fax nubers
faxstat -d | grep REJECT | cut -d" " -f 7 > fax_rejected.txt


delete rejected jobs
faxstat -d | grep REJECT | cut -d" " -f 1 > fax_rejected_ids.txt
for i in $(cat fax_rejected_ids.txt); do faxrm $i; done