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

 

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
spamc_selinux(8)					       SELinux Policy spamc						  spamc_selinux(8)

NAME
spamc_selinux - Security Enhanced Linux Policy for the spamc processes DESCRIPTION
Security-Enhanced Linux secures the spamc processes via flexible mandatory access control. The spamc processes execute with the spamc_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 spamc_t ENTRYPOINTS
The spamc_t SELinux type can be entered via the spamc_exec_t file type. The default entrypoint paths for the spamc_t domain are the following: /usr/bin/razor.*, /usr/bin/spamc, /usr/bin/pyzor, /usr/bin/sa-learn, /usr/bin/spamassassin 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 spamc policy is very flexible allowing users to setup their spamc pro- cesses in as secure a method as possible. The following process types are defined for spamc: spamc_t Note: semanage permissive -a spamc_t can be used to make the process type spamc_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. spamc policy is extremely flexible and has several booleans that allow you to manipulate the policy and run spamc with the tightest access possible. 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 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 http daemon to check spam, you must turn on the httpd_can_check_spam boolean. Disabled by default. setsebool -P httpd_can_check_spam 1 If you want to allow http daemon to send mail, you must turn on the httpd_can_sendmail boolean. Disabled by default. setsebool -P httpd_can_sendmail 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. Disabled by default. setsebool -P nscd_use_shm 1 If you want to allow user spamassassin clients to use the network, you must turn on the spamassassin_can_network boolean. Disabled by default. setsebool -P spamassassin_can_network 1 If you want to support ecryptfs home directories, you must turn on the use_ecryptfs_home_dirs boolean. Disabled by default. setsebool -P use_ecryptfs_home_dirs 1 If you want to support fusefs home directories, you must turn on the use_fusefs_home_dirs boolean. Disabled by default. setsebool -P use_fusefs_home_dirs 1 If you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Disabled by default. setsebool -P use_nfs_home_dirs 1 If you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default. setsebool -P use_samba_home_dirs 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 spamc_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 spamc_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type spamc_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(/.*)? cifs_t ecryptfs_t /home/[^/]*/.Private(/.*)? /home/[^/]*/.ecryptfs(/.*)? fusefs_t /var/run/[^/]*/gvfs nfs_t spamass_milter_state_t /var/lib/spamass-milter(/.*)? spamc_home_t /root/.pyzor(/.*)? /root/.razor(/.*)? /root/.spamd(/.*)? /root/.spamassassin(/.*)? /home/[^/]*/.pyzor(/.*)? /home/[^/]*/.razor(/.*)? /home/[^/]*/.spamd(/.*)? /home/[^/]*/.spamassassin(/.*)? spamc_tmp_t 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 spamc policy is very flexible allowing users to setup their spamc processes in as secure a method as possible. STANDARD FILE CONTEXT SELinux defines the file context types for the spamc, 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 spamc_exec_t '/srv/spamc/content(/.*)?' restorecon -R -v /srv/myspamc_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for spamc: spamc_exec_t - Set files with the spamc_exec_t type, if you want to transition an executable to the spamc_t domain. Paths: /usr/bin/razor.*, /usr/bin/spamc, /usr/bin/pyzor, /usr/bin/sa-learn, /usr/bin/spamassassin spamc_home_t - Set files with the spamc_home_t type, if you want to store spamc files in the users home directory. Paths: /root/.pyzor(/.*)?, /root/.razor(/.*)?, /root/.spamd(/.*)?, /root/.spamassassin(/.*)?, /home/[^/]*/.pyzor(/.*)?, /home/[^/]*/.razor(/.*)?, /home/[^/]*/.spamd(/.*)?, /home/[^/]*/.spamassassin(/.*)? spamc_tmp_t - Set files with the spamc_tmp_t type, if you want to store spamc temporary files in the /tmp directories. 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), spamc(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) spamc 14-06-10 spamc_selinux(8)
All times are GMT -4. The time now is 06:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy