Forwarding all mail to a local user

2008-08-31 Thread Ivan Rambius Ivanov
Hello list,

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

The reason I want this is the following: I am researching a CMS system
called e107. When users register in it with their email addresses they
are sent an activation email in which they have to click in order to
activate their accounts in e107. Right now I have e107 installed on my
laptop and I am registering some user accounts for testing purposes. I
do not want to create a local system account (with adduser) for each
different user - I just want the activation message sent to the email
address anything@localhost to be forwarded to [EMAIL PROTECTED] so
that I can rd iead from my mailbox and activate the test users.

I have default sendmail installation as provided by the base system
with no modifications of my own. This is my first time  dealing with
sendmail and I will be grateful to any advice and hints. Thank you in
advance.

Regards
Rambius

P.S. I am using 7.0-RELEASE-p3 FreeBSD if this matters.

-- 
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
anyone@localhost to a [EMAIL PROTECTED], where rambius is my own
user account in my FreeBSD system and anyone 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]


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]