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 - simonschmeisser

Pages: [1]
1
Installation and Upgrades / Re: Use nullmailer for alerts
« on: April 03, 2013, 10:53:11 am »
Hi koecse

Yes, using scripts and nullmailer together should be no problem. But I would like to use the zentyal events and send them via nullmailer.

2
Installation and Upgrades / Use nullmailer for alerts
« on: April 03, 2013, 05:29:49 am »
Hi everybody

I am currently setting up a file and gateway server for a small company. Email is handled outside. I'm using zentyal 3.0 on Ubuntu 12.04.

Since we do remote administration of this server, we need email allerts if something fails. However we do not need any mail server features (incoming or outgoing) and I really want to avoid them (KISS, security, spam, ...).

Is there a way to set up the Email dispatcher to use nullmailer (http://untroubled.org/nullmailer/)? I'm fine with doing some changes at the code level, just need some guidance.

thanks
Simon

3
just for the record, here is my version which uses the API somewhat different and does ANY number of groups

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

use strict;
use warnings;

use EBox;
use EBox::UsersAndGroups::User;
use EBox::UsersAndGroups::Group;
use EBox::UsersAndGroups;

EBox::init();


open (my $USERS, 'new_users.txt');

while (my $line = <$USERS>) {
    chomp ($line);
    my $user;
    my ($username, $givenname, $surname, $password, $groups) = split(',', $line);
    $user->{'user'} = $username;
    $user->{'givenname'} = $givenname;
    $user->{'surname'} = $surname;
    $user->{'password'} = $password;
   
    print "\n Creating user: $username $givenname $surname \n";
    my $newUser = EBox::UsersAndGroups::User->create($user, 0);
    print "done\n";
    foreach my $groupname (split(' ' , $groups)) {
    print "Adding to Group $groupname \n";
    my $group = new EBox::UsersAndGroups->group($groupname);
    #print $group;
    $newUser->addGroup($group)
    }
}
close ($USERS);

1;

you'll need a file with the format
$username, $givenname, $surname, $password, $groups
where groups are SPACE seperated groups

have fun

Pages: [1]