From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 02:04:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D86DB16A417 for ; Thu, 24 Jan 2008 02:04:35 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-out-04.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 61C9C13C447 for ; Thu, 24 Jan 2008 02:04:35 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-av-02.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-04.forthnet.gr (8.13.8/8.13.8) with ESMTP id m0O24VAq032024; Thu, 24 Jan 2008 04:04:31 +0200 Received: from MX-IN-02.forthnet.gr (mx-in-02.forthnet.gr [193.92.150.185]) by mx-av-02.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0O24VgK025071; Thu, 24 Jan 2008 04:04:31 +0200 Received: from kobe.laptop (ppp133-151.adsl.forthnet.gr [62.1.124.151]) by MX-IN-02.forthnet.gr (8.14.2/8.14.2) with ESMTP id m0O24NR2032711; Thu, 24 Jan 2008 04:04:24 +0200 Authentication-Results: MX-IN-02.forthnet.gr smtp.mail=keramida@ceid.upatras.gr; spf=neutral Authentication-Results: MX-IN-02.forthnet.gr header.from=keramida@ceid.upatras.gr; sender-id=neutral Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m0O24Mu4009621; Thu, 24 Jan 2008 04:04:22 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m0O24Ks9009620; Thu, 24 Jan 2008 04:04:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 24 Jan 2008 04:04:20 +0200 From: Giorgos Keramidas To: Agus , Matthew Seaman Message-ID: <20080124020420.GB7150@kobe.laptop> References: <44ir1l4iqq.fsf@be-well.ilk.org> <479778DC.3090803@infracaninophile.co.uk> <44ir1l4iqq.fsf@be-well.ilk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <479778DC.3090803@infracaninophile.co.uk> Cc: Lowell Gilbert , freebsd-questions Subject: Re: Sendmail local only..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 02:04:36 -0000 On 2008-01-23 13:44, Agus wrote: >> Giorgos, question...is it needed to put the >> sendmail_submit_enable="YES" >> sendmail_msp_queue_enable="YES" >> Although they are the default ones? > > Maybe i wasnt clear...but with the options you gave me Giorgos i still > can send email from localhost to external servers like hotmail for > instance, through telnet.....I want to disable this, so it can only > send mails to local accounts.... Ah, I misunderstood the original question. My apologies. On 2008-01-23 17:26, Matthew Seaman wrote: > Hmm... It's actually pretty hard to stop an MTA from being able to > send e-mail, given that is what it is designed to do. Hehe, indeed :) > Another approach worth trying would be to use a wildcard mailertable > entry that redirects any mail back to root the local machine: > > > localhost local: > your.host.name local: > . local:root That should work fine :) > or replace the last line with: > > . error:Mail to external sites not allowed That's a great idea to build upon. >From the limited testing I did just now, bounces still go through, so someone may abuse this to post email by setting the sender address to the intended recipient, and posting to random outside mailboxes. The following works too (after setting up a local dev-null alias): localhost local: my.hostname local: . local:dev-null This silently drops email messages, but at least it logs the delivery to the dev-null alias, so there's a trace of the email message even though it won't really get delivered to any user's mailbox and there's no error responce sent to anyone. Jan 24 03:57:09 kobe sendmail[9255]: m0O1ura8009255: from=keramida@kobe, \ size=83, class=0, nrcpts=1, msgid=<200801240156.m0O1ura8009255@kobe.laptop>, \ relay=keramida@localhost Jan 24 03:57:09 kobe sendmail[9255]: m0O1ura8009255: to=keramida@linux.gr, \ ctladdr=keramida@kobe (1000/1000), delay=00:00:16, xdelay=00:00:00, mailer=relay, \ pri=30083, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, \ stat=Sent (m0O1v94R009303 Message accepted for delivery) Jan 24 03:57:09 kobe smtpd[9303]: m0O1v94R009303: from=, \ size=374, class=0, nrcpts=1, msgid=<200801240156.m0O1ura8009255@kobe.laptop>, \ proto=ESMTP, daemon=Daemon0, relay=kobe.laptop [127.0.0.1] Jan 24 03:57:09 kobe smtpd[9307]: m0O1v94R009303: to=/dev/null, \ ctladdr=bit-bucket (26/0), delay=00:00:00, xdelay=00:00:00, mailer=*file*, \ pri=30629, dsn=2.0.0, stat=Sent Setting up a `mail-sink' alias, which traps all outgoing messages this way, may be an easier way to recover the undelivered messages. It fringes on privacy violation, though, so I'm now going to pick one or the other :) - Giorgos