Mailing List Archive

maildir2smtp problems/questions
Here is what I run:

maildir2smtp /ssa1/home/q/qsicorp/pppdir qsicorp- 207.0.50.206 shell.inconnect.com

Here is the output:


trying cur/...

trying new/...

trying new/...



Here is a header from a message in the maildir:


Return-Path: <dkelson@inconnect.com>
Delivered-To: qsicorp@shell.inconnect.com
Received: (qmail 20611 invoked from network); 28 Feb 1997 16:42:36 -0000
Received: from mail.inconnect.com (207.173.163.7)
by ultra1.inconnect.com with SMTP; 28 Feb 1997 16:42:36 -0000
Received: (qmail 26323 invoked by uid 421); 28 Feb 1997 16:40:16 -0000
Delivered-To: qsicorp-travis@qsicorp.com
Received: (qmail 26313 invoked from network); 28 Feb 1997 16:40:13 -0000
Received: from ultra1.inconnect.com (HELO shell.inconnect.com)
(qmailr@207.173.163.2)
by mail.inconnect.com with SMTP; 28 Feb 1997 16:40:13 -0000
Received: (qmail 20535 invoked by uid 10); 28 Feb 1997 16:42:30 -0000
Date: Fri, 28 Feb 1997 09:42:29 -0700 (MST)
From: Dax Kelson <dkelson@inconnect.com>
X-Sender: dkelson@ultra1
To: travis@qsicorp.com
Subject: Testing
Message-ID: <Pine.SOL.3.95q.970228094221.16646C-100000@ultra1>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII



And the message doesn't get sent. Does maildir2smtp give output like
"sending 5 messages...." or something? What did I do wrong?

Dax Kelson
Internet Connect, Inc.
Re: maildir2smtp problems/questions [ In reply to ]
> Delivered-To: qsicorp@shell.inconnect.com

Looks like you didn't see the advice in my message yesterday,
<AABhLTMViIsAAddV@pool.uunet.pipex.com> (or maybe it wan't clear enough,
in which case I apologize).

Somewhere---I suspect the mail.ispdomain.com machine you mentioned---
you're tossing away the information that maildir2smtp needs to work: the
original address of the recipient. If you want to use maildir2smtp, you
*must* use virtualdomains on the host that holds the maildir, and you
must deliver into the maildir with a .qmail-default file. Otherwise,
there isn't enough information in the Delivered-To line for maildir2smtp
to work.

Once you've got it right, you'll end up with messages in the maildir
that say things like this.

Delivered-To: qsicorp-travis@qsicorp.com

This, and the value of <prefix>, are used by maildir2smtp to reconstruct
the original recipient address.

(This should probably be on the djb-serialmail@koobera.math.uic.edu
list.)

Tim.
Re: maildir2smtp problems/questions [ In reply to ]
On Fri, 28 Feb 1997, Tim Goodwin wrote:

> > Delivered-To: qsicorp@shell.inconnect.com

Thank you, I got that fixed.

Here is what the headers look like now:

Return-Path: <dkelson@inconnect.com>
Delivered-To: qsicorp-ppp-travis@qsicorp.com
Received: (qmail 25496 invoked by uid 10); 28 Feb 1997 17:51:58 -0000
Date: Fri, 28 Feb 1997 10:51:58 -0700 (MST)
From: Dax Kelson <dkelson@inconnect.com>


And my "maildir2smtp" command:

maildir2smtp /ssa1/home/q/qsicorp/pppdir qsicorp-ppp- 207.0.50.206 shell.inconnect.com


However, when I run it I just get:

trying cur/...

trying new/...

trying new/...


And the message is just sitting there in the "new" dir. Did it send it? I
can telnet to the smtp port on "207.0.50.206".

Dax Kelson
Internet Connect, Inc.
Re: maildir2smtp problems/questions [ In reply to ]
Tim Goodwin:
> Somewhere---I suspect the mail.ispdomain.com machine you
> mentioned--- you're tossing away the information that maildir2smtp
> needs to work: the original address of the recipient. If you want
> to use maildir2smtp, you *must* use virtualdomains on the host that
> holds the maildir, and you must deliver into the maildir with a
> .qmail-default file. Otherwise, there isn't enough information in
> the Delivered-To line for maildir2smtp to work.

Hmm...

I must admit I've never gotten virtualdomains to work right for myself
-- then again, I've not really understood how the FAQ examples are
supposed to work, and I only did a few trials.

On the other hand, I do have a working serialmail setup. What I did
was take an existing sendmail configuration which lists cc:Mail users
and include those in my /var/qmail/users/assign, with user-id and
group id matching my serialmail queue user id. Then, in the .qmail
file for that id, I have
|/usr/local/bin/serialmail-write serialmailhost

serialmail-write looks like this:

!/usr/bin/perl -w
#
# rewrite destination address on mail messages headed into serialmail
#
# takes qmail message on stdin, generates output in ./Maildir/new/.

sub giveup{
unlink $tmp;
print STDERR "Giving up. @_\n";
exit 111;
}

# file to hold message
$msg= time.".$$.$ENV{'HOST'}"; # unique name for file to hold message
$tmp= "Maildir/tmp/$msg";
$new= "Maildir/new/$msg";
open STDOUT, ">$tmp" or giveup "I can't open message file";

# envelope
$|=1; # flush output immediately
print <<EOF or giveup "I can't write message envelope";
Return-Path: <$ENV{'SENDER'}>
Delivered-To: $ENV{'USER'}\@$ARGV[0]
EOF

# message
!system "/bin/cat" or giveup "I can't write message";

# commit
rename $tmp, $new or giveup "I can't present new message";



=Note that this gives me something that virtualdomains can't do: the
ability to selectively forward to accounts with different user names.

--
Raul