begin 644 in received message sent with sendmail


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting begin 644 in received message sent with sendmail
# 1  
Old 09-30-2009
begin 644 in received message sent with sendmail

I send an attachment 123.pdf using the below script:-

<< script content >>
Code:
#!/usr/bin/ksh

/usr/lib/sendmail -C sendmail.cf abc@gmail.com << END
Subject: HELLO
`uuencode 123.pdf 123.pdf`
END

However, the message I got in gmail look like:-
Code:
begin 644 123.pdf
... garbage ...
... many lines ...
... garbage ...

end

Anyone knows what can I do in the sending side so that the receiving side can display the correct attachment in gmail? Thanks...

Last edited by Franklin52; 10-02-2009 at 05:45 AM.. Reason: Please use code tags!
# 2  
Old 09-30-2009
Code:
uuencode 123.pdf 123.pdf | sendmail ...

# 3  
Old 09-30-2009
You are not sending the file as an attachment to your email. You are embedding it within your email.

Do a web search for "shell script mail MIME attachment" and you will find lots of examples of how to mail a message with a MIME attachment.
# 4  
Old 10-02-2009
I modified the script and gmail can show the attachment. However, the pdf cannot be opened. It seems to be damaged. Thanks.

Anyone can help to identify what parts are not good.

<< script content >>
Code:
#!/usr/bin/ksh

/usr/lib/sendmail -C sendmail.cf abc@gmail.com << END
Subject: HELLO
Content-Type: multipart/mixed; boundary="_boundarystring"

--_boundarystring
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="123.pdf"
Content-Transfer-Encoding: 7bit
`uuencode 123.pdf 123.pdf`
--_boundarystring--
END


Last edited by Franklin52; 10-02-2009 at 05:46 AM.. Reason: Please use code tags!
# 5  
Old 10-22-2009
Anyone here can help? Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

How to create all files generated in a directory with 644 permissions?

Hi, We are using AIX machines. How to create all files generated in a directory with 644 permissions automatically. Regards, Suresh (11 Replies)
Discussion started by: suresh3566
11 Replies

2. Shell Programming and Scripting

How to avoid "override protection 644 (yes/no)?" -ksh 88

Hi All, I'm using Ksh 88 version. I'm trying to remove the files using the below script .The code is working fine but i'm getting override protection 644 (yes/no)? message for every file .. Pelase suggest #!/usr/bin/ksh set -x File_Path="/etc/home/logs" Dest_Path="/etc/home/temp"... (1 Reply)
Discussion started by: smile689
1 Replies

3. UNIX for Dummies Questions & Answers

Sendmail error message

Hi i am having a probleme with my sendmail server. using it as a mta to send out email. keem on getting this error message back. ----- The following addresses had permanent fatal errors ----- <XXX@XXXX.co.za> (reason: 554 Denied (Mode: normal)) ----- Transcript of session... (1 Reply)
Discussion started by: sakie
1 Replies

4. Shell Programming and Scripting

override protection 644 (yes/no)?

Hi pls help me out to short out this problem rm PAB113_011.out rm: PAB113_011.out: override protection 644 (yes/no)? n If i give y it remove the file. But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (9 Replies)
Discussion started by: sri_aue
9 Replies

5. UNIX for Dummies Questions & Answers

SCO 5.0.7 Cron creates files with 600, need 644

Hi, I've searched and read, and searched and read some more; but I'm still not connecting the dots or understanding what I need to change. I have a script that creates a file. If I run it as root, the file gets created with 644 permissions like I want. That seems to make sense (at least I... (2 Replies)
Discussion started by: 65bit
2 Replies

6. UNIX for Advanced & Expert Users

sendmail and message alert

gurus, i need to know 2 things, first: how can i send mail over the internet in case of system failures/crash? second: how can i receive SMS alert on my phone in case of failures? do i need to start any service on my box? thanks & regards abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies

7. Cybersecurity

Sendmail keep a user from send message

Hello, i have a problem with my sendmail, i want' to keep a user from sending mail, how can i process ? My user is titi, and i don't want' that titi can't send mail via sendmail is it possible ? thnak a lot (1 Reply)
Discussion started by: westside
1 Replies

8. UNIX for Advanced & Expert Users

Ftp permission 644

On Sun Solaris 8 I would like a user to post via FTP a file with a put command with higher permission than the standard 644. For instance 664. I don't know how to perform it. Thank you in advance. (4 Replies)
Discussion started by: cagnod
4 Replies

9. UNIX for Dummies Questions & Answers

sendmail message body buffer limit?

when sending the contents of a ascii file to the body of an email then sending it off. it seems sendmail is breaking up the lines with a "!" thus ruining the data. Has this ever happened to anyone? i am guessing there is a line buffer limit in either the mail command or in sendmail itself. ... (3 Replies)
Discussion started by: Optimus_P
3 Replies
Login or Register to Ask a Question