Sponsored Content
Top Forums UNIX for Advanced & Expert Users Sendmail succeeds, qmail fails Post 302903923 by charles_n_may on Friday 30th of May 2014 04:59:25 PM
Old 05-30-2014
Problem solved with embarrassingly simple change

After much anxiety this problem is solved.

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:
Code:
Content-Transfer-Encoding: uuencode
begin 644 testfile.txt

Works:
Code:
Content-Transfer-Encoding: uuencode

begin 644 testfile.txt

So here is the fixed example that works in both qmail and sendmail:
Code:
From: Sample sendmail script <samplescript@mydomain.com>
To: myaddress@mydomain.com
Reply-to: DO NOT REPLY <noreply@mydomain.com>
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: all
Subject: Test email with attachment from myhost
Mime-version: 1.0
Content-Type: Multipart/Mixed; boundary="xxxxxq0w9e8r7xxxxx"
--xxxxxq0w9e8r7xxxxx
Content-Type: text/html

<HTML><BODY>
<H1>Here is your formatted data:</H1>
<TABLE border=1>
<tr><th>Column 1</th><th>Column 2</th></tr>
<tr><td>Data 1</td><td>Data 2</td></tr>
</TABLE>
</BODY></HTML>
--xxxxxq0w9e8r7xxxxx
Content-Type: text/plain
Content-Disposition: attachment; filename="testfile.txt"
Content-Transfer-Encoding: uuencode

begin 644 testfile.txt
M=&AI<R!I<R!T:&4@8V]N=&5N="!O9B!T:&4@871T86-H;65N=`IT:&ES(&ES
K('1H92!S96-O;F0@;&EN92!O9B!T:&4@871T86-H;65N="!C;VYT96YT"@``
`
end
--xxxxxq0w9e8r7xxxxx--


Last edited by charles_n_may; 05-30-2014 at 06:05 PM..
This User Gave Thanks to charles_n_may For This Post:
 

10 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Linux mail servers benchmarks (Qmail, Sendmail,Postfix)

New Linux mail servers benchmarks website. Check out http://benchmarks.dmz.ro . (0 Replies)
Discussion started by: cipango
0 Replies

2. UNIX for Dummies Questions & Answers

QMail Help

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)
Discussion started by: perryl7
0 Replies

3. Programming

while vc++6 succeeds, g++ fails. ???

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)
Discussion started by: mihk
4 Replies

4. Solaris

Qmail - possible?

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)
Discussion started by: saveka
2 Replies

5. Red Hat

Sendmail fails receiving mail since the IP changed on Redhat Server

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)
Discussion started by: lamoul
3 Replies

6. Shell Programming and Scripting

execute ftp script until it succeeds

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)
Discussion started by: soliberus
5 Replies

7. Shell Programming and Scripting

Expect: Block of lines should be executed only if access succeeds

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)
Discussion started by: Hossam_Nox
2 Replies

8. Red Hat

Qmail

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)
Discussion started by: linux_land
3 Replies

9. UNIX for Dummies Questions & Answers

read fails in Unix, but succeeds in Linux. Why?

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)
Discussion started by: HgHK
2 Replies

10. Shell Programming and Scripting

Sendmail Fails to send emails from Linux server.

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)
Discussion started by: mohtashims
20 Replies
ipptool(1)							    Apple Inc.								ipptool(1)

NAME
ipptool - perform internet printing protocol requests SYNOPSIS
ipptool [ --help ] [ --stop-after-include-error ] [ --version ] [ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T seconds ] [ -V ver- sion ] [ -X ] [ -c ] [ -d name=value ] [ -f filename ] [ -i seconds ] [ -n repeat-count ] [ -q ] [ -t ] [ -v ] URI filename [ ... filenameN ] DESCRIPTION
ipptool sends IPP requests to the specified URI and tests and/or displays the results. Each named file defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The file format is described in ipptoolfile(5). OPTIONS
The following options are recognized by ipptool: --help Shows program help. --stop-after-include-error Tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive. --version Shows the version of ipptool being used. -4 Specifies that ipptool must connect to the printer or server using IPv4. -6 Specifies that ipptool must connect to the printer or server using IPv6. -C Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -E Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. -I Specifies that ipptool will continue past errors. -L Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -S Forces (dedicated) SSL encryption when connecting to the server. -T seconds Specifies a timeout for IPP requests in seconds. -V version Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. -X Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the -i (inter- val) and -n (repeat-count) options. -c Specifies that CSV (comma-separated values) output is desired instead of the plain text output. -d name=value Defines the named variable. -f filename Defines the default request filename for tests. -i seconds Specifies that the (last) file should be repeated at the specified interval. This option is incompatible with the -X (XML plist out- put) option. -l Specifies that plain text output is desired. -n repeat-count Specifies that the (last) file should be repeated the specified number of times. This option is incompatible with the -X (XML plist output) option. -t Specifies that CUPS test report output is desired instead of the plain text output. -v Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output. EXIT CODE
The ipptool program returns 0 if all tests were sucessful and 1 otherwise. COMPATIBILITY
The ipptool program is unique to CUPS. EXAMPLES
Get a list of completed jobs for "myprinter": ipptool ipp://localhost/printers/myprinter get-completed-jobs.test Send email notifications to "user@example.com" when "myprinter" changes: ipptool -d recipient=mailto:user@example.com ipp://localhost/printers/myprinter create-printer-subscription.test STANDARD FILES
The following standard files are available: color.jpg create-printer-subscription.test document-a4.pdf document-a4.ps document-letter.pdf document-letter.ps get-completed-jobs.test get-jobs.test get-notifications.test get-printer-attributes.test get-subscriptions.test gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test ipp-2.2.test ipp-everywhere.test onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps print-job.test print-job-deflate.test print-job-gzip.test testfile.jpg testfile.pcl testfile.pdf testfile.ps testfile.txt validate-job.test SEE ALSO
ipptoolfile(5), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 13 May 2013 CUPS ipptool(1)
All times are GMT -4. The time now is 05:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy