[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emacs sends mail, but doesn't show-up in exim.



On Mon, May 07, 2001 at 01:58:45PM -0700, Robert Cymbala wrote:
> What are the "D"s next to some addresses but not others in this mailq
> output:
>  0m  2.3K 14wrw8-0003EP-00 <cymbaLa@Lafn.org>
>         D cymbala@Lafn.org
>           friend@ma.ultranet.com
>           [...]
>         D Hot49erfan@aol.com
>           [...]
> 
> In my last posting, Hot49erfan was a recipient that would get into
> exim's queue, then disappear.  It has a "D".
> 
> What's D?

The exim manpage, in the section about the -bp option, says,

              The recipients of the message (taken from the enve-
              lope, not the headers) are displayed on  subsequent
              lines.  Those  addresses  to  which the message has
              already been delivered are marked with  the  letter
              D.   If an original address gets expanded into sev-
              eral addresses via an alias or  forward  file,  the
              original is displayed with a 'D' only when deliver-
              ies for all of its child addresses are completed.

I once had an interrupted exim delivery like the one you described
freeze delivery on all the messages to certain addresses.  Quite
mysterious.  I think I solved it by removing the half-delivered
message with exim -Mrm.
 
On Sat, May 12, 2001 at 01:53:11PM -0700, Robert Cymbala wrote:
> 
> I honestly think that they are disappearing.  Have made the trip from
> LA to NYC, and right now I'm at my friend's place.  Just now I
> plugged-in my laptop.  The D-Link card is _not_ connected to the phone
> line.  Command "mailq" showed nothing in queue.  As non-root user, I
> typed 'echo "TEST" | mail Hot49erfan@aol.com' and did not receive any
> error messages.  Immediately, I switched to tty1 and did "mailq" as
> root.  It reported:
>  0m   312 14yfxa-00007u-00 <cymbaLa@Lafn.org>
>           Hot49erfan@aol.com
> Then, about two seconds later, I repeated "mailq" and it didn't report
> anything!  It disappeared, rather than was sent, since the only wire
> going into laptop is the power cord.  Note that there's no " D " to
> the left of address; in another posting
> ( http://lists.debian.org/debian-user-0105/msg01047.html ) there was a
> " D " next to that particular email address.

Yes, only having one wire does seem to indicate that the message has
not successfully been delivered.

The reason there's no "D" in that mailq output is that, at the time
you ran mailq, the message had not been delivered to that address.  To
see a "D", you would send a single message to multiple recipients; the
partially delivered message would show "D"s indicating which addresses
had already been processed and which were still waiting to be delivered.

> >If you get another reproducable one, try this:
> >
> >echo "don't go away" | vanishing@address ;
> >tail -f /var/spool/exim/msglog/$(mailq |head -1  | cut -b11-26 ) ;
> >
> >which will get the first message ID out of mailq and follow that
> >logfile.
> 
> It's reproducable.  I sent a message to the vanishing address
> (N.B. with "mail" before the vanishing address), followed immediately
> by said tail command.  Within one second of sending email, that tail
> command gave:
>   $ tail -f /var/spool/exim/msglog/$(mailq |head -1 | cut -b11-26)
>   tail: /var/spool/exim/msglog/14ygCG-0000AN-00: No such file or directory
>   tail: no files remaining
> After a second or two, the same command gave:
>   $ tail -f /var/spool/exim/msglog/$(mailq |head -1 | cut -b11-26)
>   tail: /var/spool/exim/msglog/: Is a directory
>   tail: /var/spool/exim/msglog/: cannot follow end of non-regular file
>   tail: `/var/spool/exim/msglog/' has been replaced with a non-regular file; cannot follow end of non-regular file
>   tail: no files remaining
> 
> Woe is me... I don't know what to do next!  to get it to work again.
> I'm also coming to grips with the fact that, historically, I don't
> know which messages were sent and which messages disappeared (don't
> know when this 'behavior' began).

OK, here's what that means.

"mailq", as you know, outputs a list of messages waiting to be
delivered:
11:22 # mailq 
14m  2.7K 14zJxH-0006OB-00 <lists.debian.org!bounce-debian-user=rob42=myrealbox.com@imap.myrealbox.com>
          alphenglor@localhost

14m  5.8K 14zJxi-0006OB-00 <lists.debian.org!bounce-debian-user=rob42=myrealbox.com@imap.myrealbox.com>
          alphenglor@localhost

11:22 # 

"head -1" keeps only the first line of the standard input and throws
the rest away:

11:23 # mailq | head -1
16m  2.7K 14zJxH-0006OB-00 <lists.debian.org!bounce-debian-user=rob42=myrealbox.com@imap.myrealbox.com>
11:24 # 

"cut" selects part of the line:

11:24 # mailq | head -1 | cut -b11-26
14zJxH-0006OB-00
11:25 # 

The bash idiom $(cmd) substitutes the output of "cmd" at that point in
the command line:

11:25 # msgid=$(mailq | head -1 | cut -b11-26) ; echo $msgid
14zJxH-0006OB-00
11:27 # ls 1* ; touch $(mailq | head -1 | cut -b11-26) ; ls 1*
ls: 1*: No such file or directory
-rw-rw-r--    1 root     root            0 May 14 11:27 14zJxH-0006OB-00
11:27 # 

So "tail -f /var/spool/exim/msglog/$(mailq |head -1 | cut -b11-26)"
means, "follow the end of the file
/var/spool/exim/msglog/14zJxH-0006OB-00" in the example I just showed
you.  This should be the per-message logfile, but it doesn't exist
until a delivery has been attempted, which is why your first attempt
failed with "no such file"; the second failure ("msglog/:  is a
directory") was because the message had already been delivered and the
$() expansion returned an empty string.

Try sending a message to a both to a disappearing and non-disappearing
address.  The disappearing address, after delivery, should show up
with a "D" in the mailq output, while the non-disappearing address
prevents the mail from being erased from the queue.  Then you should
be able to see what happened from the logfile.

> It's been a great trip so far.  Wedding at Chateau Briand last night
> was a good time.

Glad that you're enjoying yourself.  Hope that works.

Rob

-- 
rugged, adj.:
	Too heavy to lift.



Reply to: