From owner-freebsd-questions@FreeBSD.ORG Mon Apr 4 06:46:02 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0953E16A4CE for ; Mon, 4 Apr 2005 06:46:02 +0000 (GMT) Received: from web54005.mail.yahoo.com (web54005.mail.yahoo.com [206.190.36.229]) by mx1.FreeBSD.org (Postfix) with SMTP id 83A9A43D41 for ; Mon, 4 Apr 2005 06:46:01 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: (qmail 48524 invoked by uid 60001); 4 Apr 2005 06:46:01 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=rldcqHh0yjosQBOWDsjzW5qsJ3p6v1U1Wa5I+BQQji7hhG03Y6FzDJ0PQTzdkM4EbJN7cJ3LSoAdOSTp2XF2hLhiIBjkXI5eFrTpCgjnWHXkqGayQ1yV90iu7DyWAlM1dvDSQ6QdslorPNqetVBFJfsGPW1KFo97urH3dpo2ctc= ; Message-ID: <20050404064601.48522.qmail@web54005.mail.yahoo.com> Received: from [147.46.44.181] by web54005.mail.yahoo.com via HTTP; Sun, 03 Apr 2005 23:46:00 PDT Date: Sun, 3 Apr 2005 23:46:00 -0700 (PDT) From: Rob To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: harry@schmalzbauer.de Subject: Re: FreeBSD server behind router-NAT; how to configure sendmail? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2005 06:46:02 -0000 Harald Schmalzbauer wrote: > Am Sonntag, 3. April 2005 17:36 schrieb Rob: >>There is a FAQ, that explains: >> >> If you want all outgoing SMTP connections to use >> port 2525, you can use this in your .mc file: >> >> define(`RELAY_MAILER_ARGS', `TCP $h 2525') >> define(`ESMTP_MAILER_ARGS', `TCP $h 2525') >> >>I have put this in my hostname.mc file, but to no >>avail. I'm probably not familiar enough with >>sendmail way of doing things. But then this is >>such a simple thing, that it should be easy. >> >>I suppose that with "netstat -a", there should be >>a line with port 2525, if above works. But that is >>not there. > > I'm not sure if I understand your problem correctly, > but what you did with these defines is that > sendmail contacts every other system at port 2525 > instead of 25, it's not listening on 2525, hence > you can't see a tcp/2525 with netstat -a. > > But I think it should do what you want, if I > understand your description right. If you want > sendmail to listen at a custom port these defines > are wrong. I don't have them in my mind right now, > I'm sure you'll find the M4 defines at the sendmail > FAQ, tell me if I can help. Uh? So are the rules above right or not? I'm still confused. The header of that particular FAQ was: "How do I send using an alternate port?" and that's what I want, unless my English is badly deteriorating, which I often feel like when reading sendmail manual pages :(. Anyway, let's go back to what I want sendmail to do, which is possibly a little more complicated than just shifting to another outgoing port: 1) for local delivery, i.e. users on the PC, deliver to the local mailboxes (does that need port 25?). 2) for outgoing delivery, do that over an ssh-tunnel port, e.g. over port 2525: ssh -N -f -L 2525:localhost:25 smtp.my.isp I can create the ssh-tunnel easily: telnet localhost 2525 connects me to the remote smtp server. As you may have noticed, I am a very newbie to sendmail configuration. Thanks for your help! Rob. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/