Web Hosting Talk







View Full Version : Forwarding email to 2 users?


Whitesell
03-20-2002, 08:50 AM
I moved a customer from a windows host to our Raq4 and I can't seem to find a way to duplicate something they had before. They had one email address, spot@domain.com, that would forward to two separate addresses so that dick@domain.com and jane@domain.com would receive anything sent to spot@domain.com.

The cobalt forwarding won't accept two email addresses. Is there a way I can forward to two separate accounts?

Thanks as always for your help,

Jim Whitesell

cyrusTvirus
03-20-2002, 09:12 AM
Passing on, and keep the original:

Scenario: userX wants to collect their mail themselves, but would also like userY to receive the same identicle mail
(userY may/maynot be on the Raq, and may/maynot be under the same domain name - it makes NO difference)

This is simply acheived by forwarding a duplicate copy (excluding the envelope) of the email delivered to userX (headers & body & attachements) onto userY's email address.
You will need to place a file called ".forward" in the following directory: /home/sites/site#/users/USER_ACCOUNT (Windoze users note: creating a .forward file is not possible, create it as FTP.forward, and rename it once FTP'd to the Raq - Ensure you send it as a TEXT or ASCII file, NOT Binary!) or you could just create it on the Raq via SSH/Telnet.
In the .forward file, enter the following line:

\USER_ACCOUNT, fwd_to_email@domain.com, 2nd_fwd_to_email@domain.com, \3RD_USER_ACCOUNT
Whats that all mean?
\ Tells procmail this users mailbox is a local one (on the Raq)
USER_ACCOUNT Replace this with the users ACCOUNT name (not the mail aliases!) They will now get to keep the original copy. Do NOT use the email address here, your raq could end up in an endless mail loop (using the account, causes procmail to bypass this .forward file). Note: usefull to minimise the risk of mail loops!
, That's a COMMA followed by a SPACE (or a TAB)
fwd_to_email@domain.com Replace this with the new recipinets email address if external to the Raq. (not account!) If a local email account is used, you may put a \account instead, this forwards to the local account regardless of the aliases.
, , That's a COMMA followed by a SPACE (or a TAB)
2nd_fwd_to_email@domain.com The second email address to receive a copy.
, That's a COMMA followed by a SPACE (or a TAB)
\ Tells procmail this users mailbox is a local one (on the Raq)
3RD_USER_ACCOUNT Replace this with the 3rd users ACCOUNT name (not the mail aliases!) This however will cause procmail to ignore any .forward files that are found in the users space. Note: usefull to minimise the risk of mail loops!


You may if you have a long list, place the emails on a new line (you do not need to add a trailing COMMA & SPACE)

If you want to delete the original; Remove the ACCOUNT owners details (\USER_ACCOUNT, ), it should then look like this;

fwd_to_email@domain.com, 2nd_fwd_to_email@domain.com, \3RD_USER_ACCOUNT



Thats it!

Whitesell
03-20-2002, 11:30 AM
Thanks!

All accounts are local to this machine. I tried to use this:

\user1, fwd_to_\user2, 2nd_fwd_to_\user3

But it doesn't forward. What have I done wrong??

Regards,

-Jim Whitesell

Whitesell
03-27-2002, 03:05 PM
I'm still having trouble getting this to work.

I need to forward mail sent to user1 - it needs to be recieved by user2 and user3. All are users on this RaQ4.


Here's what I've done so far:

I creared a file named .forward and placed it in the user's directory:
/home/sites/site19/users/user1

The .forward file contains one line:

\user1, fwd_to_\user2, 2nd_fwd_to_\user3

However, the mail isn't forwarded. is the syntax of the line in .forward wrong?

Thanks for your help!

Jim Whitesell

Whitesell
03-29-2002, 09:12 AM
Ok, I finally got this working and wanted to update the thread for the benefit of anyone reading it in the future:

The line I had in the .forward file was wrong. After re-reading (several times) the instructions kindly provided by cyrusTvirus, I realized that the line in the .forward file needs to be like this:

\user1, \user2

This forwards the mail to two local users. If I wanted to forward to addresses that were not local to this machine, it would be:

someone@somewhere.com, george.dubaya@whitehouse.gov

and if I wanted the mail to be forwarded to a local and an outside address, this would work:

\user3, nancy@drew.com

Thanks to everyone for continued help!

Regards,

Jim Whitesell

nEMESIS4
04-03-2002, 11:09 AM
The easiest way I've found to accomplish what you want is to simply create a mailing list called Spot with the receipts of Jane and Dick on it. The check off "Allow Unsubscribed Posting to List" ... The password doesn't matter.

Dick and Jane will check their POP3 accounts like normal, and everything mailed to Spot will arrive in both their mail boxes.

This is just a simpler solution for any newbies, the solution in the last messages will work great too.