On 07/05/2013 08:55 AM, Gene Heskett wrote:
On Friday 05 July 2013 08:33:38 Jean-Louis Martineau did opine:

Amanda run a command to send an email, it the command works, then amanda
works.

What is the command amanda is running? you can find it in the amreport
debug file.
Interesting:
[...]
Fri Jul  5 02:08:01 2013: thd-0x975dd00: amreport: invoking mail app:
/usr/bin/Mail -s The Coyote Den STRANGE: AMANDA MAIL REPORT FOR July 5,
2013 [email protected]
Fri Jul  5 02:08:01 2013: thd-0x975dd00: amreport: error: the mailer
'/usr/bin/Mail' is not an executable program.
[...]

Run the same command on the command line, did it works?
/usr/bin/Mail did not exist, but is now a softlink to mail.

However, by copy/pasting the above to an amanda cli, it is not workable:

  Cannot parse address `STRANGE:' (while expanding `STRANGE:'): Format of
RFC822 object is bad

Don't blindly cut&paste, you must add quote where needed:

/usr/bin/Mail -s 'The Coyote Den STRANGE: AMANDA MAIL REPORT FOR July 5, 2013' 
[email protected]



I'll see if fixing the "Mail" softlink makes it work tomorrow morning.  It
worked instantly when I tried it just now.  But then it has been since I
installed sendmail except I was calling "mail" not "Mail".

Jean-Louis

On 07/05/2013 07:46 AM, Gene Heskett wrote:
On Friday 05 July 2013 07:11:47 Jean-Louis Martineau did opine:
amanda use the Mail command to send email.
You must fix your system so that Mail works.

Jean-Louis
I've done quite a bit of fooling around, ripping out the bsd-mail
stuff and installing the GNU mailutils and sendmail.

I have successfully su'd to amanda and sent gene an email.  But
despite the mailto: "[email protected]" line at the top of my
working amanda.conf, the mail itself from amanda is sent to amanda.

  From the /var/log/mail.log, using "grep sendmail mail.log|grep
amanda":
Jul  3 16:20:37 coyote sendmail[18397]: r63KKbV2018397: from=amanda,
size=184, class=0, nrcpts=1,
msgid=<[email protected]>,
relay=amanda@localhost
Jul  3 16:20:37 coyote sendmail[18397]: r63KKbV2018397:
to=<[email protected]>, ctladdr=amanda (1001/1002),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30184,
relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r63KKbmW018398
Message accepted for delivery)

===== my test mail that worked above =====

Jul  4 02:02:46 coyote sendmail[16012]: r645K1Np016012: from=amanda,
size=711, class=0, nrcpts=1,
msgid=<[email protected]>,
relay=amanda@localhost
Jul  4 02:02:46 coyote sendmail[16012]: r645K1Np016012: to=amanda,
ctladdr=amanda (1001/1002), delay=00:42:45, xdelay=00:00:00,
mailer=relay, pri=30711, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0,
stat=Sent (r6462kMf019315 Message accepted for delivery)

Jul  5 02:08:34 coyote sendmail[3977]: r655K16f003977: from=amanda,
size=711, class=0, nrcpts=1,
msgid=<[email protected]>,
relay=amanda@localhost
Jul  5 02:08:34 coyote sendmail[3977]: r655K16f003977: to=amanda,
ctladdr=amanda (1001/1002), delay=00:48:33, xdelay=00:00:00,
mailer=relay, pri=30711, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0,
stat=Sent (r6568YNX007277 Message accepted for delivery)

And at the time it writes to /var/spool/mail/amanda, it helpfully
resets the perms to 0600, and kmail, running as me, cannot touch it.

So, where is that mailto: line in amanda.conf getting lost?

My wrapper scripts do not touch this AFAIK.

And I just did su - amanda, and sent me another email, getting this in
the mail.log:

Jul  5 07:34:35 coyote sendmail[23789]: r65BYZEm023789: from=amanda,
size=172, class=0, nrcpts=1,
msgid=<[email protected]>,
relay=amanda@localhost
Jul  5 07:34:35 coyote sendmail[23789]: r65BYZEm023789:
to=<[email protected]>, ctladdr=amanda (1001/1002),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30172,
relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r65BYZPf023792
Message accepted for delivery)

So it works, amd kmail got the msg.  Why amanda itself cannot follow
orders here?  Is there something wrong with my "mailto:";?  I see in
the example/amanda.conf, the FQDN isn't used, so I'll remove that for
S&G.  I just tested it by hand as amanda, and it worked, but it did
add the missing FQDN in the sendmail log.

I'm snookered here.  Out of ideas IOW.

Cheers, Gene

Cheers, Gene

Reply via email to