From owner-freebsd-questions Tue Aug 28 10:57:26 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.ipsnetwork.net (mail.ipsnetwork.net [209.202.83.5]) by hub.freebsd.org (Postfix) with ESMTP id 4AD1437B409 for ; Tue, 28 Aug 2001 10:57:17 -0700 (PDT) (envelope-from nvidican@ipsnetwork.net) Received: (from apache@localhost) by mail.ipsnetwork.net (8.11.1/8.11.1) id f7SI6l771391; Tue, 28 Aug 2001 14:06:47 -0400 (EDT) (envelope-from nvidican@ipsnetwork.net) Date: Tue, 28 Aug 2001 14:06:47 -0400 (EDT) Message-Id: <200108281806.f7SI6l771391@mail.ipsnetwork.net> From: "Nathan Vidican" To: questions@freebsd.org Reply-To: nathan@vidican.com Subject: OT: Any ideas on how to count emails from a remote machine? X-Mailer: NeoMail 1.24 X-IPAddress: 209.202.83.98 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Does anyone have any ideas on how one could count the amount of emails a specific user may have; in a case where the reporting script, (CGI program; mostly written in Perl), is on a different machine than that of the user's actual email? Basically I need the script to report '3 new emails' for user 'xyz'. It will be used as a link to the web-based email system which is located on the actual mailserver itself. The system is a web portal type application, which uses essentially the same userbase as that of the mailserver; yet runs from the webserver. I thought about just using an suid root script to check a given user's mail spool for the number of occurances wherein a line starts with "From:", that way I could give the total count of emails in a given user's mail spool. I'm just not sure how to get that number back to the portal which runs on a different server. Both servers share a common NFS mount, (which also happens to be on a third server), so I thought maybe some sort of logfile-type process might work. The problem with that being that the logfile would have to be updated to match the information in the mailspool. I figured before I go and try to re-invent the wheel on this one that I might ask around and see if anyone's done anything similar? -- Nathan Vidican Nathan@Vidican.com http://Nathan.Vidican.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message