Koozali.org: home of the SME Server

mail forwarding to multiple recipients

Offline mike_mattos

  • *
  • 313
  • +0/-0
mail forwarding to multiple recipients
« on: October 22, 2012, 07:42:10 PM »
I'm trying to have mail to a user be forwarded to multiple recipients.  On the control panel/users/forwarding address I'm told I can't use a comma!   ANd in Horde Webmail I can't see how to create a mailing list, or how to insert the Address List as an email address in forwarding.  What am I missing?
...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #1 on: October 23, 2012, 03:27:00 AM »
mike_mattos

Search back in the forums a long way, been answered many times in the past.
eg
mailsorting
procmail
.qmail user files (make custom versions & add extra recipients)
templates-user-custom
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #2 on: October 23, 2012, 04:21:02 AM »
Have you tried it recently?

"No package smeserver-mailsorting available"  suggests the method isn't supported any more.

My question though is, why doesn't the control panel allow a series of email addresses the way horde does?  That would resolve the need without needing a contrib, thus putting it into the lower user level rather than needing command prompt access.
...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #3 on: October 23, 2012, 07:10:30 AM »
mike_mattos

you probably need to setup sme7contribs repo on sme8, & use --enablerpo=sme7contribs switch refer wiki sme 8 section & various forum posts on the topic

You don't need a contrib, I'm sure you can add them to users .qmail files with a & in front of each one
Request a new feature request at bugzilla if you feel it should be in the base, I think it has been asked for previously but don't recall the answer
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #4 on: October 23, 2012, 05:41:05 PM »
Thanks, Mary

I added
&user1
&user2

seems to be working properly.  Have also added a feature request in Bugzilla, because with smart phones, the second forwarding address is pretty universal.
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: mail forwarding to multiple recipients
« Reply #5 on: October 23, 2012, 06:08:55 PM »
Thanks, Mary

I added
&user1
&user2

seems to be working properly.  Have also added a feature request in Bugzilla, because with smart phones, the second forwarding address is pretty universal.

doh.. really? :-)
sincerely, I can't see why.. can you define, please?
thank you

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #6 on: October 23, 2012, 06:09:14 PM »
mike_mattos

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, forget which & when, & I also forget why it was removed or what the alternative was supposed to be.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #7 on: October 23, 2012, 06:21:42 PM »
I may have dumber that average customers, but pushing mail to their phones is a lot easier than figuring out how to set up multiple accounts on multiple devices via multiple providers. 

Thus most 'users' already the mail set to local plus forward with the forwarding address set to the phone.   Sending a second copy to a supervisor or logging file or an assistant is thus needed. 

...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #8 on: October 23, 2012, 06:54:02 PM »
mike_mattos

You can create additional users which forward to the external email address, and create a group to deliver to the local user and the external user. You will need to rethink and rearrange the way you use user names. I have done it, it's a little bit of extra work but functions fine, all done within server manager.

Personally though, your users should configure their smartphones to use IMAP  & read the mail folders directly on sme server. I access mail for many different accounts (on different sme servers) using IMAP on phones, PC's and via webmail, abd using a variety of email clients, and whatever I do on one, is seen by all the other devices & email clients.
IMAP is the way to go.

I have mail forwarded from many different "brands" of mail systems to different accounts on sme server, or the same account in some cases.

No need for forwarding then, either.

There are commands that allow you to retain copies of all mails, see FAQ.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #9 on: October 23, 2012, 08:34:02 PM »
Mary, using groups can create error messages about looping when the users already have some rules in place.  BUT the real problem is that bosses in the transportation sector are dumb as bricks and often illiterate but won't admit it.  SO I just PUSH messages rather than need to access other peoples phones and hope they don't screw it up later, not to mention their paranoia about the tech people people seeing their mail!   

And I have the system keeping copies of everything, but that really isn't much help as an archive.  But a few rules in the Boss's inbox, and all the staff emails copied into named folders.
...

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #10 on: October 26, 2012, 04:33:26 PM »
And I have the system keeping copies of everything, but that really isn't much help as an archive.  But a few rules in the Boss's inbox, and all the staff emails copied into named folders.

be aware of privacy and that in some States/Countries it might be illegal to let the boss access to emails sent to employees.


for reference i have already documented what need to be done to give this option back in the manager in this post : http://entraide.ixus.net/viewtopic.php?f=7&t=379&p=3095&hilit=forward#p3095 ( sorry it is in French)

I guess that it was removed to avoid to have a lot of spam forwarded to multiple external mail addresses and beeing blacklisted.

I guess that with a simple custom template you can keep your changes in a qmail file ( i think they will be lost it an expand template occurs, but with some conditions about the user you can safely create a custom template to apply only to one user.)

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #11 on: October 26, 2012, 09:09:30 PM »
Merci

MY French is good enough to see the qmail edit I am now using, but I didn't see how to add it to the Server Manager User Panel,
...

Offline mike_mattos

  • *
  • 313
  • +0/-0
Re: mail forwarding to multiple recipients
« Reply #12 on: October 26, 2012, 09:13:50 PM »
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.

SO even if SME has a copy of all mails, I doubt the boss is smart enough to scan the log, but having CC's of his employees business email is pretty much like the old days when the typing pool always kept a copy of everything!
...

Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #13 on: October 26, 2012, 09:22:49 PM »
well what was stated around in French is that :

you have to to a template-custom of : /etc/e-smith/templates-user/.qmail/70Forward
Code: [Select]
mkdir --parents /etc/e-smith/templates-user-custom/.qmail
cp /etc/e-smith/templates-user/.qmail/70Forward /etc/e-smith/templates-user-custom/.qmail/70Forward

then edit with vim, pico, mcedit or whatever  to obtain
Code: [Select]
{
    # vim: ft=perl:
    return '# Forward not set'
        unless ($props{EmailForward} =~ /^(forward|both)$/);

  my @Fwmail = split(/,/, $props{ForwardAddress}.",");
        foreach (@Fwmail )
        {
        return '&' .$_;
        }

}

then you will be able to change the db setting in command line, this way :
Code: [Select]
db accounts setprop ttestman ForwardAddress ttestman@yahoo.com,ttestman@gmail.com
signal-event user-modify ttestman

you still won't be able to use the server manager, because the server manager do a verification of unwanted characters. I then explained how to modify the manager verification but this is not a good way to do because either rpm updates would erase your modifications, or the updates won't be installed ( depending rpm settings).

But without theses modifications you would have trouble to make any change for this user in the manager


in fact the more clever way would be


Code: [Select]
mkdir --parents /etc/e-smith/templates-user-custom/.qmail
cp /etc/e-smith/templates-user/.qmail/70Forward /etc/e-smith/templates-user-custom/.qmail/70Forward2

then edit with vim, pico, mcedit or whatever  to obtain :

vim /etc/e-smith/templates-user-custom/.qmail/70Forward2
Code: [Select]
{
    # vim: ft=perl:
    return '# Forward not set'
        unless ($props{EmailForward} =~ /^(forward|both)$/);

  my @Fwmail = split(/,/, $props{ForwardAddress2}.",");
        foreach (@Fwmail )
        {
        return '&' .$_;
        }

}

then you will be able to do :

Code: [Select]
db accounts setprop ttestman ForwardAddress2 ttestman@yahoo.com,ttestman@gmail.com
signal-event user-modify ttestman


this way :
- you will be bale to set as many forward address as you want in the key ForwardAddress2 ( separated by a coma ",")
- the key ForwardAddress will still permit to store one more forward address
- if you deactivate forward in the manager both key are ignored
- you are still able to use the manager for user
- only bad thing is you must watch that your emails are correct, because this way there is no regex to check after you


Offline Jean-Philippe Pialasse

  • *
  • 2,912
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: mail forwarding to multiple recipients
« Reply #14 on: October 26, 2012, 09:30:32 PM »
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.

SO even if SME has a copy of all mails, I doubt the boss is smart enough to scan the log, but having CC's of his employees business email is pretty much like the old days when the typing pool always kept a copy of everything!


not exactly the typing pool was for outgoing mail, here we speak about incoming emails. Totally different . The good old time was to keep track of work done and information sent to customer. Keeping track of incoming message could be a way to intercept private communication. Depending local laws this can be accepted, tolerated, or punished. You should verify before doing so. In France this can be done on function addresses like info@mybusiness.fr or support@mybusiness.fr but not on personal box o.durand@mybusiness.fr.

Imagine you ask a company to send your wife next gift at work, to avoid her to intercept it, would you be happy that your boss first opened it ? This is the same for electronic communication.