[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: SOLVED! Re: More Sendmail woes



Cédric Chausson <cchausson noos fr> writes:

> So, just to make sure I have understood well, it is not possible to
> have sendmail not running and having it go on automatically when
> scripts invoke the mail command ?

You could do that by invoking sendmail with daemon flag in you script
and closing it down after with your script.

I think you could do it as simply as:

 cat my_script

  #!/bin/bash
  service sendmail start &&
  <code that mails something> &&
  service sendmail stop

The double ampersands may not be necessary, but are supposed to
guarantee the preceding command is completed before calling the next one.
  




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]