Koozali.org: home of the SME Server

mail forwarding to multiple recipients

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #15 on: October 27, 2012, 03:55:54 AM »
.
My question though is, why doesn't the control panel allow a series of email addresses the way horde does?

The simple (and true) answer is that either nobody has suggested or asked for that, or nobody has given the time to develop that feature. These things don't just happen by magic.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #16 on: October 27, 2012, 04:03:09 AM »
I'm pretty sure that mail sent to a domain is considered readable by the domain owner, the boss can read anyone@hiscompany.com, but not anyone@someone_else's_ISP.com.

"considered" by whom? I'm really not sure where you get this idea. "root" can read all mail on the server. That's the only rule.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #17 on: October 27, 2012, 04:05:50 AM »
Easier than any custom template is to set forwarding address to 'user-forward@mydomain.name', and create ~user/.qmail-forward, containing:

user1@first.domain
user2@second.domain
[etc]

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #18 on: October 27, 2012, 04:08:56 AM »
The functionality to enter multiple forwarding addresses used to exist in the server manager users panel, way back in sme version 3, 4 or 5...

Really? Your memory must be better than mine. I don't remember that.

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #19 on: October 27, 2012, 05:34:31 AM »
Easier than any custom template is to set forwarding address to 'user-forward@mydomain.name', and create ~user/.qmail-forward, containing:

user1@first.domain
user2@second.domain
[etc]
except that it began to be complicated for @gmail.com or @hotmail.com for example.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #20 on: October 27, 2012, 03:41:26 PM »
except that it began to be complicated for @gmail.com or @hotmail.com for example.

Please explain how it was complicated.

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #21 on: October 27, 2012, 09:58:52 PM »
sorry read too fast .

but i have tried the solution with a user
setted forward in manager
created a :/home/e-smith/files/users/user1/.qmail-forward

with content :
Code: [Select]

user3@domain3.com
user4@domain4.com

obtain nothing in the two boxes


content of the  .qmail :

Code: [Select]
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------


| condredirect user1-junkmail headermatch 'X-Spam-Status: Yes'


&user2@domain2.com
# Vacation Message not set
| /usr/bin/procmail ~/.procmailrc ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;
# No local delivery

domain2, domain3 and domain4 are on other boxes

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #22 on: October 27, 2012, 11:58:14 PM »
You haven't followed my instructions.

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #23 on: October 28, 2012, 01:21:45 AM »
You haven't followed my instructions.
Then, I guess I still do not understand what you are meaning

Easier than any custom template is to set forwarding address to 'user-forward@mydomain.name'
do you mean literally write 'user-forward@mydomain.name' int he forward to box  of the server-manager for the user 'user' + setting to forward
OR
setting to forward for the user 'user-forward' in the server manager.


because I did understand  the second, and obviously tried this.

if you were meaning the first, then I also guess that it should also work with "user-forward" without the trailing @domain.name

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #24 on: October 28, 2012, 01:38:01 AM »
works great :

in server manager :
- set mail for the user "username" to Forward
- set forward address to  : "username-forward"

create a file .qmail for the user username :
Code: [Select]
touch /home/e-smith/files/users/username/.qmail-forward
chown username:username /home/e-smith/files/users/username/.qmail-forward
vim /home/e-smith/files/users/username/.qmail-forward

then add a forward mail address per line, and save.

the heading ampersand (&) usually present for forward in .qmail files is not mandatory, see http://www.qmail.org/man/man5/dot-qmail.html for references.

Thanks Charlie for pointing this better solution.