Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - grl

Pages: [1]
1
Email and Groupware / Re: External Alias forwarding to more than one address
« on: September 10, 2022, 11:53:51 pm »
btw - the LDAP scheme does not need any change for that.

in the example above the CN=team1@example.org,CN=alias,CN=mail,CN=zentyal,CN=Configuration,<baseDN of your server>
just needs a second entry in the attribute maildrop.

Then postfix will forward the mail to both (or more) addresses.

So I think this would just need some change in the webadmin UI...

Tried it using phpLDAPAdmin to change the attribute value...

regards
Lukas

2
Email and Groupware / Re: add mail alias to user on command line
« on: September 06, 2022, 07:46:55 pm »
In case someone else has the same question - this is a little script I hacked together myself. Use it at your own risk - as it was used just to migrate stuff it comes without much error checking and no guarantee of not breaking a lot of things...

Code: [Select]
#!/usr/bin/perl

use strict;
use warnings;
use EBox;
use EBox::Samba::User;
use EBox::MailAliasLdap;
use EBox::Global;

EBox::init();

my $malias = $ARGV[0];
my $myuser = $ARGV[1];
my $mymail = $ARGV[2];

my $users = EBox::Global->modInstance('users');
my $mailAliasLdap = EBox::MailAliasLdap->new();

my $user = EBox::Samba::User->new(samAccountName => $myuser );

if(($mailAliasLdap->aliasExists($malias)))
{
  print "$malias belongs to @{$mailAliasLdap->accountsByAlias($malias)} \n";
}
else
{
  $mailAliasLdap->addUserAlias($user, $malias, $mymail);
  print "Added alias $malias \n";
}


It expects the desired alias as first argument, the username of the user as second and the email of the user as third argument.

regards
Lukas

3
Email and Groupware / add mail alias to user on command line
« on: August 27, 2022, 10:34:33 pm »
HI!

To import existing mail aliases to existing users on a zentyal 7 server I would love to do that via command line.

I found a script dating back from 2012 - this does not work anymore.

Any hint how to add mail aliases from the command line e.g. via perl script?

thanks
Lukas

4
Email and Groupware / External Alias forwarding to more than one address
« on: August 27, 2022, 10:31:58 pm »
HI!
Is it possible to add an External Alias to a virtual mail domain so it forwards to several external addresses?
I want to achieve:
Incoming mail for team1@example.org is forwarded to member1@otherdomain1.org AND to member2@otherdomain2.org AND to member3@otherdomain3.org

As far as I can see I can only enter one destination mail address into the gui - but for postfix several destination addresses are no problem. In my SQL-driven postfix I just add several lines into the database - one for each destination. In the above example that would create three lines into my database:
team1@example.org -> member1@otherdomain1.org
team1@example.org -> member2@otherdomain2.org
team1@example.org -> member3@otherdomain3.org

Any idea how to get that behaviour?


regards
Lukas

Pages: [1]