How to forward old root mails to an external email address?
paul+fbsd at it.ca
Tue Feb 22 15:21:45 UTC 2011
On Sat, Feb 19, 2011 at 11:39:38PM +0100, Andy Wodfer wrote:
> On Sat, Feb 19, 2011 at 11:14 PM, RW <rwmaillists at googlemail.com> wrote:
> > On Sat, 19 Feb 2011 22:39:59 +0100
> > Andy Wodfer <wodfer at 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 at example.com < /var/mail/root
Paul Chvostek <paul at it.ca>
More information about the freebsd-questions