[plug] How to send a mail with binary attachment from a script in CentOS?

Peter F Bradshaw pfb at exadios.com
Fri Feb 4 14:31:35 WST 2011


Hi Fred;

I cannot see your /usr/bin - your mailer grundged it. So I cannot see
whether my method will work for you.

My method is:

mutt -s "Mail subject" -a "File to attach" "where at the.destination" < /dev/null

On Thu, 3 Feb 2011, Fred Janon wrote:

> Hi,
> I am looking for a script to send an email every day with a binary attachment from CentOS. I would prefer not to install an extra package but work with what is installed in the OS already. 'mail' is installed and would be perfect for the job, but it doesn't do binary attachments. I have trouble identifying any other command line email package in the system that I could use in a script, the content of "/usr/bin" follows.
> Any ideas?
> Thanks
> Fred
> --------------------a2pacaddftinfoaddr2lineafs5logamuFormat.shantlrantlr-configantlr-javaaproposarasaserveratatqatrmattraudit2allowaudit2whyauthconfigauthconfig-tuiautoexpectautopointawkbase64bashbug-32batchbcberkeley_db_svcbuild-classpathbuild-classpath-directorybuild-jar-repositorybunzip2bzcatbzcmpbzdiffbzgrepbzip2bzip2recoverbzlessbzmorec2phcalcaptoinfocatchsegvc++filtchaclchagechainsawchattrchcatchconcheck-binary-filescheckmodulecheckpolicycheetahcheetah-analyzecheetah-compilechfnchrtchshcjpegcksumclean-binary-filesclearcmpcolcolcrtcolrmcolumncommconmanconmenconsolehelpercreate-jar-linkscrontabcsplitcurlcutcvscvsbugcytunedb_archivedb_checkpointdb_codegendb_deadlockdb_dumpdb_dump185db_hotbackupdbilogstripdbiprofdbiproxydb_loaddb_printlogdb_recoverdb_statdb_upgradedbus-binding-tooldb_verifydcddatediffdiff3diff-jarsdigdirdircolorsdirnamedislocatedjpegdprofppdueasy_installeasy_install-2.6ecjenvenvsubsteqneqn2grapherbexexecstackexpandexpectexprfactorfail
> logfallocatefastjarfilefindfind2perlfindconfind-jarfipscheckfipshmacflockfloppyfmtfoldformailfreeftp-rfcfunzipgawkgcj-dbtoolgencatgeqngetconfgetentgetfaclgetfattrgethostipget_modulegetoptget_reference_sourcegettextgettextizegettext.shgijgindxbibgjarsignergjdocgkeytoolglookbibgmakegneqngnroffgpasswdgpggpg2gpg-agentgpgconfgpg-connect-agentgpg-errorgpgkey2sshgpgparsemailgpgsmgpgsm-gencert.shgpgsplitgpgvgpgv2gpg-zipgpicgprofgrefergrepjargrmicgrmiregistrygrngrodvigroffgroffergroggrolbpgrolj4gropsgrottygroupsgsoelimgtblgtroffgunzipgzexegziph2phhaltheadhexdumphosthostidhoststathpftoditi386iconvididnindexconindxbibinfoinfocmpinfokeyinfotocapinnochecksuminstallioniceipcmkipcrmipcsisosizejavajavawsjoinjpegtranjv-convertjvmjark5srvutilkadminkbxutilkdestroykeytoolkibitzkillkillallkinitklistkpasswdkshksuktutilkvnolastlastblastcommlastloglchfnlchshldlddlddlibc4lesslessecholesskeylesspipe.shlinux32linux64lkbiblocalelocaledeflocatelockfilelogfactor5loggerlognamelookloo
> kbiblpunlocklsattrlsb_releaselscpulspgpotlss16toppmlualuaclzlzcatlzcmplzdifflzegreplzfgreplzgreplzlesslzmalzmadeclzmainfolzmorem4Mailmailqmailq.sendmailmailstatmakemakemapmanman2htmlmanpathmarkdownmattribmbadblocksmcatmcdmcheckmclasserasemcompmcookiemcopymd5summdelmdeltreemdirmdumemhogmesgmformatmigratepagesmigspeedminfomkfifomkmanifestmkpasswdmlabelmmdmmountmmovempartitionmrdmrenmsgattribmsgcatmsgcmpmsgcommmsgconvmsgenmsgexecmsgfiltermsgfmtmsggrepmsghackmsginitmsgmergemsgunfmtmsguniqmshowfatmsql2mysqlmtoolsmtoolstestmtypemxtarmyisamchkmyisam_ftdumpmyisamlogmyisampackmy_print_defaultsmysqlmysqlaccessmysqladminmysqlbinlogmysqlbugmysqlcheckmysql_configmysql_convert_table_formatmysqld_multimysqld_safemysqldumpmysqldumpslowmysql_find_rowsmysql_fix_extensionsmysql_fix_privilege_tablesmysqlhotcopymysqlimportmysql_install_dbmysql_secure_installationmysql_setpermissionmysqlshowmysqlslapmysqltestmysql_tzinfo_to_sqlmysql_upgrademysql_waitpidmysql_zapmzipnailnamei
> nanoncneqnnewaliasesnewaliases.sendmailnewgrpngettextnlnmnohupnroffnslookupnsupdatentpstatnumactlnumademonumastatobjcopyobjdumpodoldrdistopensslorbdpack200passmasspasswdpastepatchpathchkpaxpcregreppcretestperlperl5.10.1perlbugperldocperlthanksperrorpfbtopspgreppicpic2graphpiconvpinentrypinentry-cursespinkypkg-configpkillpl2pmpmappod2htmlpod2latexpod2manpod2textpod2usagepodcheckerpodselectpost-grohtmlpoweroffppmtolss16prpre-grohtmlprintenvprintfprocmailpsedpstreepstree.x11pstructptxpurgestatpwdxpydocpydoc2pydoc26pygmentizepythonpython2python26python2.6quotaranlibrcs2logrdistrdistdrdjpgcomreadelfreadlinkrebootrebuild-gcj-dbrebuild-jar-repositoryrebuild-security-providersrecode-sr-latinreferrenamerenicereplacereplconresetresolveipresolve_stack_dumprevrftprhinorlogin-cwdrmailrmail.sendmailrmidrmiregistryrnanorngtestrpcgenrpm2cpiorpmdbrpmqueryrpmsignrpmverifyrsyncrubyrunconrun-partsrvims2psandboxscdaemonscpscriptscriptreplaysdiffsecheckerseconsediffsedismods
> edispolseinfosemodule_depssemodule_expandsemodule_linksemodule_packagesepolgen-ifgensepolgen-ifgen-attr-helperseqservertoolsesearchsetarchsetfaclsetfattrsetsidsettermsetup-nsssysinit.shsftpsgsha1hmacsha1sumsha224sumsha256hmacsha256sumsha384hmacsha384sumsha512hmacsha512sumshredsizeskillslabtopsloginsnicesoelimsplainsplitsprofsqlite3sshssh-addssh-agentssh-copy-idssh-keygenssh-keyscanstatstringsstripsudosudoeditsumsymlinkssyslinuxsystooltabstactailtailftbltclshtclsh8.5teetesttestrbtfmtodittgztictimetimed-readtimed-runtloadtmpwatchtnameservtoetomcat6-digesttomcat6-tool-wrappertoptputtrtrofftsettsortttytzselectulunbufferunexpanduniqunlzmaunpack200unshareunxzunzipunzipsfxupdatedbuptimeurlgrabberusersutmpdumpuuidgenuzvdirvimvimdiffvimtutorvmstatwwallwatchwatchgnupgwcweatherwgetwhatiswhereiswhichwhiptailwhowhoamiwritewrite-mime-multipartwrjpgcomxargsxgettextxkibitzxmlcatalogxmllintxml-resolverxmlwfxml-xparsexml-xreadxxdxzxzcatxzcmpxzdecxzdiffxzegrepxzfgrepxzgre
> pxzlessxzmoreyesyumzcmpzdiffzegrepzfgrepzforcezgrepzipzipcloakzipgrepzipinfozipnotezipsplitzlesszmoreznewzsoelim
>

Cheers

-- 
Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
Personal site: http://personal.exadios.com
"I love truth, and the way the government still uses it occasionally to
 keep us guessing." - Sam Kekovich.



More information about the plug mailing list