Perl Script Program (need) : SpamAssassin-ClamAV-Procmail-Howto
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Perl Script Program (need) : SpamAssassin-ClamAV-Procmail-Howto
Try to look out the "SpamAssassin-ClamAV-Procmail-Howto" from http://www.falkotimme.com/howtos/spa...ail/index.php. I did try to copy all ".antivirus.rc .html-trap.rc .spamassassin.rc .forward .procmailrc and .user_prefs" to "/etc/skel" so that when I use "useradd" with "-m and -k" option, that 6 *.filenames will be make a copy on user home directory.
When you look out inside the content of ".procmailrc and .spamassassin.rc", there was a specific user home directory path way (/home/www/web1/user/testuser/) that will need to change during when adding a new user email account and it needs to change also for the specific user home directory path way.
What I want to become is, if I add a user "james" with "-m and -k" option, all 6 *.filenames will be copied on my /home/james and besides that, the content inside of ".procmailrc and .spamassassin.rc" (from /home/www/web1/user/testuser/) will be change to /home/james. Yet, /home/james/.forward should be chown by the owner "james" and change mode (chmod) to 600 privilage.
Someone says that I need to make a perl script. I had no knowledge on perl Programming, I am hoping anyone could make me.
I hope you had a brilliant idea that you'll share to me for accomplishing this scenario. By the way, sorry for my horrendous english .
Why not just change .procmailrc and .spamassassin.rc that are in /etc/skel dir so they reflect
the user path just by replacing /home/www/web1/user/testuser with the env variable $HOME ?
When I try to email, I can able to get email message. But, when I try of having
sample-spam.txt (w/c contains spam codes) and send it to the user, the user can
will recieved email but the message was not able to detect the spam attached file to notify the user.
Why? Maybe $ENV{HOME} was wrong?
Its work. But When I send email with spam attached to the user, and
login to user email account, I noticed that the email message takes extra
time (at least 1 mins or 50 Seconds) before its arrived to the home user.
Now my problem is when I add a user account, I'll be going to use -m -k
/etc/skel on useradd command (useradd -m -l /etc/skel user). What I wanted
is when I issue "useradd user", the files will automatically generate and
copy to the home directory of user or if it possible to modify/add
codes from built-in "adduser" script in Slackware, will its better.
If i will do alias newuser="useradd -m -l /etc/skel user" from ~/.bashrc , then when I issue useradd james , that will make /home/james homedir too? I'm curious why you put on ~/.bashrc since that is for invidual .bashrc for home user.
Im curious also in alias newuser="useradd -m -l /etc/skel user" , when that happen, that will create "user" account that will supposedly /home/user homedir?
Well you have got wrong arguments, which is -l so i did change it to -k and i remove user. So now it becomes alias newuser="useradd -m -k /etc/skel" ... Now its work fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.