I have nice iRedMail server (postfix, dovecot, policyd). One of my client apps sends email via this server. And client want to sign it with digital signature on server side. Is it even possible to do what he wants?
To sign an email you need the private key which should not be shared. If you distribute your private key (by putting it on a mail server) the mail agent would be able to use the key (has read access) to sign every email: bad idea.
A private key is private by definition and your client should sign his own email.
What you are asking for is called an S/MIME gateway and there are some add-ons to postfix to do exactly that.
This said, if all you need is a signed mail from a client application where the source code is controlled by you, you really should look into enabling S/MIME in your e-mail composition routines. As an example, the
openssl command line utility has an
smime mode allowing for signing, verifying, encrypting and decrypting S/MIME messages - you could simply insert an appropriately formed command into your mail sending routine.