[PLUG] Email forwarding

Terry Griffin griffint at pobox.com
Mon Sep 9 04:01:57 UTC 2002


On Sunday 08 September 2002 07:53 pm, Don Buchholz wrote:
> Billy M Dimaculangan wrote:
> > Anyone who could tell me how to automatically forward local users mail to
> > an external mail, I think this has something to do with aliases...
> >
> > Hope someone will help me with this...
> >
> > ---
> > bmd
>
> This can be done via /etc/aliases if you want the system admin
> to handle the job.  Or it can be done in the $HOME/.forward file
> for a particular user if the user is self-sufficient.
>
> 1) In your /etc/aliases file, create a new line with the
>     username in the first column, and the address to forward
>     in the second column (whitepace separates columns)
>
>      username   new at address.out
>
>     You might need to run (as 'root') the "newaliases" command to
>     rebuild the aliases database.
>
>
> 2) In the $HOME/.forward file, just put the new address (and
>     nothing else).
>

I've started using $HOME/.procmailrc instead when I set up
forwarding for a user. It has the benefit of doing the forwarding
*after* the incoming message has been processed by delivery agent
spam filter (procmail in my case). With /etc/aliases or $HOME/.forward,
the messages zips right back out again without ever being processed
by the local delivery agent. (DNS blacklists and other pre-delivery
filtering gets used either way.) A simple forwarding-only
$HOME/.procmailrc looks like this:

	:0
	! user at some-domain.com

Terry





More information about the PLUG mailing list