sending mails by not working - problem solved


at first: Thank you, Little Backup Box is just great!
I tried to configure mail by editing “Settings” in web UI. It took my a while to understand, why mails not have been sent: config.cfg was in DOS-format and included multiple “\r”.

I didn’t figure out yet, where this format-problem came from. From my side, there was no Windows/DOS around. But everything went well after this changes:

sudo apt-get install dos2unix -y

In I added the line dos2unix “$CONFIG”:

CONFIG_DIR=$(dirname "$0")
dos2unix "$CONFIG"
source "$CONFIG"

I think I found the error: After cloning from github config.cfg is larger than it is after dos2unix. So the original file seems to be in dos-format, right?

pi@raspberrypi:~/tmp/scripts $ git ./
pi@raspberrypi:~/tmp/scripts $ cd scripts/
pi@raspberrypi:~/tmp/scripts $ cp config.cfg config.cfg.dos2unix
pi@raspberrypi:~/tmp/scripts $ dos2unix config.cfg.dos2unix 
pi@raspberrypi:~/tmp/scripts $ dos2unix: converting file config.cfg.dos2unix to Unix format...
pi@raspberrypi:~/tmp/scripts $ ls -la config.cfg*
-rw-r--r-- 1 pi pi 683 Jun 26 07:31 config.cfg
-rw-r--r-- 1 pi pi 668 Jun 26 07:32 config.cfg.dos2unix

Editing the original file by Settings causes the same problems like above.


Thank you very much for reporting the issue and providing a solution! :slight_smile:

I have no idea why the config.cfg file is in the DOS format (I use nothing but Linux). But I’ve included you fix into the source code.

Kind regards,

Sorry for disturbing you, but I’m not able to get the Mail feature to work with my gmx or gmail account.
No Mail is send.
I setup LBB today, so the fix should be included…
In your Book i couldn’t find an explanation to this feature.

When did you install Little Backup Box? A bug that prevented sending email was fixed about two weeks ago.

Also, I don’t know for sure, but GMX may not allow you to use their SMTP servers. I’ll try to see if Gmail works.

Kind regards,

4 Hours before I wrote you :wink:
I tried 2 installations yesterday to very the Mail and the IP Issue (wich I postet as Issue on Github).

Yeah, I tried Gmail, and it didn’t work for me either. I’m inclined to put the blame on Google. Do you have another (proper) SMTP server you could try?

Kind regards,

I testet Hosteurope - same…
I would create a new Mailaccount for that if you could tell me a working service Provider…

Do you have access to a Linux machine, or can you SSH to the Raspberry Pi running Little Backup Box?

I’m using a mac - and of course I can use ssh

Could you try to run the following command on the Raspberry Pi (replace capitalized placeholders with actual values) and post the output here?

curl --url smtps://SMTP_SERVER:SMTP_PORT --ssl-reqd --mail-from USER_NAME --mail-rcpt MAIL_TO --user USER_NAME:MAIL_PASSWORD -T <(echo -e "From: USER_NAME\nTo: MAIL_TO\nSubject: Test\nIt works")

I get this in return:

curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Could you try this:

curl --url smtp://SMTP_SERVER:SMTP_PORT --ssl --mail-from USER_NAME --mail-rcpt MAIL_TO --user USER_NAME:MAIL_PASSWORD -T <(echo -e "From: USER_NAME\nTo: MAIL_TO\nSubject: Test\nIt works")

Same Error…

SSL routines:ssl3_get_record:wrong version number

Could you give me your SMTP server address and port?

You received a dm