Thanks Ged,

I haven't set $Conf{SendmailArgs} in config.pl.  What would I set it to?  Apologies, this is getting quite specialised for me.

I'm wondering if your environment variable point might be the cause of the issue.  Running the msmtp version of your suggested sendmail command under su backuppc

   cat test.email | msmtp -a backuppc [email protected]

results in this error message

   cat: test.email: Permission denied
   msmtp: account backuppc not found: no configuration file available

So it's maybe some problem with the backuppc user's ability to access the config files which are currently sitting in these places

      /etc/msmtprc  (system settings)
      /home/george/.msmtprc  (user settings - works)
      /home/backuppc/.msmtprc   (user settings - fails)

What would the PATH changes need to be to allow backuppc user to see the config file?

regards

George


On 04/06/2026 16:16, G.W. Haywood wrote:
Hi there,

On Wed, 3 Jun 2026, George King wrote:

... I've installed msmtp as the MTA ... works fine when I'm sending
it from my normal account.  It picks up details from the system
config file /etc/msmtprc and my user config file in ~/.msmtprc.
...
... when I do

|su backuppc /usr/share/backuppc/bin/BackupPC_sendEmail -u
MY...@MY... <mailto:MY...@MY...>|

as per the documentation, and substituting my email address, I get the
error

Sending test email using /usr/sbin/sendmail -t -f backuppc
sendmail: account default not found: no configuration file available
...
... suggestions would be welcomed.

It looks like you aren't fabricating the right invocation of a command
for msmtp.  Did you set $Conf{SendmailArgs}?  Being an old Sendmail
diehard I've never used msmtp, so I ask not because I know anything
about it, but because msmtp is given as an example in the docs. :)

http://.../BackupPC_Admin?action=view&type=docs#_conf_sendmailargs_

If you look at the very last sub in the BackupPC_sendEmail Perl script
you'll see that all it's doing is running a command which you can run
yourself at the terminal.  Something along the lines of

$ cat messagefile | sendmail -t user -f backuppc

should do the trick.  Bear in mind that environment variables might not
be the same for user you and user backuppc.  PATH for example might be
finding a different binary to run if you run a command when logged in
as you and exactly the same command when logged in as user backuppc.




_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to