PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` #!/usr/local/cpanel/3rdparty/bin/perl # cpanel - scripts/fixvaliases Copyright 2022 cPanel, L.L.C. # All rights reserved. # copyright@cpanel.net http://cpanel.net # This code is subject to the cPanel license. Unauthorized copying is prohibited use strict; use warnings; use Cpanel::ConfigFiles (); use Cpanel::PwCache (); use Cpanel::Email::Constants (); use Cpanel::Email::Perms (); require "/usr/local/cpanel/scripts/safetybits.pl"; ## no critic qw(RequireBarewordIncludes) my $mailgid = ( Cpanel::PwCache::getpwnam('mail') )[3]; opendir( CPU, "/var/cpanel/users" ); my @USERS = readdir(CPU); closedir(CPU); my $dns = ''; foreach my $file (@USERS) { next if ( !getpwnam($file) ); my @UNFO = getpwnam($file); my $homedir = $UNFO[7]; if ( $homedir ne "" ) { if ( -d "$homedir/mail" ) { safe_chmod( $Cpanel::Email::Perms::MAILDIR_PERMS, "$file", "${homedir}/mail" ); safe_chmod( 0660, "$file", "${homedir}/mail/inbox" ); } } if ( -f "$Cpanel::ConfigFiles::cpanel_users/$file" ) { open( F, "$Cpanel::ConfigFiles::cpanel_users/$file" ); while () { if (/^DNS=(\S+)/) { $dns = $1; } } close(F); if ( $dns ne "" ) { print "Fixing $dns....\n"; open( VA, ">>", "$Cpanel::ConfigFiles::VALIASES_DIR/$dns" ); close(VA); open( VF, ">>", "$Cpanel::ConfigFiles::VFILTERS_DIR/$dns" ); close(VF); chown $UNFO[2], $mailgid, "$Cpanel::ConfigFiles::VALIASES_DIR/$dns"; chown $UNFO[2], $mailgid, "$Cpanel::ConfigFiles::VFILTERS_DIR/$dns"; chmod Cpanel::Email::Constants::VFILE_PERMS(), "$Cpanel::ConfigFiles::VALIASES_DIR/$dns"; chmod Cpanel::Email::Constants::VFILE_PERMS(), "$Cpanel::ConfigFiles::VFILTERS_DIR/$dns"; $dns = ''; } } }