How to add a signature in UNIX mail command

2

How do I add a signature in a mail that is sent through mail command of UNIX ? I tried it by saving text in .signature and in .sig files but that didn't work for me. Any help would be greatly appreciated.

learner1

Posted 2016-03-09T05:21:33.967

Reputation: 155

Which 'mail' command do you have? bsd-mailx? Heirloom mailx? s-nail? Yes, .signature should be the default, but maybe your system has custom configuration? – user1686 – 2016-03-09T08:58:22.383

I just used mail command to send a mail. I do not know which 'mail' command I am using. I am a beginner. Could you please let me know how to check what is that 'mail' command I am using ? @grawity – learner1 – 2016-03-09T09:49:49.357

Answers

1

According to man mail, mailx will insert content of ${MAILX_TAIL} at the end of outgoing mail.

Have you tried it ?

MAILX_TAIL="J. Smith. \njsmith@example.com\ntel:1234\n"
export MAILX_TAIL

Archemar

Posted 2016-03-09T05:21:33.967

Reputation: 1 547

I tried it but doesn't work. @Archemar And the thing is I am accessing the UNIX server remotely. Will that matter ? – learner1 – 2016-03-09T09:52:38.373