qmail Digest 21 May 2000 10:00:01 -0000 Issue 1008

Topics (messages 42104 through 42130):

Re: qmail-start out of control
        42104 by: Manfred Bartz

Re: start qmail automatically...
        42105 by: Arisandy Arief
        42118 by: clemensF

Re: I want to leave this list
        42106 by: wightman.acm.org
        42107 by: Bro. Len Budney
        42121 by: James R Grinter

Re: ezmlm-make -em, -r and -s not supported
        42108 by: Vincent Danen

Qmail and conf-spawn
        42109 by: Vincent Danen
        42111 by: Peter Green
        42112 by: Vincent Danen
        42117 by: clemensF
        42120 by: Peter Green
        42123 by: David Dyer-Bennet
        42129 by: clemensF
        42130 by: clemensF

Re: The current status of IETF drafts concerning bare linefeeds
        42110 by: Andy Bradford

Re: Doing logging from qmail-pop3d without going thru syslog?
        42113 by: Chin Fang
        42115 by: Chin Fang
        42119 by: Louis Theran
        42127 by: clemensF
        42128 by: Chin Fang

Re: qmail problem
        42114 by: Brent R. Matzelle

Forward to multiple people?
        42116 by: Snowcrash

Success with qmail, scan4virus and FreeBSD 4.0?
        42122 by: Martin Gignac

Re: PROB. SOLVED -- qmail-qstat and qmaill-qread differences...
        42124 by: Martin Gignac
        42126 by: Rick Myers

qmail-clean not working?
        42125 by: Martin Gignac

Administrivia:

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To bug my human owner, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


"Keven Jones" <[EMAIL PROTECTED]> writes:

> I have successfully installed and test qmail with maildir but:
> 
> qmail-start is KILLING my system.  I am using supervise and
> tcpserver.  I sometimes have upto 32 qmail processes and currently I
> have no users on the system.  I am running redhat 6.2. All my qmail
> daemons are up but as stated I have sometimes 10 qmail-start
> ./Maildir/ splogger running.  My messages file states:
> 958703323.6511621 alert: cannot start: qmail-send is already running
> This messages is repeatedly being written to /var/log/messages.
> 
> My /var/qmail/rc script is the followin:
> #!/bin/sh
> 
> exec env - $PATH="/var/qmail/bin:$PATH"\
> qmail-start ./Maildir/ splogger qmail \
> tcpserver 0 110 /var/qmail/bin/qmail-popup mail.foo.com \
> /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir &

Hmm, looks like 2 scripts concatenated...  
Where did *that* come from?

You need something different if you want to run qmail under
daemontools.  E.g. the scripts from
<http://Web.InfoAve.Net/~dsill/lwq.html> under section 2.8

You should end up with 2 or 3 qmail related services running 
under supervise:

1. qmail-send
2. qmail-smtpd
3. qmail-pop3d (optional)

HTH
-- 
Manfred





how can I start qmail automatically on FreeBSD boot
using daemontools and svscan script like this one:
#!/bin/sh
cd /service && /usr/local/bin/svscan & && echo ' svscan'

it run normally when I run it after boot-up process but error 
(qmail didn't start) when I use it for boot-up....
how can I fix it...???






> Arisandy Arief:

> how can I start qmail automatically on FreeBSD boot
> using daemontools and svscan script like this one:

i have /etc/rc.local:
#!/bin/sh
PATH="/var/qmail/bin:/var/bin:$PATH"; export PATH

...

cd /service
echo -n "supervisor scanning services... "
if [ -x /var/bin/svscan -a -d /service ]; then
        /var/bin/svscan /service &
        if [ $? = 0 ]; then
                echo "OK " $!
        else
                echo "NOT OK " $!
        fi
fi
...

and /service/qmail-send/run:
#!/bin/rc
exec nice qmail-start ./Maildir/ >[2=1]

and /service/qmail-smtpd/run:
#!/bin/sh
#QMAILDUID=`id -u qmaild`     # made those two literals to save time
#NOFILESGID=`id -g qmaild`
exec /var/bin/softlimit -m 800000 \
/var/bin/tcpserver -c3 -x/etc/tcp.smtp.cdb -u58 -g99 0 smtp \
        /var/qmail/bin/qmail-smtpd 2>&1

and /service/qmail-send/log/run:
#!/bin/rc
exec setuidgid qmaill multilog t s20000 n2 '-* * msg *' ./

and /service/qmail-smtpd/log/run:
#!/bin/sh
exec setuidgid qmaill multilog t s20000 n2 ./

-- 
clemens                                              [EMAIL PROTECTED]
        do                                              D4685B884894C483
        gpg recv-key 0x9
        echo `gpg list-key 0x9 | cat -tv` | \
        gpg encrypt `gpg list-key 0x9 | 822address` | \
        mail -s your-key `gpg list-key 0x9 | 822address`
        wait
        [encrypted] return mail.
        no return mail within a week, you in trouble.
        no return mail after a month, i in trouble.
        please check
        done





-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Date:    Fri, 19 May 2000 18:23:54 CDT
> To:      Kai MacTane <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> From:    Troy Frericks <[EMAIL PROTECTED]>
> Subject: Re: I want to leave this list
> 
> At 01:19 PM 5/19/00 , Kai MacTane wrote:
> >At 5/19/2000 10:44 AM -0700, [EMAIL PROTECTED] wrote or quoted:
> >
> >>Here's another. WHy not have all the list email sent out with a reply
> >>address that is the unsubscribe address. That way, a reply to the email
> >>automatically goes to the unsubscribe address and only those smart enough
> >>to change the reply address get to send back to the list?
> >
> >Oooooh, sneaky! I kind of like it, actually. :)
> >
> 
> I like it too!
> #

One problem: temporary bounce messages, misconfigured vacation
programs, etc.  Periodically I get a message from the qmail list
manager software that I have bounced (although I believe it is just
temporary failure messages) a few messages (due to service provider
problems).  This would now cause me to become unsubscribed every
couple of months.

Brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5Jn/ohVyYyj3CTLMRArtKAKCJY3rJo9aXnwEByBYErIXnOYZ8WACg0yKY
2dHBq/X9yImf9s/7NPpwMFY=
=0I2B
-----END PGP SIGNATURE-----




[EMAIL PROTECTED] wrote:
> 
>>>At 5/19/2000 10:44 AM -0700, [EMAIL PROTECTED] wrote or quoted:
>>>
>>>> ...Why not have all the list email sent out with a reply address
>>>> that is the unsubscribe address. That way, a reply to the email
>>>> automatically goes to the unsubscribe address...
> 
> One problem: temporary bounce messages, misconfigured vacation
> programs, etc.

That's not a problem at all. Bounce messages don't go to the reply
address, they go to the envelope sender.

ezmlm takes advantage of that. It gives each recipient a different
envelope sender. Then each bounce can be traced to a subscriber
address. When messages bounce, ezmlm notes which messages you've
missed, and every so often it tells you about them. If direct emails
to you also bounce, for long enough, then you are unsubscribed.

Clever, eh? That's called VERP, and Dan invented it. You can read about
it at <http://cr.yp.to/proto/verp.txt>.

Len.

--
Frugal Tip #53:
Convince the authorities that you are the mysterious Baron Von Oklahoma,
rightful heir to all of Tulsavania.




"Bro. Len Budney" <[EMAIL PROTECTED]> writes:
> That's not a problem at all. Bounce messages don't go to the reply
> address, they go to the envelope sender.

Unfortunately, even with the magic of VERP, there are some systems out
there that are just so broken they bounce back to Reply-To: headers,
or From: headers, or even Sender: headers. It's quite sad.

(Talking of bounces, does anyone know of any efforts to track service
quality of popular mail services? I'm thinking here of measurement of
average time in queue for popular destinations, together with tracking
outages? Some of our mailing lists regularly have large amounts of
mail stacked up for yahoo.com, and we're always getting strange
bounces from hotmail.com - as well as the usual 'mail box full'
rubbish. It seems like something that would be worth measuring and
recording.)

James.




On Thu, 18 May 2000, Peter Schuller wrote:

> (ezmlm ML archive is down, and I find no mention of where the list is
> located so I cannot subscribe to it or send to it; hence I am asking here)
> 
> Hello,
> 
> I want to make an ezmlm managed mailinglist moderated (it's an announce
> list). It is stated in the ezmlm manual that ezmlm-make -em can be used to
> make a list moderated; however, "-e", "-m", "-r" and "-s" (all mentioned in
> the manual) are not supported by ezmlm on my system.
> 
> Has the procedure for making a list moderated changed? What is the correct
> procedure?

Are you using ezmlm or ezmlm-idx?  I think this is a feature of ezmlm-idx
only.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org





I'm trying to build an RPM for myself so when I do upgrades and such to my
system I can just install the RPM and make life easy on myself.  My
question has to do with conf-spawn.  In Bruce's RPM, it uses this to
define the conf-spawn value:

fds=`ulimit -n`
# let spawnlimit='(fds-6)/2'
echo $spawnlimit >conf-spawn

On my system, this gives me a value of (1024-6)/2 or a value of 509.  In
the conf-spawn file that comes with qmail it defaults to 120 and says it
can't be set about 255, so the value that comes out of Bruce's RPM is way
too high...  I fixed this by dividing it by 4, so the end result is 254,
but now I'm not sure if this is a good value to be putting in
there.  Ideally I'd like to be able to hand the source of this RPM out to
a few friends so they can use it with little to no modification.

What would be a good average value for the silent concurrency limit and is
there a better way to figure it out on a system-by-system basis?  Or
should I just leave it at 120 or "hard-code" a different limit (ie. should
I make it 150 or 160 or what would be appropriate for a Linux system
running on a pentium class or higher machine?).

Thanks for any light you can shed on this.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org





also sprach vdanen:
> I'm trying to build an RPM for myself so when I do upgrades and such to my
> system I can just install the RPM and make life easy on myself.  My
> question has to do with conf-spawn.  In Bruce's RPM, it uses this to
> define the conf-spawn value:
> 
> fds=`ulimit -n`
> # let spawnlimit='(fds-6)/2'
> echo $spawnlimit >conf-spawn
> 
> On my system, this gives me a value of (1024-6)/2 or a value of 509.  In
> the conf-spawn file that comes with qmail it defaults to 120 and says it
> can't be set about 255, so the value that comes out of Bruce's RPM is way
> too high...  I fixed this by dividing it by 4, so the end result is 254,
> but now I'm not sure if this is a good value to be putting in
> there.  Ideally I'd like to be able to hand the source of this RPM out to
> a few friends so they can use it with little to no modification.

To get >255 concurrency limits, you also need the SuSE patch to do this. It
should be somewhere on the qmail home page--<http://www.qmail.org>.

/pg
-- 
Peter Green
Gospel Communications Network, SysAdmin
[EMAIL PROTECTED]




On Sat, 20 May 2000, Peter Green wrote:

> > On my system, this gives me a value of (1024-6)/2 or a value of 509.  In
> > the conf-spawn file that comes with qmail it defaults to 120 and says it
> > can't be set about 255, so the value that comes out of Bruce's RPM is way
> > too high...  I fixed this by dividing it by 4, so the end result is 254,
> > but now I'm not sure if this is a good value to be putting in
> > there.  Ideally I'd like to be able to hand the source of this RPM out to
> > a few friends so they can use it with little to no modification.
> 
> To get >255 concurrency limits, you also need the SuSE patch to do this. It
> should be somewhere on the qmail home page--<http://www.qmail.org>.

That's the big-concurrency.patch, right?

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org





> Vincent Danen:

> What would be a good average value for the silent concurrency limit and is
> there a better way to figure it out on a system-by-system basis?  Or

note that the concurrency-limit for either local or remote delivery
actually means the number of processes running concurrently to deliver
mail, synchronized by qmail with fifos.  each process gets it's own memory
map with it's own stack and process control structures, and in most systems
identical program invocations get to run their own copy of the program
text.  i don't think it makes sense to let more than 20 copies of qmail-
spawn|local|remote run at a time, unless you count your ram-megabytes by
the hundred and have more than one cpu on a very fast bus.  take my trusty
'386/8/162:  if any two processes are in the run queue, i can go out,
get addicted to heroin and come back to repair what's left of my family
just to watch my shell prompt again.  and, even more seriously, if the
computer yuo want to install qmail on is an old leftover with not much to
do any more, you should not let it run more than 10 processes.  at least,
that's what my machine can handle.

> should I just leave it at 120 or "hard-code" a different limit (ie. should
> I make it 150 or 160 or what would be appropriate for a Linux system
> running on a pentium class or higher machine?).

pentium:  good.  ext2fs:  slow if many files are in a directory, which is
the typical situation for a mail server.  no more then 30.

-- 
clemens                                              [EMAIL PROTECTED]
        do                                              D4685B884894C483




also sprach ino-waiting:
> > Vincent Danen:
> 
> > What would be a good average value for the silent concurrency limit and is
> > there a better way to figure it out on a system-by-system basis?  Or
> 
> note that the concurrency-limit for either local or remote delivery
> actually means the number of processes running concurrently to deliver
> mail, synchronized by qmail with fifos.  each process gets it's own memory
> map with it's own stack and process control structures, and in most systems
> identical program invocations get to run their own copy of the program
> text.  i don't think it makes sense to let more than 20 copies of qmail-
> spawn|local|remote run at a time, unless you count your ram-megabytes by
> the hundred and have more than one cpu on a very fast bus.

Just for reference, I've got a K6-2/333, 384MB RAM, SCSI drives, Linux w/
ext2fs.

> > should I just leave it at 120 or "hard-code" a different limit (ie. should
> > I make it 150 or 160 or what would be appropriate for a Linux system
> > running on a pentium class or higher machine?).
> 
> pentium:  good.  ext2fs:  slow if many files are in a directory, which is
> the typical situation for a mail server.  no more then 30.

This is silly. I've got our concurrencyremote set to 180 and the machine
just hums along. If it weren't also our primary nameserver and if it weren't
running apache, I might bump it up higher. Granted this isn't a 386 or
whatnot, but your statement of running 30 concurrent processes on a
pentium-class machine doesn't fly.

FYI, I've got another "throwaway" dual P90 EISA (!) machine with the
concurrency* set at 90. No problems whatsoever.

/pg
-- 
Peter Green
Gospel Communications Network, SysAdmin
[EMAIL PROTECTED]




clemensF <[EMAIL PROTECTED]> writes on 21 May 2000 at 02:28:35 +0200
 > > Vincent Danen:
 > 
 > > What would be a good average value for the silent concurrency limit and is
 > > there a better way to figure it out on a system-by-system basis?  Or
 > 
 > note that the concurrency-limit for either local or remote delivery
 > actually means the number of processes running concurrently to deliver
 > mail, synchronized by qmail with fifos.  each process gets it's own memory
 > map with it's own stack and process control structures, and in most systems
 > identical program invocations get to run their own copy of the program
 > text.  

I don't believe this last bit is the case.  It's clearly not the case
on Linux, anyway, as displayed by the various size numbers in 'top'. 
-- 
Photos: http://dd-b.lighthunters.net/ Minicon: http://www.mnstf.org/minicon
Bookworms: http://ouroboros.demesne.com/ SF: http://www.dd-b.net/dd-b 
David Dyer-Bennet / Welcome to the future! / [EMAIL PROTECTED]




> Peter Green:

> Just for reference, I've got a K6-2/333, 384MB RAM, SCSI drives, Linux w/
> ext2fs.

with this amount of ram you can do what you want with qmail.  my machine
swaps a lot for lack of ram, thats why execing is expensive here.

-- 
clemens                                              [EMAIL PROTECTED]




> David Dyer-Bennet:

>  > identical program invocations get to run their own copy of the program
>  > text.  
> 
> I don't believe this last bit is the case.  It's clearly not the case
> on Linux, anyway, as displayed by the various size numbers in 'top'. 

but linux processes don't share one copy of, say, top, when it is called
twice by different users, do they?

-- 
clemens                                              [EMAIL PROTECTED]




Thus said Lindsay Haisley on Fri, 19 May 2000 02:00:03 CDT:

> A bare line feed is considered 'obsolete syntax' as defined subsequently in
> section 4.1, 'Miscellaneous obsolete tokens'.  Please note from the above
> that while compliance with this draft requires that originating MTAs or
> MUAs must NOT generate such syntax, it is required of conformant receivers
> that such syntax be accepted and properly parsed.

I am coming a bit late on this, however, I believe that qmail is doing 
the appropriate thing.  In the draft, it merely states that it must be 
received and parsed, which I believe is being done.  It is being parsed 
enough to determine that it is invalid.  I don't believe that the 
author meant that receive == queued so it is being parsed as per the 
draft and then rejected because it the receiving email is 
non-conformant.

Andy
-- 
uptime:
 10:42am  up 18 days, 19:59,  2 users,  load average: 1.79, 1.60, 1.42






Clemens,

> first of:  if you want timestamps then integrate the last two lines from
> >                 | $setuidgid qmaill $tai64n 2>&1 \
> >                 | $setuidgid qmaill $multilog /var/log/pop3d &
> 
> to
>                   | $setuidgid qmaill $multilog t /var/log/pop3d &

Thanks for pointing this out!  Should have noticed this.  It's pointed
out at http://cr.yp.to/daemontools/multilog.html!

> also, if you tell qmail-pop3d to output stderr on the stdout stream with
> the term "2>&1", telnet will give you error messages from pop3d too.  if
> you leave out this term, you get separate output and error streams.

I am afraid that I would disagree with the above statements. After
some more tinkering last night (what a wonderful way of killing a nice
Friday evening!), I have come to the conclusion that tcpserver must be
doing something that might be affecting IO redirection of qmail-pop3d.

If you take out the 2>&1, your tcpserver will write its info msgs to
console.  In addition, the qmail-pop3d will still spit its output to
STDERR to POP clients.  Please try it and you will see for yourself.
I just did (again, did once last night already).

I will review both the src of both tcpserver and perhaps qmail-popup
in this weekend, and see if I can catch the cause.

In a follow up to my previous post, Russ Allbury
([EMAIL PROTECTED]) mentioned that QUALCOMM's qpoper does
the kind of logging I am looking for.  I took a look of qpoper's src,
and immediately consider it a can of worms :> To me, qmail-pop3d is
much compact and cleaner. I will patch it so it does logging that
betters qpopper.

Thanks for your feedback.

Regards,

Chin Fang
[EMAIL PROTECTED]

> -- 
> clemens                                              [EMAIL PROTECTED]
> 




Louis,

> This can be fixed without any patching.  The problem is with the way
> qmail-popup sets up the file descriptors.  Here's my run file for pop3
> service:
> 
>   #!/bin/sh
>   PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/bin/qtools
>   # this is ugly, but qmail-popup breaks things a bit. --L
>   exec 8>&1 
>   exec env -  PATH=$PATH softlimit -m 2000000 \
>     tcpserver -Rlyossarian.americas.nokia.com yossarian.americas.nokia.com 110 \
>     qmail-popup yossarian.americas.nokia.com stderrto /dev/fd/8 ckpw qmail-pop3d 
>./Maildir 2>&1

Thanks for the tip.  I wish I got your note earlier.

In the past two hours, I was reading qmail-popup.c and thus found out
the underlined line below was doing something unusual:

     void doanddie(user,userlen,pass)
     char *user;
     unsigned int userlen; /* including 0 byte */
     char *pass;
     {
       int child;
       int wstat;
       int pi[2];
 
       if (fd_copy(2,1) == -1) die_pipe();
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Once deleted, I could get *some* :( stuff written by qmail-pop3d to
STDERR logged via multilog, rather than spitted out to POP clients.
The reason I said *some* is because I am stuck again.  The 2nd
strerr_warn1 in the attached patch below (WARNING! unfinished) simply
stays silent. The first one prints its msg correctly.  I have been
looking up and down the src to see what I did wrong, but so far can't
spot anything (yet).

> 
> where stderrto is a small program that opens its first argument for
> writing on fd 2 and execs the rest of its arguments[1].  In
> retrospect, patching qmail-popup might have been a better idea.
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please see above.  I don't know whether it's the right thing to do or
not at this moment.  Somehow it just "partially" works - for the first
strerr_warn1 anyways.

Regards,

Chin Fang
[EMAIL PROTECTED]

> 
> 
> ^L
> 
> [1] Incidentally, there's a program in an old daemontools distribution
> that does exactly the same thing, which I only realized after I wrote
> mine.  You can get the same effect with something like:
> 
>   sh -c 'exec ckpw qmail-pop3d 8>&2'
> 
> (untested)
---------------- unfinished qmail-pop3d download logging patch -----------

*** qmail-pop3d.c.orig  Sat May 20 14:47:32 2000
--- qmail-pop3d.c       Sat May 20 14:36:16 2000
***************
*** 16,22 ****
--- 16,25 ----
  #include "readwrite.h"
  #include "timeoutread.h"
  #include "timeoutwrite.h"
+ #include "strerr.h"
  
+ unsigned long bytesread = 0;
+ 
  void die() { _exit(0); }
  
  int saferead(fd,buf,len) int fd; char *buf; int len;
***************
*** 99,111 ****
      if (!line.len)
        inheaders = 0;
      else
!       if (line.s[0] == '.')
          put(".",1);
      put(line.s,line.len);
      put("\r\n",2);
      if (!match) break;
    }
    put("\r\n.\r\n",5);
    flush();
  }
  
--- 102,119 ----
      if (!line.len)
        inheaders = 0;
      else
!       if (line.s[0] == '.') {
          put(".",1);
+       bytesread++; /* even one byte counts :> */
+       }
      put(line.s,line.len);
      put("\r\n",2);
+     bytesread += line.len;
+     bytesread += 2;
      if (!match) break;
    }
    put("\r\n.\r\n",5);
+   bytesread += 5;
    flush();
  }
  
***************
*** 298,305 ****
    if (chdir(argv[1]) == -1) die_nomaildir();
   
    getlist();
! 
    okay();
    commands(&ssin,pop3commands);
    die();
  }
--- 306,314 ----
    if (chdir(argv[1]) == -1) die_nomaildir();
   
    getlist();
!   strerr_warn1("getlist done",0);
    okay();
    commands(&ssin,pop3commands);
+   strerr_warn1("Ready to exit",0);
    die();
  }




[EMAIL PROTECTED] (Chin Fang) writes:

> In the past two hours, I was reading qmail-popup.c and thus found out
> the underlined line below was doing something unusual:

It is the behavior documented in the man page, though I'm not really
sure why it's written that way.

> Once deleted, I could get *some* :( stuff written by qmail-pop3d to
> STDERR logged via multilog, rather than spitted out to POP clients.
> The reason I said *some* is because I am stuck again.  The 2nd
> strerr_warn1 in the attached patch below (WARNING! unfinished) simply
> stays silent. The first one prints its msg correctly.  I have been
> looking up and down the src to see what I did wrong, but so far can't
> spot anything (yet).

There's no obvious reason why both calls to strerr_warn1() shouldn't
print, and it's hard to guess without more detailed information.  The
relevant portion of a trace along with your run file and the uname -a
of your system would be useful.

  [ I wrote ]
> > where stderrto is a small program that opens its first argument for
> > writing on fd 2 and execs the rest of its arguments[1].  In
> > retrospect, patching qmail-popup might have been a better idea.
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I just tried this, along with my own version of the patch you're
writing, and things works as expected on my machine.  (Yes, this is
extremely weak assurance. :)

The diffs to qmail-pop3d.c and qmail-popup.c are appended to this
message.


^L

-- 
Louis Theran
Nokia Research Center
(Not speaking for Nokia)


Patch to change the way qmail-popup treats stderr:

*** qmail-popup.c.orig  Sat May 20 20:03:27 2000
--- qmail-popup.c       Sat May 20 20:04:07 2000
***************
*** 88,94 ****
    int wstat;
    int pi[2];
   
-   if (fd_copy(2,1) == -1) die_pipe();
    close(3);
    if (pipe(pi) == -1) die_pipe();
    if (pi[0] != 3) die_pipe();
--- 88,93 ----


Patch to make qmail-pop3d log the number of bytes slurped in RETR
commands:

*** qmail-pop3d.c.orig  Sat May 20 19:54:14 2000
--- qmail-pop3d.c       Sat May 20 20:00:50 2000
***************
*** 17,22 ****
--- 17,37 ----
  #include "timeoutread.h"
  #include "timeoutwrite.h"
  
+ #include "strerr.h"
+ 
+ /* @@@ patched to log the number of bytes per connection. 
+  * 
+  * A simple patch to make qmail-pop3d emit log lines of the form:
+  *
+  *   qmail-pop3d <pid>: <nbytes> message bytes read
+  *
+  * to stderr, which is assumed to be pointed at multilog
+  *
+  * DON'T BLINDLY ASSUME THIS WORKS, it has undergone only cursory testing
+  * 
+  * --Louis Theran, 2000-05-20
+  */
+ 
  void die() { _exit(0); }
  
  int saferead(fd,buf,len) int fd; char *buf; int len;
***************
*** 35,40 ****
--- 50,79 ----
    return r;
  }
  
+ /* @@@ keep track of how many bytes we slurp from messages in pop3_top() */
+ static unsigned long msgbytesread = 0;
+ 
+ static int counted_read(fd,buf,len) int fd; char *buf; int len;
+ {
+   int rv;
+ 
+   rv = read(fd,buf,len);
+   if (rv > 0) msgbytesread += rv;
+   return rv;
+ }
+ 
+ /* @@@ generating log messages */
+ char msgbytes_str[FMT_ULONG];
+ char pid_str[FMT_ULONG];
+ 
+ static void log_bytes() 
+ {
+   msgbytes_str[fmt_ulong(msgbytes_str,msgbytesread)] = 0;
+   pid_str[fmt_uint(pid_str,getpid())] = 0;
+ 
+   strerr_warn5("qmail-pop3d ",pid_str,": ",msgbytes_str," message bytes read",0);
+ }
+ 
  char ssoutbuf[1024];
  substdio ssout = SUBSTDIO_FDBUF(safewrite,1,ssoutbuf,sizeof ssoutbuf);
  
***************
*** 193,198 ****
--- 232,238 ----
        rename(m[i].fn,line.s); /* if it fails, bummer */
        }
    okay();
+   log_bytes();
    die();
  }
  
***************
*** 268,274 ****
    fd = open_read(m[i].fn);
    if (fd == -1) { err_nosuch(); return; }
    okay();
!   substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf));
    blast(&ssmsg,limit);
    close(fd);
  }
--- 308,314 ----
    fd = open_read(m[i].fn);
    if (fd == -1) { err_nosuch(); return; }
    okay();
!   substdio_fdbuf(&ssmsg,counted_read,fd,ssmsgbuf,sizeof(ssmsgbuf));
    blast(&ssmsg,limit);
    close(fd);
  }






> Chin Fang:

> If you take out the 2>&1, your tcpserver will write its info msgs to
> console.  In addition, the qmail-pop3d will still spit its output to
> STDERR to POP clients.  Please try it and you will see for yourself.
> I just did (again, did once last night already).

i am very sorry that id did not work out.  i don't run popd myself, but i
thought the shell redirection was the culprit.  but i urge you to follow
this mailinglists discussions on the pop daemon, because several people are
already working on this.


-- 
clemens                                              [EMAIL PROTECTED]
        do                                              D4685B884894C483




Louis,

> It is the behavior documented in the man page, though I'm not really
> sure why it's written that way.

I am hoping Dr. Dan Bernstein could shed some lights on this issue.
No. I couldn't figure it out either.

> There's no obvious reason why both calls to strerr_warn1() shouldn't
> print, and it's hard to guess without more detailed information.  The
> relevant portion of a trace along with your run file and the uname -a
> of your system would be useful.

I will try again tomorrow. got interrupted in the afternoon by some
other things.  I am doing my development and testing on a SUN SS5 170
Mhz with 128 MB RAM running Solaris 7; uname -a yields:
 
SunOS mikey 5.7 Generic_106541-10 sun4m sparc SUNW,SPARCstation-5

GCC 2.95.2 is used for compilation.

[...]

> I just tried this, along with my own version of the patch you're
> writing, and things works as expected on my machine.  (Yes, this is
> extremely weak assurance. :)

I will test your version tomorrow on my development machine as well.

> The diffs to qmail-pop3d.c and qmail-popup.c are appended to this
> message.

[diffs saved].

I have some other ideas that I will implement once the logging to
multilog issue is resolved completely.  Thanks for the fruitful
exchanges so far.

Best Regards,

Chin Fang
[EMAIL PROTECTED]




What email client are you running?  Most clients (Netscape, Outlook, Kmail)
allow you to specify your email address.  


On Fri, 19 May 2000, kapil sharma wrote:
> Hi,
> I am having some strange problem. When ever I am sending mail from local
> to local
> user then it is adding the domain name for 2 time in from address:
> for example: If i will send  a mail from" [EMAIL PROTECTED]" to "[EMAIL PROTECTED]"
> then
> "[EMAIL PROTECTED]" will get a mail with from address as "[EMAIL PROTECTED]@foo.com".
> Please
> help?
> 
> kapil
-- 
http://www.matzelle.net





    I'm running Qmail with Vpopmail from inter7.com  and I'd like to know
how I would forward one e-mail address to mutiple people.  For example
messgaes sent to [EMAIL PROTECTED] are sent to [EMAIL PROTECTED], [EMAIL PROTECTED] and
[EMAIL PROTECTED]  Probably an easy question but I'm just not getting it...

    Thanks in advance,
    Daniel Daley
    [EMAIL PROTECTED]





Hi,

Don't know if this is appropriate for the list, but here goes:

Has anybody successfully installed the scan4virus package with qmail 1.03 on
a FreebSD 4.0 system?

I'm trying to run the setup script that comes with the scan4virus package
and I get the following error:

"Whoa there!

It appears the perl installed on your system does not support setuid
correctly.

I attempted to run a test setuid script as user "qmailq" - and it ran as
user
"root" instead!

As such you will not be able to use this program until that condition is
corrected.

See your Vendor/whatever for details..."

I know next to nothing about Perl, so I'm kinda stumped. Has anybody run
into this problem? If so, what did you do to fix it?

Thanks,
-Martin







Rick,

I looked in /var/qmail/queue/mess/ and found a message left lying around
that looked like it was never going to be deleted by qmail-clean. I manually
rm'ed the document in question and now qmail-qstat and qmail-qread are now
reporting the same thing.

-Martin

----- Original Message -----
From: "Rick Myers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 19, 2000 22:56
Subject: Re: PROB. SOLVED -- qmail-qstat and qmaill-qread differences...


> On May 19, 2000 at 20:40:26 -0400, Martin Gignac twiddled the keys to say:
> > Think I've figured out what was wrong. Read about queue-cleaning in the
> > INTERNALS document that comes with qmail and I believe the problem is
that a
> > big email got stuck at the beginning of the queue while I was shutting
down
> > the system (I didn't leave time for qmail-send to exit properly). I
guess
> > preprocessing on the message never finished. According to INTERNALS, it
> > should be cleaned up automatically within 36 hours.
>
> I don't normally reply here, but since noone else has.... :)
>
> I have a qmail-check script that runs qmail-qstat and qmail-qread and
> mails it to me. It's always reported one more mail in the queue than was
> actually there. For years I thought it was just because I opened the
> pipe to qmail-inject before running the other programs. I just never
> looked back to see.
>
> Looking back now, that's not the case. While I have have no idea why
> qmail-qstat reports one more than actual, I don't find it any sort of
> bother. I've never experienced any sort of woe due to it, nor do I
> expect to.
>
> Rick Myers                            [EMAIL PROTECTED]
> ----------------------------------------------------
> The Feynman Problem       1) Write down the problem.
> Solving Algorithm         2) Think real hard.
>                           3) Write down the answer.
>





On May 20, 2000 at 22:41:37 -0400, Martin Gignac twiddled the keys to say:
> 
> I looked in /var/qmail/queue/mess/ and found a message left lying around
> that looked like it was never going to be deleted by qmail-clean. I manually
> rm'ed the document in question and now qmail-qstat and qmail-qread are now
> reporting the same thing.

That's not the same thing I'm seeing then. When I run qmail-qstat from
the command line with an empty queue it reports 0 messages. When I run
my little qmail-check script, either from cron or command line, and
again with an empty queue, it always shows one message. The accompanying
qmail-qread results do not show any messages though.

Oh well, I guess I'll chock it up to something boneheaded in my script
and get around to fixing it one day.

Rick Myers                            [EMAIL PROTECTED]
----------------------------------------------------
The Feynman Problem       1) Write down the problem.
Solving Algorithm         2) Think real hard.
                          3) Write down the answer.




I've had a message sitting in a /var/qmail/queue/mess/* directory for more
than two days now and it hasn't been cleaned out. I though the INTERNALS
document stated that qmail-clean will automatically delete any message in
state S2 or S3 that's older than 36 hours.

Am I missing something, or is my qmail-clean not working 'as per specs'?

-Martin



Reply via email to