Kyle Wheeler | 1 Mar 2007 01:00

Re: qmail Patch Repository

On Wednesday, February 28 at 05:17 PM, quoth Uncle George:
> Is there some reason why you cant have a switch-o-matic style of running 
> the piece of the package?

I'm not sure I understand you. Is there a reason why I don't want to 
run qmail-smtpd --with-smtp-auth? Is there a reason I don't want to 
patch qmail with ./patcher --with-smtp-auth?

No, strictly speaking there is no reason why you CAN'T do just about 
anything. But whether something is possible and whether something is a 
good idea and whether something is preferred are all very different 
things.

I *prefer* something that works exclusively with patches. If that's 
./patcher --with-foo or an interactive script, I don't really care 
which. I think the usability of the interactive script is nicer, but 
it's not a make-or-break point. But I also very strongly don't want to 
run the various parts of the qmail package with umpteen zillion switch 
arguments.

~Kyle
--

-- 
The government of the United States is not in any sense founded on the 
Christian Religion.
                                       -- US Treaty with Tripoly, 1797
Feizhou | 1 Mar 2007 03:43

Re: [djb <at> koobera.math.uic.edu: qmail 1.00 available]


> "Dan Bernstein (qmail's author) only gives permission for qmail to be 
> distributed in source form, or binary for by approval. This package has 
> been put together to allow people to easily build a qmail binary package 
> for themselves, from source.
> 
> This package builds a binary .deb that is FHS compliant and conforms to 
> the Debian standards guidelines. The resulting binary packages are not 
> suitable for re-distribution. "

Yes, just like netqmail, DJB's 'license' allows for the final effect 
that you can get from software using 'approved licenses'. You get the 
modified source code and build scripts necessary to create the binaries 
you want without politics about proprietary extensions or what not. 
Plain and simple.

Very much unlike other licenses that attempt to lay on restrictions 
outside of copyright law.

DAve | 1 Mar 2007 06:25

Re: [djb <at> koobera.math.uic.edu: qmail 1.00 available]

Feizhou wrote:
> 
>> "Dan Bernstein (qmail's author) only gives permission for qmail to be 
>> distributed in source form, or binary for by approval. This package 
>> has been put together to allow people to easily build a qmail binary 
>> package for themselves, from source.
>>
>> This package builds a binary .deb that is FHS compliant and conforms 
>> to the Debian standards guidelines. The resulting binary packages are 
>> not suitable for re-distribution. "
> 
> Yes, just like netqmail, DJB's 'license' allows for the final effect 
> that you can get from software using 'approved licenses'. You get the 
> modified source code and build scripts necessary to create the binaries 
> you want without politics about proprietary extensions or what not. 
> Plain and simple.
> 
> Very much unlike other licenses that attempt to lay on restrictions 
> outside of copyright law.

Sorry, should have been more clear. Your point was my point, I see no 
problem here.

DAve

--

-- 
Three years now I've asked Google why they don't have a
logo change for Memorial Day. Why do they choose to do logos
for other non-international holidays, but nothing for
Veterans?
(Continue reading)

Feizhou | 1 Mar 2007 07:39

Re: [djb <at> koobera.math.uic.edu: qmail 1.00 available]

DAve wrote:
> Feizhou wrote:
>>
>>> "Dan Bernstein (qmail's author) only gives permission for qmail to be 
>>> distributed in source form, or binary for by approval. This package 
>>> has been put together to allow people to easily build a qmail binary 
>>> package for themselves, from source.
>>>
>>> This package builds a binary .deb that is FHS compliant and conforms 
>>> to the Debian standards guidelines. The resulting binary packages are 
>>> not suitable for re-distribution. "
>>
>> Yes, just like netqmail, DJB's 'license' allows for the final effect 
>> that you can get from software using 'approved licenses'. You get the 
>> modified source code and build scripts necessary to create the 
>> binaries you want without politics about proprietary extensions or 
>> what not. Plain and simple.
>>
>> Very much unlike other licenses that attempt to lay on restrictions 
>> outside of copyright law.
> 
> Sorry, should have been more clear. Your point was my point, I see no 
> problem here.

Oh I did not have a problem, I was just adding to your example to point 
out that DJB's 'license' could even be freer than stuff like the GPL 
with the exception of redistribution of modified binaries.

ann wang | 1 Mar 2007 18:40
Picon
Favicon

How to pass email message body to qmail-inject in Java

Hi, 

I am using "Runtime.exec()" to run 
 qmail-inject
 and give it the message either from a string or file.
I have to pass the message
 body to qmail inside java, how would I do it. I am
 desperate since it won't read anything from
 message.txt, it just won't read < message.txt.
 It end up sending a blank email.

   Process proc =
 runtime.exec("/var/qmail/bin/qmail-inject
 naannwang <at> yahoo.com < message.txt");

 Thanks ahead!
 ~A

Charles Cazabon | 1 Mar 2007 20:11
Picon

Re: How to pass email message body to qmail-inject in Java

ann wang <naannwang <at> yahoo.com> wrote:
>  
> I am using "Runtime.exec()" to run 
>  qmail-inject
>  and give it the message either from a string or file.
> I have to pass the message
>  body to qmail inside java, how would I do it. I am
>  desperate since it won't read anything from
>  message.txt, it just won't read < message.txt.
>  It end up sending a blank email.
>   
>    Process proc =
>  runtime.exec("/var/qmail/bin/qmail-inject
>  naannwang <at> yahoo.com < message.txt");

That would only work if Java was passing that string to a shell to execute
(i.e., the "<" redirection is a feature of the shell).

I know nothing about Java, so I can't tell you whether Java passes this
through a shell or not, but I'd suspect it doesn't.  I'm surprised, in that
case, that the above works at all.  Is it sending a blank message to
<message.txt <at> yourdomain> as well?

To send mail, you'll need to run qmail-inject with it's stdin set to the file
containing your message.  Check your Java book for how to do that.

Charles
--

-- 
--------------------------------------------------------------------------
Charles Cazabon                               <qmail <at> discworld.dyndns.org>
(Continue reading)

Scott Gifford | 1 Mar 2007 20:58
Gravatar

Re: How to pass email message body to qmail-inject in Java

Charles Cazabon <qmail <at> discworld.dyndns.org> writes:

> ann wang <naannwang <at> yahoo.com> wrote:

[...]

>>    Process proc =
>>  runtime.exec("/var/qmail/bin/qmail-inject
>>  naannwang <at> yahoo.com < message.txt");
>
> That would only work if Java was passing that string to a shell to execute
> (i.e., the "<" redirection is a feature of the shell).

Of course, you could make it use the shell.  I don't have a Java
compiler handy, but here's an untested ways that might work; even if
it doesn't hopefully it will get you pointed in the right direction:

    runtime.exec(new String[] {"/bin/sh","-c","/var/qmail/bin/qmail-inject naannwang <at> yahoo.com
<message.txt"} );

[...]

> To send mail, you'll need to run qmail-inject with it's stdin set to the file
> containing your message.  Check your Java book for how to do that.

The method Charles suggests will probably be a bit more efficient.

---Scott.

(Continue reading)

Norman | 1 Mar 2007 20:01
Picon

Re: How to pass email message body to qmail-inject in Java

Hi I think its more a java question. But this should work (very basic
version without BufferedStreams and exception handling) :

----------------------------------------------------------------------------------------

Process proc = runtime.exec("/var/qmail/bin/qmail-inject naannwang <at> yahoo.com"); 
OutputStream out = proc.getOutputStream();

FileInputStream fileStream = new FileInputStream("message.txt");

int b = -1;

while ((b= fileStream) != -1) {

    out.write(b);

}

out.close();
fileStream.close();

int exitCode = proc.waitFor();

-----------------------------------------------------------------------

ann wang schrieb:
> Hi, 
>  
> I am using "Runtime.exec()" to run 
>  qmail-inject
(Continue reading)

Berger Stefan | 2 Mar 2007 11:11
Picon

Delivering Mails from Maildir to SMTP

Hi all ,

I need to deliver emails from a maildir to customer smtp server .
Mails are first inspected by DSPAM and then delivered to customers
Maildir ( via Maildrop ) . 
Every 15 Minutes the Maildir should be read and messages should be
forwarded
to customers smtp server ( server is only up during business hours )

I want to do this by maildirsmtp . I have read a lot about maildirsmtp
but
I'm not able to get it working .
I have modified the mailfilter of Maildrop to add a deliverd-to line
with a prefix
for maildirsmtp .
Messages were deliverd to Maildir without any Problems .

HEADER-EXAMPLE:

Delivered-To: spooler-test3 <at> testme-intern.net
Received: (qmail-ldap/ctrl 7322 invoked from network); 17 Jan 2007
16:19:19 -0000
Received: from ###########PROTECTED################
          (envelope-sender <Stefan.Berger <at> wvnet.at>)
          by ####PROTECTED######## (qmail-ldap-1.03) with SMTP
          for <test3 <at> testme-intern.net>; 17 Jan 2007 16:19:19 -0000
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
        charset="us-ascii"
(Continue reading)

Charles Cazabon | 2 Mar 2007 14:54
Picon

Re: Delivering Mails from Maildir to SMTP

Berger Stefan <Stefan.Berger <at> wvnet.at> wrote:
> 
> When i try to deliver the email from the shell with
> 
> maildirsmtp
> /home/mailspool/qmail/domains/testme-intern.net/spooler/Maildir \
> spooler- 192.168.110.72 ##PROTECTED##
> 
> Nothing happens -> no errormessage , no delivery of mail occurs.

maildirsmtp generally prints some output.  When you run the above command that
"nothing happens", what is its exit code?

Charles
--

-- 
--------------------------------------------------------------------------
Charles Cazabon                               <qmail <at> discworld.dyndns.org>
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
My services include qmail consulting.  See http://pyropus.ca/ for details.
--------------------------------------------------------------------------


Gmane