Re: mutt execution by daemon

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



El 02/01/10 5:21, Joseph L. Casale escribió:
> 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@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>    
Hello

I'm doing this way, i run an script from cron. Sending several 
attachments to several addresses with a text in the email's body.

In the script called by cron put:

EDITOR=touch mutt -s "Here the subject" -F /home/user/.muttrc -i 
/usr/local/bin/body_text.txt -a /tmp/attachment1 -a /tmp/attachement2 -b 
address1@xxxxxxxxxxxxx address2@xxxxxxxxxxxxxx 
addressN@xxxxxxxxxxxxx</dev/null

And .muttrc:

set from=sender_email@xxxxxxxxxxxx
set envelope_from=yes
set realname="Sender's Name"

Hope this helps you
Best



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta3a (ProxSMTP 1.6)
AntiVirus: ClamAV 0.95.2/10248 - Fri Jan  1 23:09:50 2010
by Markus Madlener @ http://www.copfilter.org
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux