I had an old version of NCID on a server that has been running for years. It has finally crashed. I just install the latest NCID. Previous versions of ncid used to show the name and number in the subject line of emails it sent. This version only shows the number as "xxx-xxx-xxxx"\r with no name. Is there a way to modify the subject line of email pages so that it can show the name and number instead of just the number? thanks.
Anonymous
You are correct. The reason for just using $NMBR as the subject line no longer applies. Version 1.2 will go back to a subject line of "$NMBR $NAME". The new release should be within a couple of weeks, but it is an easy modification if you want the new subject line immediately.
Last edit: John L. Chmielewski 2015-09-15
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Awesome thanks for the info. Here's what I had to do to get it to work properly
83 [ -n "$PageOpt" ] && PageOpt="$PageOpt $NAME $NMBR"
and I had to add quotes around $PageOpt variable like so:
91 echo $use_e $MailMsg | $PageMail "$PageOpt" $PageTo
The quotes around "$PageOpt" in line 91 are necessary because you did not include the \" around \"$NAME $NMBR\" in line 83. Your way is probably easier to understand, but you broke the other mail option of a specific user sending mail.
I noticed you placed $NAME in front of $NMBER. I always put number first because $NMBR does not contain spaces while $NAME does in most cases. I think it is easier to read with $NMBR first.
While changing the source, I decided to modify ncid-page.conf and ncid-page so that you can configure the subject line in one of 5 ways:
Last edit: John L. Chmielewski 2015-09-15
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
When i tried it originally \"$NMBR $NAME"\ on line 83 it only would put the name or nmbr (whichever was first i tried it both ways) in the subject line.
I have PageFrom="ncid" in the ncid-page.conf file.
i created a user "ncid" and as that user I run:
ncid --no-gui --program ncid-page
It works and show from "ncid" in the email. Not sure if I did that right but its working :-)
You are correct, \"$NAME $NMBR\" does not work for two variables. It only seems to work with one variable. This lead me to fix more of the code. Thank you.
Your test should be root running ncid, it will run ncid as user mail, if $PageFrom is set to mail in ncid-page.conf.
The fix for root running ncid is easy, just change the su line to
The next release will also default $PageFrom to "", then it will be root sending the mail by default when ncid-page is started at boot.
If you would like to try the new version of ncid-page and possibly provide feedback, email me at sourceforge and provide your email so I can email you the script and its configuration file.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Awesome thanks for those modifications
Release 1.2 will allow the user to customize the subject line of the ncid-page module.