O_o
First thing: I’m amazed that someone uses that script
The only thing that comes in my mind is to use the descriptive part of the From: header
For example, if the From header is
From: Saito Benkei <saitobenkei@domain.tld>
I can make the user comparison on the “Saito Benkei” part and not on “saitobenkei” mail address part.
It is however necessary that each client of that user produces an equal header description (same spaces, lower/uppercases, etc…)
For example:, if the user has Thunderbird on the PC and another mail client on his/her smartphone, both must fill in the From field with the same description.
So, i can’t have Thunderbird that produces “Saito Benkei <saitobenkei@domain.tld>
” and smartphone’s email client that produces “Saito Benkei Mobile <saitobenkei@domain.tld>
”.
Both clients have to compile the From header with “Saito Benkei <saitobenkei@domain.tld>
”
So you have to configure in Thunderbird the “Your Name” field in the account as “Saito Benkei”. Same thing in the smartphone’s email-client.
Here there’s a untested version of the script (v0.10):
https://drive.google.com/uc?export=download&id=13vRm3K-9RX0QuUNXfopxo8UANbHT_1uY
extract the script (it’s contain addsignatures
script only) and copy on
/var/lib/nethserver/mail-disclaimers/scripts
then
chown root:adm /var/lib/nethserver/mail-disclaimers/scripts/addsignatures
chmod 755 /var/lib/nethserver/mail-disclaimers/scripts/addsignatures
edit the file addsignatures
and change the READFROMDESC
variable’s value to 1
then modify your /var/lib/nethserver/mail-disclaimers/domain.tld/users/users.txt
changing the first field of every line with the exact description that you put in your email client
For example:
If your line was
saitobenkei|mr.|Saito|Benkei|saitobenkei@domain.tld|...
You have to change in
Saito Benkei|mr.|Saito|Benkei|saitobenkei@domain.tld|...
Minnie Pluto|mrs.|Minnie|Pluto|saitobenkei@domain.tld|...
So you can have multiple lines with the same email address but different users.
Please, tell me if it works!
As usuaI have no responsibility for the loss of data, blah, blah blah…