It's possible to login in Usermin with Admin account for managing users mail forward and autoreply settings ?
Why modules with similar functionality not supported in Webmin anymore ?!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Jamie Cameron (with lots of thanks for his help):
It is time to pay back for the help I already obtained regarding the very same problem ;-)
@Denis:
So, yes, it is possible to do this.
There are a few different approaches.
APPROACH NO#1: (I guess this is what you are looking for, as the admin is the one that sets all up for any user on that server)
By "default" it seems that both Webmin and Usermin lead the user/admin to procmail's features when it comes to "autoreply and forwarding" matters.
But it is still possible to do it via the "old" vacation binary, used in conjuction with a webmin module called "vacationadm".
Unfortunatelly you also need to be a little lucky too, because vacation binary packages are not built for each and every Linux distro.
A quick look on http://fr.rpmfind.net for "vacation" will not show, for example, any Fedora 8 package.
Fortunatelly you may try a rpm built for a different distro, that will work out like a charm on Fedora :-) and probably on other not "blessed" distros :-)
(for example for Fedora 8 (x64 too) you can use one of the following:
vacation-1.2.5-1.i386.rpm <------------------ [ SourceForge ]
or
vacation-1.2.6.1-3.i686.rpm <------------------ [ Polish(ed) Linux ]
Now, the "link" between "vacation" and Webmin, as I said, is done using a rather obsolete webmin module called "vacationadm"
The module is listed on Webmin's website but you need to be extremely lucky to get a not-damaged file.
That is because last time when I searched for it (two weeks ago), the only downloadable file I found was broken (vacationadm-1.1.3.wbm)
and the author's site is no longer available. Still.. don't panic yet :-)
I was extremely lucky to find on some old backup CD's from a former server, a working vacationadm-1.1.2.wbm
If needed I will think of a solution to give that not-damaged file to Jamie and ask him to put it somewhere public for the ones in need ;-)
So ...
a. vacation (rpm) installed into /usr/bin/vacation
b. vacationadm installed into Webmin
(this will show you a new "Vacation and Forwarding" option into Webmin's "System" menu WHICH IS DIFFERENT than the options provided into Usermin)
Now there is only one more step :-)
The vacationadm module makes use of a perl script, "/usr/libexec/webmin/vacationadm/local-lib.pl"
That script contains one function called "get_group". It's role is only to provide the johndoe's group
because it is supposed to create ".forward", ".vacation.msg" and "vacation.db" with johndoes's rights
into johndoe's </homedir>
Well... in my case, trying to set johndoe's autoreply and/or forwarding ended up with an error saying
that johndoe "does not belong to any group"
I was tired enough at that time so I just "forced" that function to "return" johndoe's username.
Here's the modified function:
---------------------------------------------------------------------
# returns the name of the standard group for the given user
sub get_group {
my $user=@_[0];
# We use the system's groups commando, so we have no troubles with
# NIS and so on.
# open(INPUT,"groups $user |");
# @group = <INPUT>;
# close(INPUT);
# $group = (split /: /, @group[0])[1];
# chomp($group); # cut off the trailing new line
# We want only the default (first) group.
# $group = (split / /,$group)[0];
# &html_abort( $text{'abort_nogroup'} ) unless ( defined($group) );
So to speak ".forward", ".vacation.msg" and "vacation.db" are all created like "chown johndoe:johndoe <filename>"
(I'm sure you get the point as I'm also sure some readers will get a good laugh of my noobish ways :-))) ...)
The final step is to get into module's config and make sure you point to the right files
(path to "aliases" , path to "virtusers" table, and a few other ones) Very easy to set up.
From that moment on, you , the admin, will be able to set the autoresponse message and mail forwarding of any johndoe/janedoe
users in your server.
NOTE: Keep in mind that "vacation.db" keeps track of senders so they will only receive one notification even if they will "insist"
sending more messages to johndoe's e-mail address.
APPROACH NO#2: (assuming johndoe has webmail access to the server, via Usermin or Usermin-Webmail)
In this case everything is simple. Make sure you give to johndoe access to the usermin's option called "Forwards and Auto-replies".
The option is somehow "hidden" because it's not shown on the main panel in Usermin. The options shown there are the ones that make
use of procmail (.procmailrc and stuff), which is different than the ".vacation" approach.
You will have to:
- log onto Webmin, go to Usermin configuration and ENABLE the "Forwards and Auto-replies" option, so that will be available to johndoe
when he will log into his account via Usermin.
Johndoe will have to:
- take a closer look at the options on the screen :-) and go into "Usermin" (which is the second main option on the page he will see)
This is where he will find "Forwards and Auto-replies", the one you just enabled for him a few moments ago.
NOTE:
a. That method makes use of a different perl script, "\etc\usermin\forward\autoreply.pl"
By default that "autoreply.pl" belongs to "root" so you will have to make sure that everybody gets read-write access
otherwise johndoe will not be able to use it (not even via the module). An ordinary "chown" will do the work :-)
b. The script works very similar to "vacation", with a few notable differences:
- it will create ".forward" (as vacation does)
- it will create "vacation.txt" (as a replacement to ".vacation.msg"
- it will NOT create anything like ".vacation.db" so IT WILL NOT KEEP TRACK of senders.
... meaning EVERY received message will trigger sending back an autoresponse.
My post ends here :-)
Better longer and explanatory than shorter and more confusing :-))))
I can only hope you didn't fell asleep reading it :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ahem! yes. i was thinking the very same thing! get that little dogie up there on the risk sector in case i cannot find my older cd or if i chucked it. better yet.... can you put it up on a fileshare site right away?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's possible to login in Usermin with Admin account for managing users mail forward and autoreply settings ?
Why modules with similar functionality not supported in Webmin anymore ?!
@Jamie Cameron (with lots of thanks for his help):
It is time to pay back for the help I already obtained regarding the very same problem ;-)
@Denis:
So, yes, it is possible to do this.
There are a few different approaches.
APPROACH NO#1: (I guess this is what you are looking for, as the admin is the one that sets all up for any user on that server)
By "default" it seems that both Webmin and Usermin lead the user/admin to procmail's features when it comes to "autoreply and forwarding" matters.
But it is still possible to do it via the "old" vacation binary, used in conjuction with a webmin module called "vacationadm".
Unfortunatelly you also need to be a little lucky too, because vacation binary packages are not built for each and every Linux distro.
A quick look on http://fr.rpmfind.net for "vacation" will not show, for example, any Fedora 8 package.
Fortunatelly you may try a rpm built for a different distro, that will work out like a charm on Fedora :-) and probably on other not "blessed" distros :-)
(for example for Fedora 8 (x64 too) you can use one of the following:
vacation-1.2.5-1.i386.rpm <------------------ [ SourceForge ]
or
vacation-1.2.6.1-3.i686.rpm <------------------ [ Polish(ed) Linux ]
Now, the "link" between "vacation" and Webmin, as I said, is done using a rather obsolete webmin module called "vacationadm"
The module is listed on Webmin's website but you need to be extremely lucky to get a not-damaged file.
That is because last time when I searched for it (two weeks ago), the only downloadable file I found was broken (vacationadm-1.1.3.wbm)
and the author's site is no longer available. Still.. don't panic yet :-)
I was extremely lucky to find on some old backup CD's from a former server, a working vacationadm-1.1.2.wbm
If needed I will think of a solution to give that not-damaged file to Jamie and ask him to put it somewhere public for the ones in need ;-)
So ...
a. vacation (rpm) installed into /usr/bin/vacation
b. vacationadm installed into Webmin
(this will show you a new "Vacation and Forwarding" option into Webmin's "System" menu WHICH IS DIFFERENT than the options provided into Usermin)
Now there is only one more step :-)
The vacationadm module makes use of a perl script, "/usr/libexec/webmin/vacationadm/local-lib.pl"
That script contains one function called "get_group". It's role is only to provide the johndoe's group
because it is supposed to create ".forward", ".vacation.msg" and "vacation.db" with johndoes's rights
into johndoe's </homedir>
Well... in my case, trying to set johndoe's autoreply and/or forwarding ended up with an error saying
that johndoe "does not belong to any group"
I was tired enough at that time so I just "forced" that function to "return" johndoe's username.
Here's the modified function:
---------------------------------------------------------------------
# returns the name of the standard group for the given user
sub get_group {
my $user=@_[0];
# We use the system's groups commando, so we have no troubles with
# NIS and so on.
# open(INPUT,"groups $user |");
# @group = <INPUT>;
# close(INPUT);
# $group = (split /: /, @group[0])[1];
# chomp($group); # cut off the trailing new line
# We want only the default (first) group.
# $group = (split / /,$group)[0];
# &html_abort( $text{'abort_nogroup'} ) unless ( defined($group) );
# return $group;
return $user;
}
----------------------------------------------------------------------
So to speak ".forward", ".vacation.msg" and "vacation.db" are all created like "chown johndoe:johndoe <filename>"
(I'm sure you get the point as I'm also sure some readers will get a good laugh of my noobish ways :-))) ...)
The final step is to get into module's config and make sure you point to the right files
(path to "aliases" , path to "virtusers" table, and a few other ones) Very easy to set up.
From that moment on, you , the admin, will be able to set the autoresponse message and mail forwarding of any johndoe/janedoe
users in your server.
NOTE: Keep in mind that "vacation.db" keeps track of senders so they will only receive one notification even if they will "insist"
sending more messages to johndoe's e-mail address.
APPROACH NO#2: (assuming johndoe has webmail access to the server, via Usermin or Usermin-Webmail)
In this case everything is simple. Make sure you give to johndoe access to the usermin's option called "Forwards and Auto-replies".
The option is somehow "hidden" because it's not shown on the main panel in Usermin. The options shown there are the ones that make
use of procmail (.procmailrc and stuff), which is different than the ".vacation" approach.
You will have to:
- log onto Webmin, go to Usermin configuration and ENABLE the "Forwards and Auto-replies" option, so that will be available to johndoe
when he will log into his account via Usermin.
Johndoe will have to:
- take a closer look at the options on the screen :-) and go into "Usermin" (which is the second main option on the page he will see)
This is where he will find "Forwards and Auto-replies", the one you just enabled for him a few moments ago.
NOTE:
a. That method makes use of a different perl script, "\etc\usermin\forward\autoreply.pl"
By default that "autoreply.pl" belongs to "root" so you will have to make sure that everybody gets read-write access
otherwise johndoe will not be able to use it (not even via the module). An ordinary "chown" will do the work :-)
b. The script works very similar to "vacation", with a few notable differences:
- it will create ".forward" (as vacation does)
- it will create "vacation.txt" (as a replacement to ".vacation.msg"
- it will NOT create anything like ".vacation.db" so IT WILL NOT KEEP TRACK of senders.
... meaning EVERY received message will trigger sending back an autoresponse.
My post ends here :-)
Better longer and explanatory than shorter and more confusing :-))))
I can only hope you didn't fell asleep reading it :-)
ahem! yes. i was thinking the very same thing! get that little dogie up there on the risk sector in case i cannot find my older cd or if i chucked it. better yet.... can you put it up on a fileshare site right away?
Thank you WERY much.
I already have all parts (vacation binary and webmin module). Wll try to apply your hack when return from travel (because of this delay in my answer).
Thank´s again and Good Luck.
I already sent the module by mail to Jamie Cameron and he will put the file on Webmin's site.