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

Fred Janon fjanon at yahoo.com
Fri Feb 4 14:45:37 WST 2011


Hi Peter,

Thanks for trying to help. I did find reference to mutt on the web, unfortunately it's not installed on my system.

Here is the content of /usr/bin again:

a2p
ac
addftinfo
addr2line
afs5log
amuFormat.sh
antlr
antlr-config
antlr-java
apropos
ar
as
aserver
at
atq
atrm
attr
audit2allow
audit2why
authconfig
authconfig-tui
autoexpect
autopoint
awk
base64
bashbug-32
batch
bc
berkeley_db_svc
build-classpath
build-classpath-directory
build-jar-repository
bunzip2
bzcat
bzcmp
bzdiff
bzgrep
bzip2
bzip2recover
bzless
bzmore
c2ph
cal
captoinfo
catchsegv
c++filt
chacl
chage
chainsaw
chattr
chcat
chcon
check-binary-files
checkmodule
checkpolicy
cheetah
cheetah-analyze
cheetah-compile
chfn
chrt
chsh
cjpeg
cksum
clean-binary-files
clear
cloud-init
cloud-init-cfg
cloud-init-run-module
cmp
col
colcrt
colrm
column
comm
conman
conmen
consolehelper
create-jar-links
crontab
csplit
curl
cut
cvs
cvsbug
cytune
db_archive
db_checkpoint
db_codegen
db_deadlock
db_dump
db_dump185
db_hotbackup
dbilogstrip
dbiprof
dbiproxy
db_load
db_printlog
db_recover
db_stat
db_upgrade
dbus-binding-tool
db_verify
dc
ddate
diff
diff3
diff-jars
dig
dir
dircolors
dirname
dislocate
djpeg
dprofpp
du
easy_install
easy_install-2.6
ecj
env
envsubst
eqn
eqn2graph
erb
ex
execstack
expand
expect
expr
factor
faillog
fallocate
fastjar
file
find
find2perl
findcon
find-jar
fipscheck
fipshmac
flock
floppy
fmt
fold
formail
free
ftp-rfc
funzip
gawk
gcj-dbtool
gencat
geqn
getconf
getent
getfacl
getfattr
gethostip
get_module
getopt
get_reference_source
gettext
gettextize
gettext.sh
gij
gindxbib
gjarsigner
gjdoc
gkeytool
glookbib
gmake
gneqn
gnroff
gpasswd
gpg
gpg2
gpg-agent
gpgconf
gpg-connect-agent
gpg-error
gpgkey2ssh
gpgparsemail
gpgsm
gpgsm-gencert.sh
gpgsplit
gpgv
gpgv2
gpg-zip
gpic
gprof
grefer
grepjar
grmic
grmiregistry
grn
grodvi
groff
groffer
grog
grolbp
grolj4
grops
grotty
groups
gsoelim
gtbl
gtroff
gunzip
gzexe
gzip
h2ph
halt
head
hexdump
host
hostid
hoststat
hpftodit
i386
iconv
id
idn
indexcon
indxbib
info
infocmp
infokey
infotocap
innochecksum
install
ionice
ipcmk
ipcrm
ipcs
isosize
java
javaws
join
jpegtran
jv-convert
jvmjar
k5srvutil
kadmin
kbxutil
kdestroy
keytool
kibitz
kill
killall
kinit
klist
kpasswd
ksh
ksu
ktutil
kvno
last
lastb
lastcomm
lastlog
lchfn
lchsh
ld
ldd
lddlibc4
less
lessecho
lesskey
lesspipe.sh
linux32
linux64
lkbib
locale
localedef
locate
lockfile
logfactor5
logger
logname
look
lookbib
lpunlock
lsattr
lsb_release
lscpu
lspgpot
lss16toppm
lua
luac
lz
lzcat
lzcmp
lzdiff
lzegrep
lzfgrep
lzgrep
lzless
lzma
lzmadec
lzmainfo
lzmore
m4
Mail
mailq
mailq.sendmail
mailstat
make
makemap
man
man2html
manpath
markdown
mattrib
mbadblocks
mcat
mcd
mcheck
mclasserase
mcomp
mcookie
mcopy
md5sum
mdel
mdeltree
mdir
mdu
memhog
mesg
mformat
migratepages
migspeed
minfo
mkfifo
mkmanifest
mkpasswd
mlabel
mmd
mmount
mmove
mpartition
mrd
mren
msgattrib
msgcat
msgcmp
msgcomm
msgconv
msgen
msgexec
msgfilter
msgfmt
msggrep
msghack
msginit
msgmerge
msgunfmt
msguniq
mshowfat
msql2mysql
mtools
mtoolstest
mtype
mxtar
myisamchk
myisam_ftdump
myisamlog
myisampack
my_print_defaults
mysql
mysqlaccess
mysqladmin
mysqlbinlog
mysqlbug
mysqlcheck
mysql_config
mysql_convert_table_format
mysqld_multi
mysqld_safe
mysqldump
mysqldumpslow
mysql_find_rows
mysql_fix_extensions
mysql_fix_privilege_tables
mysqlhotcopy
mysqlimport
mysql_install_db
mysql_secure_installation
mysql_setpermission
mysqlshow
mysqlslap
mysqltest
mysql_tzinfo_to_sql
mysql_upgrade
mysql_waitpid
mysql_zap
mzip
nail
namei
nano
nc
neqn
newaliases
newaliases.sendmail
newgrp
ngettext
nl
nm
nohup
nroff
nslookup
nsupdate
ntpstat
numactl
numademo
numastat
objcopy
objdump
od
oldrdist
openssl
orbd
pack200
passmass
passwd
paste
patch
pathchk
pax
pcregrep
pcretest
perl
perl5.10.1
perlbug
perldoc
perlthanks
perror
pfbtops
pgrep
pic
pic2graph
piconv
pinentry
pinentry-curses
pinky
pkg-config
pkill
pl2pm
pmap
pod2html
pod2latex
pod2man
pod2text
pod2usage
podchecker
podselect
post-grohtml
poweroff
ppmtolss16
pr
pre-grohtml
printenv
printf
procmail
psed
pstree
pstree.x11
pstruct
ptx
purgestat
pwdx
pydoc
pydoc2
pydoc26
pygmentize
python
python2
python26
python2.6
quota
ranlib
rcs2log
rdist
rdistd
rdjpgcom
readelf
readlink
reboot
rebuild-gcj-db
rebuild-jar-repository
rebuild-security-providers
recode-sr-latin
refer
rename
renice
replace
replcon
reset
resolveip
resolve_stack_dump
rev
rftp
rhino
rlogin-cwd
rmail
rmail.sendmail
rmid
rmiregistry
rnano
rngtest
rpcgen
rpm2cpio
rpmdb
rpmquery
rpmsign
rpmverify
rsync
ruby
runcon
run-parts
rvim
s2p
sandbox
scdaemon
scp
script
scriptreplay
sdiff
sechecker
secon
sediff
sedismod
sedispol
seinfo
semodule_deps
semodule_expand
semodule_link
semodule_package
sepolgen-ifgen
sepolgen-ifgen-attr-helper
seq
servertool
sesearch
setarch
setfacl
setfattr
setsid
setterm
setup-nsssysinit.sh
sftp
sg
sha1hmac
sha1sum
sha224sum
sha256hmac
sha256sum
sha384hmac
sha384sum
sha512hmac
sha512sum
shred
size
skill
slabtop
slogin
snice
soelim
splain
split
sprof
sqlite3
ssh
ssh-add
ssh-agent
ssh-copy-id
ssh-keygen
ssh-keyscan
stat
strings
strip
sudo
sudoedit
sum
symlinks
syslinux
systool
tabs
tac
tail
tailf
tbl
tclsh
tclsh8.5
tee
test
testrb
tfmtodit
tgz
tic
time
timed-read
timed-run
tload
tmpwatch
tnameserv
toe
tomcat6-digest
tomcat6-tool-wrapper
top
tput
tr
troff
tset
tsort
tty
tzselect
ul
unbuffer
unexpand
uniq
unlzma
unpack200
unshare
unxz
unzip
unzipsfx
updatedb
uptime
urlgrabber
users
utmpdump
uuidgen
uz
vdir
vim
vimdiff
vimtutor
vmstat
w
wall
watch
watchgnupg
wc
weather
wget
whatis
whereis
which
whiptail
who
whoami
write
write-mime-multipart
wrjpgcom
xargs
xgettext
xkibitz
xmlcatalog
xmllint
xml-resolver
xmlwf
xml-xparse
xml-xread
xxd
xz
xzcat
xzcmp
xzdec
xzdiff
xzegrep
xzfgrep
xzgrep
xzless
xzmore
yes
yum
zcmp
zdiff
zegrep
zfgrep
zforce
zgrep
zip
zipcloak
zipgrep
zipinfo
zipnote
zipsplit
zless
zmore
znew
zsoelim


--- On Fri, 2/4/11, Peter F Bradshaw <pfb at exadios.com> wrote:

From: Peter F Bradshaw <pfb at exadios.com>
Subject: Re: [plug] How to send a mail with binary attachment from a script in CentOS?
To: plug at plug.org.au
Date: Friday, February 4, 2011, 2:31 PM

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




More information about the plug mailing list