[CentOS] mutt execution by daemon

Sat Jan 2 14:03:57 UTC 2010
Lucian @ lastdot.org <lucian at lastdot.org>

On Sat, Jan 2, 2010 at 4:21 AM, Joseph L. Casale
<jcasale at activenetwerx.com> wrote:
> I have a user w/o a shell that runs an app as a daemon that needs to use
> mutt to email an attachment from a script.
>
> During testing when the app was ran as root everything worked:) Now that
> we obviously are running as a user w/o a shell this little bit broke. I
> used mutt as I needed to send the attachment as mime, and the ability
> to specify a muttrc from the cli when executed was useful so we could tweak
> the mail headers etc...
>
> Since there is no local mb's at all on this server, are there any mutt gurus
> that know off hand how I can manipulate the behavior of mutt to simply send
> w/o looking for a mailbox?
>
> Thanks,
> jlc
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

I'm not a mutt guru, but sending attachments from cli is terribly
simple using uuencode. If possible, you could try something like:
uuencode /path/to/attachment | mail -s <subject here> <destination address>

I don't think the command would fail given the user doesn't have a
shell or/and a local mailbox.