From owner-freebsd-isp Mon Mar 12 22:30:40 2001 Delivered-To: freebsd-isp@freebsd.org Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182]) by hub.freebsd.org (Postfix) with ESMTP id E538F37B718 for ; Mon, 12 Mar 2001 22:30:35 -0800 (PST) (envelope-from dirk.meyer@dinoex.sub.org) Received: from gate.dinoex.sub.org (dinoex@localhost) by net2.dinoex.sub.org (8.11.3/8.11.3) with BSMTP id f2D6U4H15879 for ; Tue, 13 Mar 2001 07:30:04 +0100 (CET) (envelope-from dirk.meyer@dinoex.sub.org) X-MDaemon-Deliver-To: To: freebsd-isp@FreeBSD.ORG Message-ID: From: dirk.meyer@dinoex.sub.org (Dirk Meyer) Organization: privat Subject: Re: SMTP mail interception Date: Tue, 13 Mar 2001 07:24:22 +0100 X-Mailer: Dinoex 1.77 References: <200103130351.f2D3pZI02375@spooky.eis.net.au> X-Gateway: ZCONNECT gate.dinoex.sub.org [UNIX/Connect 0.90] X-Accept-Language: de,en X-PGP-Fingerprint: 44 16 EC 0A D3 3A 4F 28 8A 8A 47 93 F1 CF 2F 12 X-Noad: Please don't send me ad's by mail. I'm bored by this type of mail. X-Copyright: (C) Copyright 1999 by Dirk Meyer -- All rights reserved. X-Note: sending SPAM is a violation of both german and US law and will at least trigger a complaint at your provider's postmaster. X-PGP-Key-Avail: mailto:pgp-public-keys@keys.de.pgp.net Subject:GET 0x331CDA5D X-ZC-VIA: 20010313000000W+1@dinoex.sub.org Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ernie Elu wrote, > Is there anyway of getting sendmail to make an archive copy of all smtp > emails in and out of a FreeBSD server, or do I have to run some other > interception program on port 25? There are diffrent ways to archive this. a) use the sample filer in "libmilter/README" +--------------------------+ | SOURCE FOR SAMPLE FILTER | +--------------------------+ Note that the filter below may not be thread safe on some operating systems. You should check your system man pages for the functions used below to verify the functions are thread safe. /* A trivial filter that logs all email to a file. */ [....] b) define new mailers, for input and oputput (LOCAL/RELAY/SMPTP). There are some shell scrips or C-Programs that can do this. I used one of the "bsmpt/rsmpt" packages to save a mail with the full envelope into a quue. Mostly used for uucp-sites with high traffic. Mbsmtp, P=/usr/bin/bsmtp, F=0, # no MX lookup for destination F=DFMx, # Need Date,From,Message-Id,Full-Name F=m, # Multiple receipients F=u, # Preserve uppercase for username F=S, # Assume specified uid and gid F=n, # Don't use Unix-Style From in header F=C, # Add domainame to all local Users F=X, # Add extra dots in Body (BSMTP) S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP') E=\r\n, M=10000000, T=X-UUCP/X-UUCP/X-Unix, U=uucp:uucp, A=bsmtp -spool /var/spool/bsmtp/$h $f $u kind regards Dirk - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message