cron-apt - adding X-headers


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cron-apt - adding X-headers
# 1  
Old 04-02-2009
cron-apt - adding X-headers

Hi,

We use a ticket system for our IT queries called OTRS. Emails sent to
that system are placed in ticket queues. OTRS reads X- headers in emails
as described here:

http://dev.jasonpruim.com/otrs/doc/X-OTRS-Headers.txt

We would like to be able to configure cron-apt to place certain X- headers
in the notification emails it sends. It will then send the email to the
OTRS system which will read those X- headers and act accordingly, eg
directly placing the ticket in a particular queue or whatever.

I am new to scripting so still finding my feet.

So far I have edited:

/usr/share/cron-apt/functions
Code:
mail -a "$XHEADER" "$MAILTO" < "$MAIL"
        mail -s "$SUBJECT" "$MAILTO"  < "$MAIL"

/etc/cron-apt/config
Code:
XHEADER="X-OTRS-Queue: Updates"

When the email is sent the X-header seems to replace the Subject header, I'm assuming this is to do with mail. Can I merge those two commands together? or am I totally wrong?

Sorry if I'm a bit vague just not sure what to be asking really!

Any help would be great,
Thanks in advance.
# 2  
Old 04-03-2009
Welcome.

What exactly is your question?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

Openssl s_client Adding Headers Manually

Daily stupid question: How can I successfully add/pass HTTP options to openssl? I am trying to get a response from our test web server /vpn/index.html for testing an application. I can successfully get it doing it the manually way like: openssl s_client -connect 192.168.3.20:443 blah blah... (0 Replies)
Discussion started by: metallica1973
0 Replies

2. Shell Programming and Scripting

Adding a cron job that will execute everyday at 14:50 hrs

Hi I want to execute a cron job everyday at 14:50 hrs. I have a script like this: TMP_FILE="/tmp/tmpcron.txt" RES=0 /usr/bin/crontab -l >> $TMP_FILE ADD_JOB="50 14 * * * /opt/mypath/scriptname.sh" grep "scriptname.sh" $TMP_FILE >> /dev/null JOB_NOT_EXIST=$? if test $JOB_NOT_EXIST... (2 Replies)
Discussion started by: saurabhkoar
2 Replies

3. Shell Programming and Scripting

Help with joining files and adding headers to files

Hi, I have about 20 tab delimited text files that have non sequential numbering such as: UCD2.summary.txt UCD45.summary.txt UCD56.summery.txt The first column of each file has the same number of lines and content. The next 2 column have data points: i.e UCD2.summary.txt: a 8.9 ... (8 Replies)
Discussion started by: rrdavis
8 Replies

4. Shell Programming and Scripting

Transpose multipe columns to rows and adding headers

Hi, I found the following awk script to transpose multiple (3) columns to multiple rows: #=== BEGIN {FS=","} { for (i=1;i<=NF;i++) { arr=$i; if(nf<= NF) nf=NF; } nr=NR } END { for(i=1;i<=nf;i++) { (8 Replies)
Discussion started by: Gery
8 Replies

5. Shell Programming and Scripting

Adding a new root cron job

Hi there, I have over 2000 systems (mainly Solaris) and I want to write a script that inserts a new root cronjob on each of those servers. obviously just adding a line to /var/spool/cron/crontabs/root looks like the easiest way, but i really dont want to have to send a HUP to crond on all boxes ... (3 Replies)
Discussion started by: rethink
3 Replies

6. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

7. Shell Programming and Scripting

adding a user to cron.allow

Hello all, I have solaris 10. I have have a script that installs crontab for a user. I want to add some more features to this script. I want to check whether the user exists in etc/cron.d/cron.allow ... if yes then continue the script without adding .... if not, then add that user to the... (6 Replies)
Discussion started by: MisterKhan
6 Replies

8. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

9. Shell Programming and Scripting

adding date to cron log

Hi. I'm trying to output the current date to a cronjob log file. Nothing seems to work, echo $(date), echo `date` or just date in the script. I'm using /sbin/sh Any ideas? Thanks, John (2 Replies)
Discussion started by: JohnH
2 Replies

10. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies
Login or Register to Ask a Question