Amanda-Users

Re: Problems with amreport and postfix

2006-05-15 20:35:35
Subject: Re: Problems with amreport and postfix
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Mon, 15 May 2006 19:29:30 -0400
On Mon, May 15, 2006 at 06:30:24PM -0400, Josh Steadmon wrote:
> On (05/15/06 16:56), Jon LaBadie wrote:
> > I don't think sendmail supports a -s option, neither postfix's compatibility
> > version nor the real version.
> 
> Interesting.  Since Amanda tries to use sendmail (apparently) by
> default, I'm surprised I wasn't able to find any other posts by people
> having the same problem as I am.

I've never heard of it using sendmail by default.  grep'ping the source
found no instance of sendmail.  But the configure script has lines like:

  for ac_prog in Mail mailx mail

  case $MAILER in # Let the user override the test with a path. 

  error: Set MAILER to some program that accepts -s subject user < message_file.
  echo "WARNING: Amanda cannot send mail reports without these programs."

Which suggest to me that only MUA's are looked for.

> > At a shell command line, how do you "send mail directly with postfix"?
> 
> To be honest, I'm not sure, although I believe that it would involve
> postdrop.  This is what sendmail uses, according to postfix's manpages.
> Unfortunately, postdrop doesn't support the -s option either.
> 
> 
> > While not germane to your query, I'm curious why you would rather amanda
> > not use an MUA.
> 
> It's just policy at our site to build servers with as few dependencies
> as possible.  It's not a big problem, it's just that adding a mail user
> agent would be one more (small) dependency for our backups servers.
> 

Hmmm.  What about other apps on your servers?  Don't any of them deliver
reports or error messages via mail?  Do they all inject directly into
sendmail?  Or do you have to do special things for each one of them
just to avoid a MUA?

What about cron and its email messages.  Wait, I just checked Fedora's
crond and it does direct inject to sendmail.  However, Solaris' cron uses
/bin/mail.

Well, if you don't want a MUA on the system, roll your own.  It "could"
be as simple as:

  $ cat amsendmail
  SUB="$2"              # save subject
  shift ; shift         # get rid of -s ...

  (echo "Subject: $SUB" ; cat - ) | 
        /usr/lib/sendmail "$@"

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>