BackupPC invalid configuration for sending mail

Sending a mail out from BackupPC fails (well, I’m assuming so, as nothing was received):

[root@ns8 data]# runagent -m backuppc1 podman exec backuppc-app su -s /bin/sh backuppc -c ‘/usr/local/BackupPC/bin/BackupPC_sendEmail -u eddie@bogolinux.net
Sending test email using /usr/sbin/sendmail -t -f backuppc
sendmail: /etc/msmtprc: line 7: invalid argument none for command auth
[root@ns8 data]#

/ $ cat /etc/msmtprc
### Automatically generated on container start. See documentation on how to set!
account default
host 10.5.4.1
port 25
domain %H
maildomain %H
auth none
tls off
tls_starttls off
tls_certcheck off
/ $

As well as the invalid argument error I’m not sure how the host address would be interpreted as that is the WireGuard interface for the Cluster:

[root@ns8 data]# cat /etc/wireguard/wg0.conf
[Interface]
Address = 10.5.4.1/32
ListenPort = 55820
PrivateKey =

Cheers.

Updated the title of this, as after more investigation it looks like /etc/msmtprc for the pod does have a valid “host”. But “auth none” is still broken.

I tried to update the value to “auth off” just before a backup was due to run, but still didn’t receive any mail.

Cheers.

did you read this ?

Yes, that’s how I came to the conclusion that the configuration is wrong:

[root@ns8 ~]# runagent -m backuppc1 podman exec backuppc-app su -s /bin/sh backuppc -c '/usr/local/BackupPC/bin/BackupPC_sendEmail -u eddie@bogolinux.net'
Sending test email using /usr/sbin/sendmail -t -f backuppc@bogolinux.net
sendmail: /etc/msmtprc: line 7: invalid argument none for command auth
[root@ns8 ~]# find / -type f -name msmtprc
/home/backuppc1/.local/share/containers/storage/overlay/72d5858b3fded73abadc94538e0b3ad9ceb9bf114c7c7b7925473c49864d7bb0/diff/etc/msmtprc
[root@ns8 ~]# cat /home/backuppc1/.local/share/containers/storage/overlay/72d5858b3fded73abadc94538e0b3ad9ceb9bf114c7c7b7925473c49864d7bb0/diff/etc/msmtprc
### Automatically generated on container start. See documentation on how to set!
account default
host cleanmail.bogolinux.net
port 25
domain %H
maildomain %H
auth none
tls off
tls_starttls off
tls_certcheck off
[root@ns8 ~]#

The first time I did this, the host address was the WireGuard interface, which may have been a red herring. Since then it has always shown up as the value I have in the configuration:

[root@ns8 ~]# runagent -m backuppc1  podman exec -ti backuppc-app bash
[tiredofit/backuppc:6.0.4 06:48:11 /] $ cat /etc/msmtprc
### Automatically generated on container start. See documentation on how to set!
account default
host cleanmail.bogolinux.net
port 25
domain %H
maildomain %H
auth none
tls off
tls_starttls off
tls_certcheck off
[tiredofit/backuppc:6.0.4 06:48:24 /] $

Which doesn’t detract from this:

sendmail: /etc/msmtprc: line 7: invalid argument none for command auth

Cheers.

hum instead of on can you replace by plain

search the script discover-smarthost

you get none when you did not set a username and a password to set the smtp account ???
is it that ?

show us the content of your smarthosts.env please

Not exactly sure what you’re after. Maybe this:


Or this:

As for the rest, I’m just a plain user who expects to use a UI, not a developer (unless you need S/370 assembler, in which case I can still write that in my sleep).

Cheers.

you try to send email without authentication with a relay from cleanmail.bogolinux

could you try with an account and a password ?

like this we could have auth on, saying that i do not understand why none is not an accepted values, it should be

No TO cleanmail.bogolinux.net, which is my incoming SMTP server.

Where. If I try here, it won’t let me:

Cheers.

Starttls is on 587 tcp

After digging around a little more and understanding more about how the NS8 email notifications are set up, I went for this:
image
Guess what, it still has the “auth none” which is the error condition as posted in my original report:

[root@ns8 ~]# runagent -m backuppc1  podman exec -ti backuppc-app bash
[tiredofit/backuppc:6.0.4 17:04:34 /] $ cat /etc/msmtprc
### Automatically generated on container start. See documentation on how to set!
account default
host 10.5.4.1
port 25
domain %H
maildomain %H
auth none
tls off
tls_starttls off
tls_certcheck off
[tiredofit/backuppc:6.0.4 17:04:41 /] $ exit
exit
[root@ns8 ~]#

Also will this work with the host it has, as that is the address of the Wireguard VPN interface.

Also is there a command, similar to Samba, to change the IP within BackupPC because it gets very upset if the IP of NS8 changes. Take a look here.

Cheers.

So the email are distribued now by backuppc ?

In the meanwhile, none does not exist :confused:

–auth[=(on|off|method)]
Enable or disable authentication and optionally choose the method. See the
auth command.

https://manpages.ubuntu.com/manpages/trusty/man1/msmtp.1.html

I don’t know. You’re the developer of this app… I’m guessing it’s always been that as it’s in BackupPC where I specify who to send the mail to, which your CLI command tries to emulate.

So I guess it’s a bug that you’re setting “none”.

Cheers.

Pr done

1 Like

pr done on ns8-backuppc

2 Likes
[root@ns8 ~]# runagent -m backuppc1 podman exec backuppc-app su -s /bin/sh backuppc -c '/usr/local/BackupPC/bin/BackupPC_sendEmail -u eddie@bogolinux.net'
Sending test email using /usr/sbin/sendmail -t -f backuppc@bogolinux.net
[root@ns8 ~]#

And message received. Thank you.

Cheers,
Eddie

2 Likes