sending attachment with mail command
Colin van Niekerk
Colin.vanNiekerk at mimecast.co.za
Thu May 14 07:10:54 UTC 2009
Mutt will pass the mail to the local MTA for delivery, that has configs in it but generally the defaults are about to relay mail from localhost via MX resolution.
Can you send mail from this box using any other app (maybe mail? without attachments.)
What linux flavour are you running?
Is your DNS working?
Maybe the MTA is not running?
Please execute the following command and send us the output:
uname -a
host www.mimecast.com
netstat -nltp
tail -50 /var/log/messages
tail -50 /var/log/maillog
Please also send us the command you ran when you tested mutt
cheers
Colin
From: redhat-sysadmin-list-bounces at redhat.com [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of nitin.gizare at wipro.com
Sent: 14 May 2009 08:26 AM
To: nitin.gizare at wipro.com; redhat-sysadmin-list at redhat.com
Subject: RE: sending attachment with mail command
HI
Just tried using but I not getting mails. Does this have any configuration file in which we need to add mail relay server entry.?
.
Rgds
Nitin
________________________________
From: Nitin Gizare (WT01 - Product Engineering Services)
Sent: Thursday, May 14, 2009 11:49 AM
To: 'redhat-sysadmin-list at redhat.com'
Subject: RE: sending attachment with mail command
Thanks million.
Please log your queries/concerns/requests through http://edasupport.wipro.com<http://edasupport.wipro.com/> or send mail to eda.support at wipro.com for quicker resolutions.
Rgds
Nitin
________________________________
From: redhat-sysadmin-list-bounces at redhat.com [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Colin van Niekerk
Sent: Thursday, May 14, 2009 11:45 AM
To: redhat-sysadmin-list at redhat.com
Subject: RE: sending attachment with mail command
Hi Nitin,
Must you use the mail command or can you just any command, mutt may be a better option when dealing with attachments (its sorts out the MIME types for you so you don't need to add extra stuff to your script in order to ensure that the attachment is going to be readable on the other side - more applicable when sending binary attachments through older systems)
Unless it is not installed, you can use mutt as follows in scripts to send a mail with an attachment:
echo "message body goes here" |mutt -s "subject goes here" -a filename_with_full_path_goes_here email at address.goes.here
if you need it to go to many addresses (not limited to 3, this is an example only), use:
echo "message body goes here" |mutt -s "subject goes here" -a filename_with_full_path_goes_here email1 at address.goes.here,email2 at address.goes.here,email3 at address.goes.here
if you need to attach multiple files, just add another -a argument:
echo "message body goes here" |mutt -s "subject goes here" -a filename1_with_full_path_goes_here -a filename2_with_full_path_goes_here -a filename3_with_full_path_goes_here email at address.goes.here
Cheers,
Colin
From: redhat-sysadmin-list-bounces at redhat.com [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of nitin.gizare at wipro.com
Sent: 14 May 2009 04:39 AM
To: redhat-sysadmin-list at redhat.com
Subject: sending attachment with mail command
HI
I have requirement of sending server logs are attachment using mail command.
Is this possible? if not can some body suggest any other method.
Rgds
Nitin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20090514/a551d70d/attachment.htm>
More information about the redhat-sysadmin-list
mailing list