Re: Forwarding all mail to a local user

2008-08-31 Thread Ivan "Rambius" Ivanov
Hello Jeffrey,

On Mon, Sep 1, 2008 at 4:24 AM, Jeffrey Goldberg <[EMAIL PROTECTED]> wrote:
>
> You should edit
>
>  /etc/mail/virtusertable
>
> to include a line like
>
>  @localhost  [EMAIL PROTECTED]
>
> There is a sample virtusertable you can look at.
>
> After you have edited the virtusertable file, you should run
>
>  make maps
>
> in that directory.

I followed your advice but I still cannot forward the local email to
my account.  The full contents of my /etc/mail/virtusertable is:

# cat /etc/mail/virtusertable
# $FreeBSD: src/etc/mail/virtusertable.sample,v 1.3 2000/11/02
23:32:31 dirk Exp $
#
# Map one or all usernames at a source hostname to a specific (or the same)
# username at another target hostname.  Remember to add the source hostname
# to /etc/mail/local-host-names so that sendmail will accept mail for the
# source hostname.
#
@localhost [EMAIL PROTECTED]

I run make maps and I tested if my account can receive email:

$ echo "Test email 1" | mail -s "Test Email 1" [EMAIL PROTECTED]

I successfully got this email in my mbox. Next I tried to send an
email to an non-existing user:

$ echo "Test email 1" | mail -s "Test Email 1" [EMAIL PROTECTED]

I got an error saying "/home/rambius/dead.letter... Saved message in
/home/rambius/dead.letter" and did not receive the email in my
mailbox. Maybe emails to nonexisting users cannot be forwarded at all?

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Forwarding all mail to a local user

2008-08-31 Thread Jeffrey Goldberg

[mailed and posted]

On Aug 31, 2008, at 8:00 PM, Ivan Rambius Ivanov wrote:


I have the following questions. How can I forward all mail sent to
@localhost to a [EMAIL PROTECTED], where rambius is my own
user account in my FreeBSD system and  can be anything
including a user name that does not exist on the local machine?



I have default sendmail installation as provided by the base system
with no modifications of my own.


You should edit

 /etc/mail/virtusertable

to include a line like

 @localhost  [EMAIL PROTECTED]

There is a sample virtusertable you can look at.

After you have edited the virtusertable file, you should run

 make maps

in that directory.

Cheers,

-j



--
Jeffrey Goldberghttp://www.goldmark.org/jeff/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"