Koozali.org: home of the SME Server

Forward to multiple external Adresses (like Aliases)

Schamane

Forward to multiple external Adresses (like Aliases)
« on: October 17, 2006, 11:20:35 AM »
Hi everybody,

now im fresh registered and wanna say hello.

i Already searched for my problem, but couldn`t find an solution for me.

The problem is:

i wanna build a group

example@mydomain.com and this adress should be forwarded to 3 adresses

userone@gmail.com
usertwo@lycos.com
userthree@yahoo.com

The only solution which i know is to create dummy accounts with forwarding adress for each user.

But there has to be a better way.

In our old Mailserver we got an aliases file under /etc

Does something in this way exists too on sme?

What about a custom-template or something like this?

any answer would be apreciated.

greets

Schamane

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Forward to multiple external Adresses (like Aliases)
« Reply #1 on: October 17, 2006, 11:54:09 AM »
Quote from: "Schamane"
Hi everybody,

now im fresh registered and wanna say hello.

Hello to you too! :-)

Quote from: "Schamane"
i Already searched for my problem, but couldn`t find an solution for me.

The problem is:

i wanna build a group

example@mydomain.com and this adress should be forwarded to 3 adresses

userone@gmail.com
usertwo@lycos.com
userthree@yahoo.com
How about the mailinglist contrib, almost at the bottom of the SME7 contribs page?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Schamane

Forward to multiple external Adresses (like Aliases)
« Reply #2 on: October 17, 2006, 12:14:58 PM »
thx,

so i have to create an newsletter list for any alias?

it should be permament forwarding for example@mydomain.com to the three adresses.

it /etc/aliases it would look likes this

example: userone@gmail.com, usertwo@lycos.com, userthree@yahoo.com


the function pseudonym in sme is nothing else, but i just can enter only one account and in the account i just can enter one forward adress.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Forward to multiple external Adresses (like Aliases)
« Reply #3 on: October 17, 2006, 02:20:28 PM »
Quote from: "Schamane"
thx,

so i have to create an newsletter list for any alias?

it should be permament forwarding for example@mydomain.com to the three adresses.

it /etc/aliases it would look likes this

example: userone@gmail.com, usertwo@lycos.com, userthree@yahoo.com


the function pseudonym in sme is nothing else, but i just can enter only one account and in the account i just can enter one forward adress.
I don't know if it is possible, but my assumption was that: [list=a]
  • a mailinglist has one address to which every member can send an e-mail which in turn is received by all members
  • if you add the addresses to which the mail should be forwarded to the mailing list it should send mail send to the mailing list to all users even if they are not on the domain
  • you can enter the address of the mailinglist in the pseudonym panel[/list:o]If these all hold up, it should be possible... however untested, verified or what so ever :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Forward to multiple external Adresses (like Aliases)
« Reply #4 on: October 17, 2006, 04:20:47 PM »
Here are some more ways to do the same thing:

1. Create a group "example"
2. Create 3 local users, all configured to forward to off-site addresses (as specified), and add all 3 to the group.

or

1. Create a user "example"
2. Manually modify /home/e-smith/files/users/example/.qmail to include multiple forward lines (you'll need to figure out how to template this eventually!)

or

(Works, but you won't be able to use server-manager to edit this user afterwards, and you'll probably break something else, too!)
1. Create user "example"
2. run the following commands at the command prompt:
db accounts setprop example EmailForward forward
db accounts setprop ForwardAddress "userone@gmail.com\n&usertwo@lycos.com\n&userthree@yahoo.com"
signal-event user-modify

(Note: when setting properties in any of the configuration databases, upper/lower case, punctuation, etc. are extremely important!)
less /home/e-smith/files/users/example/.qmail
will show you what's been done to the .qmail file for "example"

or

Install the qmail dot-forward package, and template the users' .qmail changes necessary to use it.

or

Install the qmail fastforward package (and template the users' .qmail changes necessary to use it.)

Summary
There are lots of options, but the mailing list contrib is probably the easiest.  If you've tried it and for some reason it is unacceptable, try one of these...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Forward to multiple external Adresses (like Aliases)
« Reply #5 on: October 18, 2006, 01:04:23 AM »
Schamane

Here's another possibility, although it needs to be confirmed if OK for sme7.
The accounts db location needs to be changed in the script to
/home/e-smith/db/accounts

http://www.vanhees.cc/index.php?module=ContentExpress&func=display&ceid=2&meid=&newlang=eng
...

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Forward to multiple external Adresses (like Aliases)
« Reply #6 on: October 18, 2006, 03:30:19 AM »
You can duplicate the template-expansion code from the vanhees page like this:

mkdir -p /etc/e-smith/templates-user-custom/.qmail
pico -w /etc/e-smith/templates-user-custom/.qmail/70Forward
Code: [Select]
{
# vim: ft=perl:
return '# Forward not set'
unless ($props{EmailForward} =~ /^(forward|both)$/);
{
$OUT = '';
;@List=split(/;/,$props{ForwardAddress});
foreach $adrFwd (@List){
$OUT .= '&' . $adrFwd . '
';
}
return $OUT;
}
}

But you can't enter semi-colons in the 'Create, modify, or remove user accounts' in SME 7, so you'll still have to add the forwarding info manually using something like this:
db accounts setprop ForwardAddress "userone@gmail.com;usertwo@lycos.com;userthree@yahoo.com"

(The code in 70Forward above is based on the default 70Forward and bits out of the vanhees script.  It has been written to eliminate error messages, and produce the desired output in a very limited test scenario by someone who doesn't know perl...)