Adolsign Deployment

Installing and configuring Adolsign

Adolsign ships as a single self-contained executable — there's nothing to install on the client. This page covers getting it onto a share, the command-line options, the adolsign.config file, and the scan-code template syntax used in signature files.

Installation

  1. Copy adolsign.exe and your adolsign.config file to a location every target machine can reach — typically a NETLOGON share or a folder pushed out by your software distribution system.
  2. Put your signature templates (.htm, .rtf, .txt) alongside adolsign.config, or point at them with full paths in the config.
  3. Call adolsign.exe from a login script, a Group Policy startup/logon script, or your software distribution tool's per-user run step. It needs no installer, no admin rights beyond the current user's own profile, and writes only to the current user's Outlook signature folder and registry hive.
  4. For remote or offline users, build a one-click installer instead with --makepackage (requires NSIS's makensis.exe to be reachable) and send that.

A minimal login-script invocation:

adolsign.exe --configfile \\server\netlogon\adolsign\adolsign.config

Command-line options

OptionWhat it does
--signature <name>Process a single signature directly from the command line, in addition to anything matched from the config file. <name> is a path to name.htm/.rtf/.txt; at least one must exist.
--username <name>Look up this user instead of whoever is currently logged in. Useful for offline package builds run by an administrator.
--vcardGenerate a .vcf vCard alongside the signature and attach it in Outlook.
--addfile <path>Copy an extra file or directory (e.g. a logo image) into the signature folder. Repeatable.
--defaultShorthand for --newdefault --replydefault.
--newdefaultMake this signature the default for new messages.
--replydefaultMake this signature the default for replies and forwards.
--readonlyGrey out the default-signature setting in Outlook's UI on newer Office versions, so users can't change it themselves.
--configfile <path>Path to adolsign.config. Defaults to a file of that name next to the executable.
--targetpath <path>Write signatures to an explicit directory instead of Outlook's local signature folder.
--makepackageBuild an offline NSIS installer instead of deploying locally.
--packagename <path>Installer output path/name, used with --makepackage. Defaults to <username>_signature.exe next to the executable.
--encoding [name]Template file encoding, default iso-8859-1. Given with no value, lists every supported encoding name and exits.
--deployment local|cloudDeployment target. local (default) writes to the local Outlook folder and registry. cloud writes a deployment manifest instead — see Cloud deployment below.
--cloudShorthand for --deployment cloud.
--admethod ads|ldap|graphDirectory lookup method. ads (default) uses ADSI/Active Directory directly. ldap uses a plain LDAP bind, configured in the [ldap] section of your config. graph uses Microsoft Graph against Entra ID — requires --graphconfig.
--graphconfig <ini file>Path to an ini file holding your Entra ID app credentials, required when --admethod graph is used. See Microsoft Graph setup.
--namingcontext <dn>Explicit Active Directory base DN, if it can't be auto-discovered.
--noldapTest mode: skip the directory lookup entirely and fill the template with placeholder values, so you can proof a template without touching a real directory.
--verbosePrint detailed progress information — which signatures matched, what was looked up, where files were written.
--helpPrint usage information.

The adolsign.config file

One INI-style file drives which signatures apply to whom, and how directory fields map onto scan codes. A minimal example:

[field mappings]
; override the default AD attribute a scan code maps to, if your schema differs
field_title = Title

[Signature default]
NewDefault = 1
ReplyDefault = 1

[Signature sales]
Group = Sales EMEA
Vcard = 1
AddFile = logo.png

[Signature executives]
field_title = ^(Director|VP|Chief)
NewDefault = 1
ReplyDefault = 1

Each [Signature <name>] section maps to a template file <name>.htm/.rtf/.txt, and a user qualifies for it if either of the following is true:

  • they belong to one of its Group entries (repeatable — any match qualifies), or
  • any of its field_xxx entries is a regular expression that matches that user's looked-up value for that field (also repeatable).

Other keys inside a [Signature <name>] section:

KeyMeaning
VcardSet to 1 to generate and attach a vCard for this signature.
NewDefault / ReplyDefault / DefaultMake this signature the new-mail and/or reply default. Default = 1 sets both.
AddFileExtra file or directory to bundle with the signature. Repeatable.

Cloud deployment

With --deployment cloud (or --cloud), Adolsign renders the same templates and config but writes a cloud-manifest.json file instead of touching the local Outlook folder or registry — no local registry writes at all, which is what makes it safe on shared or virtual desktops. Pushing that manifest into Exchange Online / Outlook on the web is a separate step on your end (for example via Exchange Online PowerShell), since Microsoft doesn't currently expose a supported API for setting a mailbox's default signature directly.

Microsoft Graph setup (--admethod graph)

Create an Entra ID app registration with the User.Read.All application permission (admin-consented), then point --graphconfig at an ini file:

[graph]
tenant_id = <your tenant id>
client_id = <app registration client id>
client_secret = <client secret value>

With --admethod graph, pass a full user principal name to --username (e.g. jdoe@yourtenant.onmicrosoft.com), not a bare account name.

LDAP setup (--admethod ldap)

[ldap]
server = dc1.example.com
; binddn/bindpw optional — omit for an anonymous bind
binddn = CN=svc-adolsign,OU=Service Accounts,DC=example,DC=com
bindpw = ********
; base optional — auto-discovered from rootDSE if omitted
base = DC=example,DC=com

Signature templates and scan codes

A template is an ordinary .htm, .rtf or .txt file with scan codes dropped in wherever you want a directory value substituted. Provide whichever variants you need — Adolsign renders every one that exists for a given signature.

<b>field_fullname</b><br />
field_title, field_department<br />
field_telephone<br />
field_email

Built-in scan codes:

field_login, field_fullname, field_firstname, field_lastname, field_initials, field_othername, field_title, field_company, field_department, field_office, field_telephone, field_homephone, field_mobilephone, field_fax, field_email, field_street, field_pobox, field_city, field_state, field_postal, field_country, field_description, field_division, field_employeeid, field_homepage

Any of these can be redirected to a different directory attribute in the [field mappings] section of your config, and a scan code with no value for a given user is simply replaced with an empty string.

Conditional directives

Wrap a scan code in its own name to attach options: field_xxx(--option value ...)field_xxx. For example:

field_telephone(--prefix "Tel: " --default "on request")field_telephone

renders as Tel: +47 22 00 00 00 when the field has a value, or Tel: on request when it's empty.

OptionEffect
--prefix "text"Prepended to the value (or to --default, if that's what's used).
--postfix "text"Appended to the value (or to --default).
--default "text"Used in place of the value when the field is empty.
--ignorelineWhen the field is empty, drop the line rather than leaving a gap — no dangling "Mobile:" line for the one person without a mobile number.
--case value[,value]uppercase, lowercase, upperfirst or lowerfirst. Repeatable or comma-separated; applied in order.
--anchor schemeWraps the value as a hyperlink (e.g. mailto, http). Renders as a real link in HTML signatures, a Word hyperlink field in RTF, and is left as plain text in TXT.
--format "spec"A printf-style format applied across the individual characters of the value — useful for spacing out or grouping digits.
--lookup sectionRemaps the value through a lookup table: looks up the value as a key in the named config section and substitutes what it finds there, falling back to the original value if there's no match. Handy for turning an office code like OSL into Oslo.

Example using several options together, and a lookup table defined elsewhere in the same config file:

field_office(--lookup offices --prefix "Office: ")field_office

[offices]
OSL = Oslo
BGO = Bergen
TRD = Trondheim

Putting it together

A config file selecting a default signature for everyone, a richer one for a specific group, and running it from a login script:

[Signature default]
NewDefault = 1
ReplyDefault = 1

[Signature sales]
Group = Sales EMEA
Vcard = 1
NewDefault = 1
ReplyDefault = 1
adolsign.exe --configfile \\server\netlogon\adolsign\adolsign.config --verbose

Every user gets default.htm/.rtf/.txt as their signature; anyone in the "Sales EMEA" AD group additionally qualifies for sales.htm/.rtf/.txt with a vCard attached, and either signature's variant is set as both the new-mail and reply default.