From owner-freebsd-questions@FreeBSD.ORG Wed Apr 6 13:28:34 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 5413116A4CE for ; Wed, 6 Apr 2005 13:28:34 +0000 (GMT) Received: from web54003.mail.yahoo.com (web54003.mail.yahoo.com [206.190.36.227]) by mx1.FreeBSD.org (Postfix) with SMTP id C311343D49 for ; Wed, 6 Apr 2005 13:28:33 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: (qmail 87944 invoked by uid 60001); 6 Apr 2005 13:28:33 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=A43V70OfAROj0wBafks85tjq++Sghw1VM/zl84F/yLFmyo3886BN7uNe/tU/jYKptZp2FIew32xSWXMpuB7AuF0Bqie9tejubv6qQJma7hLWNmlMRXVmOLh73B6obpYxX1Puf4E1CP7+UorTXBCYzFEzaRKRYByrR1tsM3325Vk= ; Message-ID: <20050406132833.87942.qmail@web54003.mail.yahoo.com> Received: from [147.46.44.181] by web54003.mail.yahoo.com via HTTP; Wed, 06 Apr 2005 06:28:32 PDT Date: Wed, 6 Apr 2005 06:28:32 -0700 (PDT) From: Rob To: FreeBSD questions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Procmail: how to deliver email over an ssh-tunnel to my smtp server. 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: Wed, 06 Apr 2005 13:28:34 -0000 Rob wrote: > Hello, > > I'm having 4.11 and 5.3 FreeBSD PCs. > > All incoming email arrives through fetchmail (using > imap protocol). > > I then filter all email with procmail, which is > configured such that it > trashes spam, or > delivers to local mailbox, or > forwards to another external address. > > For external delivery, I have set up an ssh tunnel > to my smtp server: > > ssh -N -f -L 2525:localhost:25 smtp.server.it > > What do I have to do next, to have the delivery > work properly? > > Can I tell procmail to push the email directly onto > the port 2525 of the ssh tunnel? > > Or do I have to reconfigure sendmail for this? > (sendmail reconfiguration info looks like a > nightmare to me though....). > > Do I have other options? I'll answer my own question here, just for the record. Use msmtp, which is highly configurable, for example defining its own outgoing port. In the .procmailrc file I only need to add: :0 | /usr/local/bin/msmtp email@address.com to forward the email with msmtp, over my own ssh tunnel port. Works like a charm. Rob. __________________________________ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest