I am fairly new to qmail.  I have a problem when sending messages to an
alias.  This is for handling unsubscribe requests to a newsletter.

In /var/qmail/alias I have a file .qmail-unsub-default:
-------------
|/home/arcamax/ezinesub -e
# if the above failes then it is forwarded to a human
&[EMAIL PROTECTED]
-------------
The ezinesub program looks for the "To:" header and uses that to determine
what action to take.  The problem is that about 1% of the time the "To:"
header is not found on the input to ezinesub.

I am currently dumping all input to a log file until th "To:" header if
found.  Here is a failing entry:
--------------
7303:ezinesub v0.04 called : 02/05/1999 15:22:56:
7303:InputFormat=1
7303:>Received: (qmail 7300 invoked from network); 5 Feb 1999 20:22:55 -0000
7303:>Received: from neodymium.btinternet.com (194.73.73.83)
7303:>  by db.arcamax.com with SMTP; 5 Feb 1999 20:22:55 -0000
7303:>Received: from XXXXX [195.99.58.203]
7303:> by neodymium.btinternet.com with smtp (Exim 1.70 #1)
7303:> id 108rmL-0002or-00; Fri, 5 Feb 1999 20:23:05 +0000
7303:>Message-ID: <003401be5145$6dd19e80$cb3a63c3@XXXXX>
7303:>Reply-To: "Harry & Betty Millhouse" <[EMAIL PROTECTED]>
7303:>From: "Harry & Betty Millhouse" <[EMAIL PROTECTED]>
7303:>To: <[EMAIL PROTECTED]>
7303:Encoded Address:  <[EMAIL PROTECTED]>
7303:Cmd: unsub, Email:[EMAIL PROTECTED], Context:ztrivia
7303:unsubscribed 1027311:[EMAIL PROTECTED] from list 3:trivia
affected(1)

7308:ezinesub v0.04 called : 02/05/1999 15:23:00:
7308:InputFormat=1
7308:>Received: (qmail 7305 invoked from network); 5 Feb 1999 20:22:59 -0000
7308:>Received: from neodymium.btinternet.com (194.73.73.83)
7308:>  by db.arcamax.com with SMTP; 5 Feb 1999 20:22:59 -0000
7308:>Received: from XXXXX [195.99.58.203]
7308:> by neodymium.btinternet.com with smtp (Exim 1.70 #1)
7308:> id 108rmJ-0002or-00; Fri, 5 Feb 1999 20:23:04 +0000
7308:>From: "XXXXX" <[EMAIL PROTECTED]>
7308:>Subject: unsubscribe
7308:>X-Spanska: Yes
7308:>Message-Id: <[EMAIL PROTECTED]>
7308:>Bcc:
7308:>Date: Fri, 5 Feb 1999 20:23:04 +0000
7308:>
7308:Fatal Error: No User Email Address
--------------

Note:  This appears to be 2 separate messages that are appearing in rapid
succession.

Here is the corresponding entry in the qmail log:
--------------
Feb  5 15:22:56 db splogger: 918246176.042284 new msg 3123809
Feb  5 15:22:56 db splogger: 918246176.042524 info msg 3123809: bytes 855
from <[EMAIL PROTECTED]> qp 7300 uid 401
Feb  5 15:22:56 db splogger: 918246176.049784 starting delivery 146007: msg
3123809 to local [EMAIL PROTECTED]
Feb  5 15:22:56 db splogger: 918246176.049901 status: local 1/10 remote
0/250
Feb  5 15:22:56 db splogger: 918246176.178240 delivery 146007: success:
did_0+0+1/
Feb  5 15:22:56 db splogger: 918246176.178446 status: local 0/10 remote
0/250
Feb  5 15:22:56 db splogger: 918246176.178525 end msg 3123809
Feb  5 15:23:00 db splogger: 918246180.302093 new msg 3123809
Feb  5 15:23:00 db splogger: 918246180.302320 info msg 3123809: bytes 521
from <[EMAIL PROTECTED]> qp 7305 uid 401
Feb  5 15:23:00 db splogger: 918246180.308434 starting delivery 146008: msg
3123809 to local [EMAIL PROTECTED]
Feb  5 15:23:00 db splogger: 918246180.308554 status: local 1/10 remote
0/250
Feb  5 15:23:00 db splogger: 918246180.361222 new msg 3123886
Feb  5 15:23:00 db splogger: 918246180.361459 info msg 3123886: bytes 653
from <[EMAIL PROTECTED]> qp 7309 uid 400
Feb  5 15:23:00 db splogger: 918246180.369216 starting delivery 146009: msg
3123886 to remote [EMAIL PROTECTED]
Feb  5 15:23:00 db splogger: 918246180.369344 status: local 1/10 remote
1/250
Feb  5 15:23:00 db splogger: 918246180.369429 delivery 146008: success:
did_0+1+1/qp_7309/
Feb  5 15:23:00 db splogger: 918246180.369509 status: local 0/10 remote
1/250
Feb  5 15:23:00 db splogger: 918246180.369585 end msg 3123809
Feb  5 15:23:00 db splogger: 918246180.501649 delivery 146009: success:
206.246.240.138_accepted_message./Remote_host_said:_250_PAA09790_Message_acc
epted_for_delivery/
Feb  5 15:23:00 db splogger: 918246180.501817 status: local 0/10 remote
0/250
Feb  5 15:23:00 db splogger: 918246180.501895 end msg 3123886
--------------
Note, I have X'ed out the clients name wherever it occurs.

When it fails the message is redirected to another machine that is running
sendmail and from there picked up via POP3.  At this end the "To:" header
will sometimes be correct, somtimes be blank, and sometimes be missing.  At
this point the "Delivered-To:" header does contain the desired address but I
am not seeing this in ezinesub.

Why don't I always get a "To:" header?

I am not always clear on what headers are getting added where but obviously
qmail knows the recipient address.  Is there an alternative way of getting
this info like an environment variable?

Bryan White
ArcaMax Inc.
Yorktown VA
www.arcamax.com

Reply via email to