Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Feb 2011 09:56:43 -0500
From:      Paul Chvostek <paul+fbsd@it.ca>
To:        Andy Wodfer <wodfer@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to forward old root mails to an external email address?
Message-ID:  <20110222145643.GA81045@it.ca>
In-Reply-To: <AANLkTikV3qM6yYEdismh6BmyrR3FMXuah66AQwReU9c_@mail.gmail.com>
References:  <AANLkTi=KzYd%2BHpozAGqoTL7a7w0Smvn3=QENbmjzZTeo@mail.gmail.com> <1837CB358903EB8C60F348FA@mac-pro.magehandbook.com> <AANLkTimLMMpwk_jh18rPmh9TLw7aB7=XspNnU8T1P1Ps@mail.gmail.com> <20110219221442.39aacc81@gumby.homeunix.com> <AANLkTikV3qM6yYEdismh6BmyrR3FMXuah66AQwReU9c_@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 19, 2011 at 11:39:38PM +0100, Andy Wodfer wrote:
> On Sat, Feb 19, 2011 at 11:14 PM, RW <rwmaillists@googlemail.com> wrote:
> > On Sat, 19 Feb 2011 22:39:59 +0100
> > Andy Wodfer <wodfer@gmail.com> wrote:
> >
> > > I already tried something similare, but I keep getting command not
> > > found for formail. I was hoping there was a way of doing this without
> > > installing additional software - just use what comes with a default
> > > FreeBSD installation.
> >
> > formail is installed as part of the procmail package. Check for typos
> > and that PATH is set correctly.
> >
> 
> Cool. Procmail is now installed, but the procmail.rc file, should that be
> placed under root's home folder ie /root/procmail.rc or another user? I
> assume root since Daniel's command doesn't specify any users?

If you're not planning to use procmail to deliver your mail, you don't
need to worry about a procmailrc file.  The reason to install procmail
was to get "formail", which does not use the procmailrc file.

> That would mean I'm logged in as root, run the command, formail sends all
> mails to procmail which sees the alias in procmail rc and sends the mails
> out? Correct?

You could do it that way, but it requires more setup.  This is easier:

 # formail -s sendmail you@example.com < /var/mail/root

p

-- 
  Paul Chvostek                                             <paul@it.ca>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110222145643.GA81045>