domainaware / parsedmarc

A Python package and CLI for parsing aggregate and forensic DMARC reports
https://domainaware.github.io/parsedmarc/
Apache License 2.0
1.01k stars 217 forks source link

IMAP password cannot start with % #314

Closed bigon closed 2 years ago

bigon commented 2 years ago

Hello,

My IMAP passwords starts with a % and apparently parsedmarc is not happy:

Traceback (most recent call last):
  File "/usr/local/bin/parsedmarc", line 8, in <module>
    sys.exit(_main())
  File "/usr/local/lib/python3.9/dist-packages/parsedmarc/cli.py", line 424, in _main
    opts.imap_password = imap_config["password"]
  File "/usr/lib/python3.9/configparser.py", line 1255, in __getitem__
    return self._parser.get(self._name, key)
  File "/usr/lib/python3.9/configparser.py", line 799, in get
    return self._interpolation.before_get(self, section, option, value,
  File "/usr/lib/python3.9/configparser.py", line 395, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/lib/python3.9/configparser.py", line 442, in _interpolate_some
    raise InterpolationSyntaxError(
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%foo'

That could be a problem with other parameter as well

seanthegeek commented 2 years ago

Try escaping the % by putting a \ before it. That should work. Let me know if it does, and I'll add a note to the documentation.

bigon commented 2 years ago

No, it's giving the same error

seanthegeek commented 2 years ago

Try %% instead.

bigon commented 2 years ago

Indeed, %% works