Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-20-2009, 12:02 AM   #1
LQ Newbie
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
cant to pipe attachment to sendmail using headers


I am having troubles with sendmail, whereby i cant pipe my attachment to the email i am sending.

here is the command i am using; where filename is attachment and tempfile is the file that contains the header information.

uuencode /tmp/$filename /tmp/$filename | sendmail -t < /tmp/$tempfile

i am using sendmail as i need to mask the sender address.

any help is appreciated

regards brad
Old 02-21-2009, 01:03 PM   #2
Registered: Jan 2009
Posts: 165

Rep: Reputation: 44
You are piping with a "|" and redirecting input from a file with a "<" at the same time... Your 'sendmail' program can't get its input from 2 sources.

A pipe should be enough, like in the following example:
base64 $filename | sendmail -i

More generally, a pipe is used when you want the output of one program to go in as input to the second program, and input redirection from files (with "<") only works when you have a real file on the disk with the pre-made input for the program.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do I edit attachment size in or deepak_message Linux - Software 1 10-23-2007 08:51 PM
attachment with a sendmail thelonius Linux - Software 1 09-13-2006 02:06 PM
attachment limits with sendmail p_test Linux - Networking 1 04-19-2006 10:02 AM
Attachment size in Sendmail RajaRC Linux - General 6 03-23-2004 12:05 AM
Attachment blocking in Sendmail RajaRC Linux - General 2 03-22-2004 09:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration