maxisoft/Freenom-dns-updater

freenom.yml: ttl and target parameters seem to be ignored

xogium opened this issue · 4 comments

Hi,
first of all, thank you for this nice dns updater !
I noticed something strange however when I try to set it up, using the provided systemd unit on my archlinux box. My /etc/freenom.yml file looks like this:

login: email@somedomain
password: mypassword

  • domain: mydomain.tk
    ttl: 300

So, the file seems to be all good, giving that fdu update /etc/freenom.yml gives no error and tell me the record was updated successfully. But here comes the issue. After doing this, if I check the result with fdu record ls email paswword domain.tk. I get:
[{'name': '', 'target': 'xx.xx.xxx.xxx', 'ttl': 14440.

Notice the ttl ? Using this instead works just fine:
fdu record add email password domain.tk -l 300

I also tried adding type: and target: just above the ttl: line in my /etc/freenom.yml. Nothing changed, Even the target: didn't apply, for that matter.

Any idea ? Is it something I'm doing wrong ? The systemd unit is relying on the /etc/freenom.yml file, so obviously it gets reset every time I reboot the computer, or every time I restart the service.

Thanks in advance
edit: I noticed the dash character problem... so yes, for the configuration all line are one below another, it's not on the same line

Hello,
Thanks for your issue.

According to your issue, you have a config file which look like :

login: email@somedomain
password: mypassword

- domain: mydomain.tk 
  ttl: 300

But it should be something as the following:

login: email@somedomain
password: mypassword

record:
    - domain: mydomain.tk 
      ttl: 300

(Notice the record: part)

If that solve your problem feel free to close this issue.
Else it could be a space/tab problem. So try with something like :

login: email@somedomain
password: mypassword

record: [ {domain: mydomain.tk, ttl: 300} ]

In other case, tell me that didn't work and i'll try to investigate on what's going wrong.

Regards

Note: for your next issues on github, you can use the markdown's code block in order to provide info like configuration, stackstrace,...

Hello again,
thank you for your quick answer. I'm really sorry I forgot the record: section there :) . But it's really present, so it's not that thing that cause the issue I'm having. As for the tab/space problem, my file is having no space or tab at all, because I noticed it was causing an error in the yml parser.

Thanks

I am following these instructions:
https://blog.lemon.email/how-to-connect-your-domain-to-lemon-email-888a06e81859

Type: MX
Host: @
Value: smtp.lemon.email
Priority: 5
TTL: 3600 (60 min)

how would I address these in the yml config file?
current:

login: jame-----@-----------
password: ----------

record:
        - domain:       swee---------.---
        - name:         ------
        - type:         A

record:
        - name:         @
        - type:         MX       
        - 

It would look like this:

login: jame-----@-----------
password: ----------

record:
  - domain: swee---------.---
    name: @
    type: MX
    target: smtp.lemon.email
    ttl: 3600

I really don't understand what you're trying to accomplish here. This record only needs to be set once; you don't need to update it automatically like this tool does.
Unless you're only trying to update that A record, in which case all you would need is this:

login: jame-----@-----------
password: ----------

record:
  - domain: swee---------.---
    name: ------
    type: A

freenom-dns-updater only updates the records you tell it to; it will not mess up an MX record that you manually set.