Mark, This is simpler than it may seem at first glance.
We use msmtp which sendmail points to, which shares most options of sendmail. These building blocks are very general to apply to many different applications. You could make a simple script wrapper, for example "mail-cdr" $ /mnt/kd/bin/mail-cdr "CDR_records" "/mnt/kd/cdr-csv/Master.csv" "[email protected]" Create "mail-cdr" (suggested at /mnt/kd/bin/mail-cdr) -- #!/bin/sh if [ $# -ne 3 ]; then echo "Usage: mail-cdr subject filename to_address" exit 1 fi echo "Subject: $1 To: $3" | \ mime-pack "CDR's" "$2" "text/plain" | \ sendmail -t -- make it executable (chmod 755 mail-cdr) and you can test. You can easily tweak the script for your needs. To answer you questions, no this is not uclibc related. It has never been simpler to send an attachment in AstLinux. Lonnie On Dec 21, 2010, at 8:35 PM, Mark Phillips wrote: > Thanks Lonnie. > > This is kinda complicated. Can I assume that with the advent of the > regular C libraries rather than the ulibc libraries this will go away in > favour of something actual "sendmail" or exim or similar? > > And what about previous versions? > > Thanks > > Mark > > On 12/21/2010 06:57 PM, Lonnie Abelbeck wrote: >> Hi Mark, >> >> The 'mail' command is just a dummy wrapper to /dev/null, not functional. >> >> The command 'sendmail' is what you want to use. >> >> Starting in 0.7.4, we added a new command 'mime-pack' that creates a mime >> encoded email, ie. >> >> $ mime-pack >> Usage: mime-pack msg_body file_name1 mime_type1 [ file_name2 mime_type2 ... ] >> Example: mime-pack "Message body\nline2" "file.pdf" "application/pdf" >> >> The structure is: echo "header lines..." | mime-pack ... | sendmail -t >> >> So, to create a mime encoded email containing an attachment, start by >> specifying the Subject: and To: header lines, then pipe that to mime-pack to >> add the attachment, finally pipe that to sendmail -t . For example, >> interactively using the shell... >> -- >> $ echo "Subject: CDR_records >>> To: [email protected]" | \ >>> mime-pack "CDR's\nEnjoy..." "/mnt/kd/cdr-csv/Master.csv" "text/plain" | \ >>> sendmail -t >> -- >> >> Lonnie >> >> PS: we should add a tip in the docs for this. >> >> >> On Dec 21, 2010, at 4:09 PM, Mark Phillips wrote: >> >>> Hi folks, >>> >>> I have a need to email certain log files and CDR records etc out of the >>> AstLinux box. >>> >>> I've been using this command .... >>> >>> mail -s "CDR_records" -a /mnt/kd/cdr-csv/Master.csv [email protected] >>> >>> Which appears to complete but the mail and attachment never arrive. >>> >>> Voicemail files from the same system _are_ getting to my email. >>> >>> /var/log/messages shows nothing. >>> >>> Ideas? >>> >>> Thanks >>> >>> -- >>> >>> >>> /\/\ark Phillips >>> >>> ------------------------------------------------------------------------------ >>> Forrester recently released a report on the Return on Investment (ROI) of >>> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even >>> within 7 months. Over 3 million businesses have gone Google with Google >>> Apps: >>> an online email calendar, and document program that's accessible from your >>> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew >>> _______________________________________________ >>> Astlinux-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/astlinux-users >>> >>> Donations to support AstLinux are graciously accepted via PayPal to >>> [email protected]. >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Forrester recently released a report on the Return on Investment (ROI) of >> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even >> within 7 months. Over 3 million businesses have gone Google with Google >> Apps: >> an online email calendar, and document program that's accessible from your >> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew >> _______________________________________________ >> Astlinux-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/astlinux-users >> >> Donations to support AstLinux are graciously accepted via PayPal to >> [email protected]. >> > > -- > > > /\/\ark Phillips > > ------------------------------------------------------------------------------ > Forrester recently released a report on the Return on Investment (ROI) of > Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even > within 7 months. Over 3 million businesses have gone Google with Google Apps: > an online email calendar, and document program that's accessible from your > browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew > _______________________________________________ > Astlinux-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > [email protected]. > > ------------------------------------------------------------------------------ Forrester recently released a report on the Return on Investment (ROI) of Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even within 7 months. Over 3 million businesses have gone Google with Google Apps: an online email calendar, and document program that's accessible from your browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew _______________________________________________ Astlinux-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [email protected].
