Sponsored Content
Operating Systems Linux Gentoo inserting grep -c value into an email subject Post 302220775 by mark54g on Friday 1st of August 2008 02:38:41 PM
Old 08-01-2008
Quote:
Originally Posted by Ikon
Code:
n=`grep -c Blocked /var/amavis/amavis.log`

Just for an FYI, those are back ticks, and not single quotes. This is on the same key as ~.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

use email subject line as shell command

If anyone can give me some ideas on this it would be great. What I'm trying to do is to have emails be sent to my unix account. Once they are emailed to the unix account, I want to use the text in the subject field to invoke a shell script, so basically I need to find a way that I can... (4 Replies)
Discussion started by: mskarica
4 Replies

2. Shell Programming and Scripting

Email with subject contains value of Variable

I want to email where subject contains value of variable $ORACLE_SID. When script is emailing, it is not taking value of $ORACLE_SID. example - I have variable ORACLE_SID=prd I am sending email with below script. tail -1 $LOG | mailx -s 'Export Completed for ${ORACLE_SID}'... (2 Replies)
Discussion started by: deepsingh
2 Replies

3. Shell Programming and Scripting

Run a script based on the subject line of the email

Hi, I need help in running a script that would pull info from an email subject line and run a script (foo.sh). I'm pretty sure after a bit of googling that this is possible in several ways. but none was pretty clear on how to accomplish it. The part that I really need help with is getting the... (5 Replies)
Discussion started by: satekn
5 Replies

4. Shell Programming and Scripting

Unable to populate subject field of the email while using sendmail

Hi, Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument : echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email" ... (4 Replies)
Discussion started by: sdiptanil
4 Replies

5. Shell Programming and Scripting

help with script to send email and if subject line match is found

Help with script that will check log, then find a match is found, add that as the subject line. 1. The script will always run as a deamon.. and scan the event.log file 2. when a new 101 line is added to the event.log file, have the script check position 5,6 and 7 which is the job name, which... (2 Replies)
Discussion started by: axdelg
2 Replies

6. Shell Programming and Scripting

Subject line of an email

Hi all, I am trying to automate a process in which at the end of the process the script should send an email to the user saying this process is completed. I have done everything but the problem now is the subject line of the email... the subject line looks like this.. where abc xyz is a... (4 Replies)
Discussion started by: smarty86
4 Replies

7. UNIX for Dummies Questions & Answers

Inserting subject for the mails sent through SQR

I am trying to insert subject for the mails sent through one of our sqr process using below code Let $Email_Command = 'uuencode ' || $filename || ' ' || $filename || ' | sendmail -F''' ||$subject || ''' ' ||$mailid1 || ''' ' ||$mailid2 CALL SYSTEM USING $Email_Command #return_code WAIT ... (5 Replies)
Discussion started by: thangaga
5 Replies

8. Shell Programming and Scripting

Sendemail how to send an email with a subject variable

Hi,:) I try this : #!/bin/bash sender="me@example.com" recipient="you@example.com" subject="TEST FILE" server="0.0.0.0" file=$(cat file.txt) /usr/bin/sendemail -f $sender -t $recipient -u $subject -m $file My file.txt: BLABLALA BLABLABLA (7 Replies)
Discussion started by: Arnaudh78
7 Replies

9. Shell Programming and Scripting

Sending sql output to email body with conditional subject line

hi , i have written below piece of code to meet the requirement but i am stuck in the logic here. the requirement are: 1) to send the sql out put to email body with proper formatting. 2) if count_matching = Yes then mail should triggered with the subject line ... (10 Replies)
Discussion started by: itzkashi
10 Replies

10. UNIX for Beginners Questions & Answers

Variable not displaying in subject line of mailx email

Hi Newbie here with first post. I've got a shell script (ksh) whereby I run a SQL*Plus script and output the results to a file. I then check the output file in an if statement that looks like this: if ]; then export GAPNUM=`awk '{print $4}' $OUTFILE` if ] then mailx -s... (10 Replies)
Discussion started by: ltzwoman
10 Replies
antivirus_selinux(8)					     SELinux Policy antivirus					      antivirus_selinux(8)

NAME
antivirus_selinux - Security Enhanced Linux Policy for the antivirus processes DESCRIPTION
Security-Enhanced Linux secures the antivirus processes via flexible mandatory access control. The antivirus processes execute with the antivirus_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. For example: ps -eZ | grep antivirus_t ENTRYPOINTS
The antivirus_t SELinux type can be entered via the antivirus_exec_t file type. The default entrypoint paths for the antivirus_t domain are the following: /usr/sbin/amavisd.*, /usr/sbin/clamd, /usr/bin/clamscan, /usr/bin/clamdscan, /usr/bin/freshclam, /usr/sbin/clamav-milter, /usr/lib/AntiVir/antivir PROCESS TYPES
SELinux defines process types (domains) for each process running on the system You can see the context of a process using the -Z option to ps Policy governs the access confined processes have to files. SELinux antivirus policy is very flexible allowing users to setup their antivirus processes in as secure a method as possible. The following process types are defined for antivirus: antivirus_t Note: semanage permissive -a antivirus_t can be used to make the process type antivirus_t permissive. SELinux does not deny access to per- missive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. antivirus policy is extremely flexible and has several booleans that allow you to manipulate the policy and run antivirus with the tightest access possible. If you want to allow antivirus programs to read non security files on a system, you must turn on the antivirus_can_scan_system boolean. Disabled by default. setsebool -P antivirus_can_scan_system 1 If you want to determine whether can antivirus programs use JIT compiler, you must turn on the antivirus_use_jit boolean. Disabled by default. setsebool -P antivirus_use_jit 1 If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server, you must turn on the authlo- gin_nsswitch_use_ldap boolean. Disabled by default. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow all daemons to write corefiles to /, you must turn on the daemons_dump_core boolean. Disabled by default. setsebool -P daemons_dump_core 1 If you want to enable cluster mode for daemons, you must turn on the daemons_enable_cluster_mode boolean. Enabled by default. setsebool -P daemons_enable_cluster_mode 1 If you want to allow all daemons to use tcp wrappers, you must turn on the daemons_use_tcp_wrapper boolean. Disabled by default. setsebool -P daemons_use_tcp_wrapper 1 If you want to allow all daemons the ability to read/write terminals, you must turn on the daemons_use_tty boolean. Disabled by default. setsebool -P daemons_use_tty 1 If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 If you want to allow confined applications to run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default. setsebool -P kerberos_enabled 1 If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default. setsebool -P nis_enabled 1 If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Enabled by default. setsebool -P nscd_use_shm 1 NSSWITCH DOMAIN
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the antivirus_t, you must turn on the authlogin_nsswitch_use_ldap boolean. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow confined applications to run with kerberos for the antivirus_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type antivirus_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. antivirus_db_t /var/clamav(/.*)? /var/amavis(/.*)? /var/lib/clamd.* /var/lib/amavis(/.*)? /var/lib/clamav(/.*)? /var/virusmails(/.*)? /var/opt/f-secure(/.*)? /var/spool/amavisd(/.*)? /var/lib/clamav-unofficial-sigs(/.*)? antivirus_home_t antivirus_log_t /var/log/clamd.* /var/log/clamav.* /var/log/freshclam.* /var/log/amavisd.log.* /var/log/clamav/freshclam.* antivirus_tmp_t antivirus_var_run_t /var/run/clamd.* /var/run/clamav.* /var/run/amavis(d)?(/.*)? /var/run/amavis(d)?/clamd.pid /var/run/amavisd-snmp-subagent.pid cluster_conf_t /etc/cluster(/.*)? cluster_var_lib_t /var/lib/pcsd(/.*)? /var/lib/cluster(/.*)? /var/lib/openais(/.*)? /var/lib/pengine(/.*)? /var/lib/corosync(/.*)? /usr/lib/heartbeat(/.*)? /var/lib/heartbeat(/.*)? /var/lib/pacemaker(/.*)? cluster_var_run_t /var/run/crm(/.*)? /var/run/cman_.* /var/run/rsctmp(/.*)? /var/run/aisexec.* /var/run/heartbeat(/.*)? /var/run/cpglockd.pid /var/run/corosync.pid /var/run/rgmanager.pid /var/run/cluster/rgmanager.sk root_t / /initrd snmpd_var_lib_t /var/agentx(/.*)? /var/net-snmp(/.*) /var/lib/snmp(/.*)? /var/net-snmp(/.*)? /var/lib/net-snmp(/.*)? /var/spool/snmptt(/.*)? /usr/share/snmp/mibs/.index systemd_passwd_var_run_t /var/run/systemd/ask-password(/.*)? /var/run/systemd/ask-password-block(/.*)? FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. You can see the context of a file using the -Z option to ls Policy governs the access confined processes have to these files. SELinux antivirus policy is very flexible allowing users to setup their antivirus processes in as secure a method as possible. EQUIVALENCE DIRECTORIES antivirus policy stores data with multiple different file context types under the /var/lib/clamav directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv dirctory you would execute the following command: semanage fcontext -a -e /var/lib/clamav /srv/clamav restorecon -R -v /srv/clamav antivirus policy stores data with multiple different file context types under the /var/run/amavis(d)? directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv dirctory you would execute the following command: semanage fcontext -a -e /var/run/amavis(d)? /srv/amavis(d)? restorecon -R -v /srv/amavis(d)? STANDARD FILE CONTEXT SELinux defines the file context types for the antivirus, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk. semanage fcontext -a -t antivirus_conf_t '/srv/antivirus/content(/.*)?' restorecon -R -v /srv/myantivirus_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for antivirus: antivirus_conf_t - Set files with the antivirus_conf_t type, if you want to treat the files as antivirus configuration data, usually stored under the /etc directory. Paths: /etc/amavis(d)?.conf, /etc/amavisd(/.*)? antivirus_db_t - Set files with the antivirus_db_t type, if you want to treat the files as antivirus database content. Paths: /var/clamav(/.*)?, /var/amavis(/.*)?, /var/lib/clamd.*, /var/lib/amavis(/.*)?, /var/lib/clamav(/.*)?, /var/virusmails(/.*)?, /var/opt/f-secure(/.*)?, /var/spool/amavisd(/.*)?, /var/lib/clamav-unofficial-sigs(/.*)? antivirus_exec_t - Set files with the antivirus_exec_t type, if you want to transition an executable to the antivirus_t domain. Paths: /usr/sbin/amavisd.*, /usr/sbin/clamd, /usr/bin/clamscan, /usr/bin/clamdscan, /usr/bin/freshclam, /usr/sbin/clamav-milter, /usr/lib/AntiVir/antivir antivirus_home_t - Set files with the antivirus_home_t type, if you want to store antivirus files in the users home directory. antivirus_initrc_exec_t - Set files with the antivirus_initrc_exec_t type, if you want to transition an executable to the antivirus_initrc_t domain. Paths: /etc/rc.d/init.d/clamd.*, /etc/rc.d/init.d/amavis, /etc/rc.d/init.d/amavisd-snmp antivirus_log_t - Set files with the antivirus_log_t type, if you want to treat the data as antivirus log data, usually stored under the /var/log direc- tory. Paths: /var/log/clamd.*, /var/log/clamav.*, /var/log/freshclam.*, /var/log/amavisd.log.*, /var/log/clamav/freshclam.* antivirus_tmp_t - Set files with the antivirus_tmp_t type, if you want to store antivirus temporary files in the /tmp directories. antivirus_unit_file_t - Set files with the antivirus_unit_file_t type, if you want to treat the files as antivirus unit content. antivirus_var_run_t - Set files with the antivirus_var_run_t type, if you want to store the antivirus files under the /run or /var/run directory. Paths: /var/run/clamd.*, /var/run/clamav.*, /var/run/amavis(d)?(/.*)?, /var/run/amavis(d)?/clamd.pid, /var/run/amavisd-snmp-subagent.pid Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), antivirus(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) antivirus 14-06-10 antivirus_selinux(8)
All times are GMT -4. The time now is 06:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy