Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send email if global config does not specify all parameters #12

Closed
mojimba opened this issue Sep 6, 2018 · 1 comment
Closed

Comments

@mojimba
Copy link

mojimba commented Sep 6, 2018

This is a minor issue as there is a workaround.

I'm using an internal SMTP server which does not require authentication. So my global config looks like:

emailFromAddress: "Duplicacy <[email protected]>"
emailToAddress: "Systems <[email protected]>"
emailServerHostname: smtputil.company.com
emailServerPort: 25
emailAuthUsername: 
emailAuthPassword: 

Running duplicacy-util -tm with the above configuration successfully sends an email out.

However, if I run a backup or other operation and specify -m, I get the following error:

root@tetlu16util01:~/.duplicacy-util# duplicacy-util -f svn -a -m
13:28:25 Using global config: /root/.duplicacy-util/duplicacy-util.yaml
Error: Unable to send E-Mail; required fields missing from global configuration

The workaround I found was to specify a dummy username/password in the file, and thankfully our SMTP server doesn't care about these (I guess gomail library doesn't even send these if they're not requested by the SMTP server):

emailAuthUsername: user
emailAuthPassword: pass

Updating the above two lines in the global configuration works for me.

jeffaco added a commit that referenced this issue Sep 6, 2018
Some servers do not require authentication. Thus, do not require that
authentication is specified. If it's required but not configured, we'll
just fail to send the message during handshake with the mail server.

This fixes issue #12.
@jeffaco
Copy link
Owner

jeffaco commented Sep 6, 2018

I'm used to public-facing servers, where its nuts to not use mail authentication.

I modified the code to not require username and password. If the server needs one, it'll just fail during the mail send operation (the remote server will reject the message).

Thanks for your bug report! This will be included in the next release.

@jeffaco jeffaco closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants