DKIMPROXY.IN(1)

πŸ’Œ DKIMPROXY.IN(1) β€” the girlies' guide to the SMTP verifier πŸ’Œ

ok so before we even start β€” this is a page from User Contributed Perl Documentation, bestie. That's the manual name, that's the vibe. Say it with me: user contributed perl documentation. iconic. anyway.


✨ NAME ✨

dkimproxy.in β€” a whole SMTP proxy whose entire job is verifying DKIM signatures. she's a verifier. that's her thing. πŸŽ€


🌸 SYNOPSIS 🌸

here's the shape of it, copy it exactly, don't freestyle:

dkimproxy.in [options] LISTENADDR:PORT RELAYADDR:PORT
  smtp options:
    --conf_file=FILENAME
    --listen=LISTENADDR:PORT
    --relay=RELAYADDR:PORT
    --reject-error

  verification options:
    --reject-fail
    --hostname=HOSTNAME

  daemon options:
    --daemonize
    --user=USER
    --group=GROUP
    --pidfile=PIDFILE

dkimproxy.in --help
  to see a full description of the various options

and yes, dkimproxy.in --help is literally right there if you want the full description of the various options. she's helpful like that. 🫢


πŸ’… OPTIONS πŸ’…

daemon behavior

  • --daemonize β€” say the word and the server dips into the background. main character energy, but make it a background process. ✨
  • --group=GROUP β€” if you pass this, the daemonized process will setgid() to the GROUP you named. group chat, but literally.
  • --pidfile=PIDFILE β€” creates a PID file (that's a file containing the PID of the process, iykyk) for the daemonized process. this is the slay that makes it possible to check the status of the process, and to cleanly shut it down. πŸ‘‘

verification

  • --hostname=HOSTNAME β€” overrides the hostname used in the Authentication-Results header. that header gets added to every verified message, no exceptions. use this option if the hostname that appears is not fully qualified, or if you wanna use an alternate name. glow-up for your headers. πŸ’–
  • --reject-error β€” this one specifies what to do if an error occurs during verification of a message. if you specify it, the message gets rejected with an SMTP error code. that means the MTA sending the message will try again later, or bounce it back to the sender (depends on the exact error code used, so, y'know). if you don't specify it, the message gets passed through with an error listed in the Authentication-Results header instead of the verification results.
the most common cause of an error when verifying a message is a DNS error when trying to retrieve a public key or sender policy. like, DNS said "not today." 😭
  • --reject-fail β€” specifies what to do if verification fails and the sender signing policy says to reject the message. if you specify it, the message gets rejected with an SMTP error code, which results in the sending MTA bouncing the message back to the sender. if you don't specify it, the message passes through as normal. no drama, it just... goes. πŸ¦‹

smtp-adjacent stuff, keep scrolling

  • --user=USER β€” if specified, the daemonized process will setuid() to USER after completing any necessary privileged operations, but before accepting connections. drop the privileges, keep the standards. πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so dkimproxy.in listens on the IP address and TCP port specified by its first argument (the "listen" port), and sends the traffic it receives onto the second argument (the "relay" port). and along the way, messages get verified and get an "Authentication-Results" header added to them. she's not just forwarding, she's curating. 🌈


πŸ”₯ EXAMPLE πŸ”₯

for example, if dkimproxy.in is started with:

dkimproxy.in --reject-fail --reject-error 127.0.0.1:10025 127.0.0.1:10026

the proxy will listen on port 10025 and send the verified messages to some other SMTP service on port 10026. that's it. that's the whole plot. πŸ“


πŸŽ€ CONFIGURATION FILE πŸŽ€

parameters can be stored in a separate file instead of specifying them all on the command-line. use the conf_file option to specify the path to the configuration file, e.g.

dkimproxy.in --conf_file=/etc/dkimproxy_in.conf

the format of the configuration file is one option per line: name of the option, space, then the value of the option. e.g.

# this is an example config file
listen      127.0.0.1:10025
relay       127.0.0.1:10026
hostname    myhost.example.com
reject_fail

is equivalent to

dkimproxy.out --hostname=myhost.example.com --reject-fail \
                127.0.0.1:10025 127.0.0.1:10026

(yeah, that last block says dkimproxy.out. that's what the page says. we don't question the original text, we just vibe with it. πŸ™ˆ)


πŸ‘‘ AUTHOR πŸ‘‘

Jason Long β€” the author. we stan. πŸ’–


ngl bestie, if any of this is blurry, just run dkimproxy.in --help and read the full description of the various options. she wrote it for you. 🧚

okay that's the whole page! this absolute classic of a manpage was served to you by perl v5.10.0, dated 2010-10-25 β€” genuinely vintage, fr fr. she's been slaying since 2010 and she's not stopping. periodt. πŸ’…βœ¨πŸŒΈ