I am attempting to send multipart formatted email using sendmail -t with attachments. The attachments always arrive as empty if sent from linux. They are intact if sent from AIX.
Does qmail not support attachments for multipart formatted email?
I have a legacy application which runs splendidly in AIX, generating formatted HTML email and adding mutliple attachments (.csv and .zip files).
This application is being migrated to linux and the sendmail implementation on the linux host is mini-qmail.
Here is a sample file which I can pipe to sendmail -t on either host to demonstrate the problem (If you try to run it, obviously doctor up the To: line so it sends to you).
Please, please don't try an experiment where you just pipe a file through uuencode to sendmail -t and tell me it works. That's not enough. The email has to be multipart, with formatted headers and sections.
Now with the contents above saved in a file named pipe_to_sendmail, execute
The file arrives with an intact attachment that contains two lines of text if sent from AIX.
If sent from linux, the email looks the same, except the attachment arrives as an empty file.
In linux (2.6.32-220.el6.x86_64) the sendmail in my path is a symbolic link to mini-qmail: ---------- Post updated at 03:44 PM ---------- Previous update was at 01:08 PM ----------
So my admin installed "real" sendmail to replace qmail and the attachment now arrives intact. Although this works, I don't understand why qmail didn't succeed.
Does this mean qmail itself does not fully support attachments in multipart email? Or is there a difference in the way it is configured that causes its attachments in multipart emails to arrive empty?
Unfortunately that's not sufficient because it doesn't have a formatted HTML body, isn't multipart, and doesn't have the custom headers required. You really have to use my example.
The code that generates the custom sendmail headers, HTML formatted body, and attachments is embedded in the database. Using a different program isn't really an option. It's also not a matter of just sending an email with attachments. It has to be the whole thing.
Evidently qmail requires a blank line between the Content-type declarations for the attachment and the beginning of the encoded content. Sendmail is not as picky and does not require this blank line.
In my example from this thread, putting a blank line between these two lines makes the attachment succeed with both qmail or sendmail:
Fails:
Works:
So here is the fixed example that works in both qmail and sendmail:
Last edited by charles_n_may; 05-30-2014 at 06:05 PM..
This User Gave Thanks to charles_n_may For This Post:
I m using free zoho mail client application (similar to microsoft outlook) on my mobile for all my emails to mohtashim@techx.com
I wish to only recieve emails from my Linux Server details of which are: techx 3.10.0-514.10.2.el7.x86_64 #1 SMP CentOS release 7.3.1611 (Core).
I try the below... (20 Replies)
Hi,
When I use "read" to parse the sftp command sent via ptty, I ran into a very mysterious case below:
---
In Unix, the command ‘quit' is lost.
===
Fri 13Apr12 15:42:47GMT-sftp_send_command: SENT
Fri 13Apr12 15:42:47GMT-sftp_read_resp_line: Parse buffer=quit^M --> Command sent correctly... (2 Replies)
hi all, i want to install Qmail but i don't from where can i get the package , and also if one know source that can explain qmail kindly tell me about it (3 Replies)
Hello
I'm using expect to create a script. I want some lines to be executed only if the telnet succeeds to the target host. Kindly check the code that i created. The problem i'm facing that while execting the script, the lines after login seems to be ignored. The password is not sent and also... (2 Replies)
I have a ftp script that occasionally fails (connection lost error). I would like to execute the ftp command until it succeeds. Would the script below work?
while
do
ftp -i -n <<EOF >> $LOG
open $FTP_HOST
user $FTP_LOGIN $FTP_PASSWD
put filename.csv
bye
quit
... (5 Replies)
Hi,
Since i move my Linux Redhat server on another Network with new IP address. WE'RE ABLE TO SEND MAIL OUTSIDE BUT we can not receive any incoming mail. It alway points to the old IP. I updated new IP in /etc/hosts and /etc/sysconfig/network then reboot the system. 10.117.32.20 is an old ip... (3 Replies)
Hi guys,
Could you please advice me as im a new guy into Solaris ...is it possible to have qmail up and running on Solaris 10 and do you know where i can find some documentation on downloading and configuring - qmail?
thank you guys
vladi, (2 Replies)
My code is at:
http://rafb.net/p/E82U3C73.html
It is a concept sample. I desperately tried to compile it with g++. To my surprise (in vmplayer/ win2k) vc++6 succeeds to compile it.
I'm in very doubt. I used RedHat WS 4 , g++-3.4 and Debian Etch, g++-4.1
Comment this please!!
mihai (4 Replies)
My company is running qmail on our Unix server. I would like to run a MySQL script whenever an email was sent to a specific email address. I don't want to have to check every email that comes in, so I was thinking that the script would run when the message arrives at the specific mailbox. Is there... (0 Replies)