From owner-freebsd-isp Mon Aug 26 13:16:23 1996 Return-Path: owner-isp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA12753 for isp-outgoing; Mon, 26 Aug 1996 13:16:23 -0700 (PDT) Received: from mail.think.com (Mail1.Think.COM [131.239.33.245]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA12740 for ; Mon, 26 Aug 1996 13:16:19 -0700 (PDT) Received: from Early-Bird.Think.COM (Early-Bird-1.Think.COM [131.239.146.105]) by mail.think.com (8.7.5/m3) with ESMTP id QAA04356; Mon, 26 Aug 1996 16:16:07 -0400 (EDT) Received: from compound.Think.COM (fergus-26.dialup.prtel.com [206.10.99.157]) by Early-Bird.Think.COM (8.7.5/e1) with ESMTP id QAA05732; Mon, 26 Aug 1996 16:16:03 -0400 (EDT) Received: (from alk@localhost) by compound.Think.COM (8.7.5/8.7.3) id PAA11717; Mon, 26 Aug 1996 15:17:23 -0500 (CDT) Date: Mon, 26 Aug 1996 15:17:23 -0500 (CDT) From: Tony Kimball Message-Id: <199608262017.PAA11717@compound.Think.COM> To: sckhoo@asiapac.net Cc: alk@think.com, xiyuan@npc.haplink.co.cn, freebsd-isp@freebsd.org Subject: Re: mail storage References: <199608250325.LAA05771@gandalf.asiapac.net> Sender: owner-isp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Quoth Swee-Chuan Khoo on Sun, 25 August: : : >>Why not just write a tiny little inetd service to run : >>sendmail -q when you get a packet from their server? : : okay, regarding the perl hack, i need some help on this. Here, make it *really* easy, add this to /etc/aliases and run newaliases: sendmail: "| /usr/local/bin/sendmail -q" then when the client goes online they use a command-line mail agent to send an empty message to sendmail@your.server. Here's one in perl -- just change the #! for NT and the "localhost" for the client addr. #!/usr/bin/perl ($name,$aliases,$proto) = getprotobyname('tcp'); ($name,$aliases,$type,$len,$thataddr) = gethostbyname('localhost'); socket(S, 2, 1, $proto) || die $!; connect(S,pack('S n a4 x8', 2, 25, $thataddr)) || die "connect: $!"; select(S); $| = 1; select(STDOUT); chop($date = `date`); chop($hostname = `hostname`); print S "helo $hostname\n" || die $!; print S "mail from: smagent@$hostname\n" || die $!; print S "rcpt to: alk\n" || die $!; print S "data\nRequest spool at $date\n.\n" || $!; print S "quit\n" || die $!; close(S) || die $!; print "done\n"; exit(0);