jaymzh / pius

PGP Individual User Signer
Other
97 stars 25 forks source link

Default mail server is 'None' instead of 'localhost' #57

Closed rockdaboot closed 7 years ago

rockdaboot commented 7 years ago

Pius 2.2.4 on Debian unstable.

The man page says:

       -H HOSTNAME, --mail-host=HOSTNAME
              Hostname of SMTP server. [default: localhost]

Without using -H I get


...
There was a problem talking to the mail server (None): please run connect() first
``

Adding `-H localhost` fixes it.
jaymzh commented 7 years ago

I can't repro this - do you have a ~/.pius/puisrc that's setting mail_host= maybe?

What's the full command you are running?

rockdaboot commented 7 years ago

There is no ~/.pius/puisrc, just installed pius without doing any configuration.

Command example pius -m <my_email> -s <my long key> <short key>

rockdaboot commented 7 years ago

/usr/bin/pius doesn't use DEFAULT_MAIL_HOST anywhere. I installed the pius package from Debian. Maybe it is outdated ?

lechner commented 7 years ago

The man page is incorrect. pius -h shows that the default for -H is none.

The man page came from the Debian maintainer. It will be fixed in the next upload. Thank you!

rockdaboot commented 7 years ago

Good. What about having reasonable defaults like 'localhost' for the server ? Not doing so should error when missing the -H option, right ? At least in most cases.

jaymzh commented 7 years ago

Oh, I see what's going on and why I couldn't repro this. I'll get a fix out.

I need to finish the work I did to properly finish factoring out the options code.

jaymzh commented 7 years ago

@lechner - don't fix the man page, with this PR it'll be correct. :)