[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Vacation message delivers to local user even when forwarding
- Subject: [cobalt-users] Vacation message delivers to local user even when forwarding
- From: Robert Fitzpatrick <webmaster@xxxxxxxxxxx>
- Date: Sun Aug 26 01:22:09 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hello:
I have made some modifications to the Cobalt Vacation.pm Perl module and
siteUserEmail.cgi, this is an explanation of what I did:
Originally, out of the box, when forwarding messages to someone in the
e-mail settings for a user, incoming messages get sent to the forwarding
address and NOT to the local mailbox for the user. Additionally, the
Vacation.pm Perl module builds an alias that sends an auto-reply back to the
sender when someone enables the Vacation message in the e-mail settings.
However, this vacation module also sends the incoming message to the local
user, dropping it in their local mailbox, EVEN if they have forwarding
enabled to another e-mail address. Although it also sends to the forwarded
address, messages will build up in the local user mailbox that the user is
not checking since their forwarding is turned on, which will eventually
result in 'exceeded quota' messages back to the senders when the mailbox
reaches it's quota. I made modifications to two files that stop the
Vacation.pm module from sending the message to the local user mailbox if
forwarding is enabled.
The original Vacation module would build an alias line like the following in
the /etc/aliases file (assuming forwarding is enabled):
webmaster: "|/usr/local/sbin/vacation.pl /var/vacation/webmaster.msg
user@xxxxxxxxxxxxxxx", user@xxxxxxxxxxxxxxx, \user
Now, with these modifications, the line is built without the '\user' on the
end.
The changes were made in two files as follows:
In file: /usr/admserv/cgi-bin/.cobalt/siteUserEmail/siteUserEmail.cgi
Replace this line:
$ret=vacation_set_on( $userName, $vacationMode, $fqdn );
With these six lines:
if( $forwardAddr ) {
$ret=vacation_set_on( $userName, $vacationMode, $fqdn, "0"
);
}
else {
$ret=vacation_set_on( $userName, $vacationMode, $fqdn, "1"
);
}
In file: /usr/lib/perl5/site_perl/5.005/Cobalt/Vacation.pm
Replace this line:
my ($user,$state,$domain) = @_;
With this line:
my ($user,$state,$domain,$putUser) = @_;
Replace this line:
$return = Cobalt::List::alias_add($user, "\\$user", $vacaline);
With these six lines:
if ( $putUser ) {
$return = Cobalt::List::alias_add($user, "\\$user",
$vacaline);
}
else {
$return = Cobalt::List::alias_add($user, $vacaline);
}
Alternatively, you can download the modified files in their entirety from
our FTP site at:
ftp://ftp.webtent.org/Scripts/Linux/RaQ3/vacmod_WhenForwarding.tar
There is a README in the zip file.
--
Robert Fitzpatrick