The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
792 views

postfix pipe to script: execvp permissions denied error

I am new to postfix and am trying to pipe a message to a particular email address to a bash script. I am running CentOS 6 in case that matters. My script has 777 permission (for testing), and when I ...
-1
votes
3answers
77 views

Can't pipe echo to netcat?

I have the following command: echo 'HTTP/1.1 200 OK\r\n' | nc -l -p 8000 -c and when I curl localhost:8000 I am not seeing HTTP/1.1 200 .. being printed. I am on mac os x with netcat 0.7.1 Any ...
0
votes
2answers
132 views

Powershell pipe exporting to csv is loosing data

I'm trying to write a script that will take input from a .txt file of IP address. Do a reverse DNS lookup to get the hostname of the IP address and then export that data into .csv file. Here is what ...
0
votes
0answers
13 views

pipe rrd to a new directory

I am chrooted and running out of drive space, so I mounted back to the host drive which has plenty of space but cannot seem to pipe the outputted data to my empty drive [root@localhost rra]# ls ...
0
votes
0answers
47 views

How to make Postfix to POST incoming mail to an external server?

I have a web app on Server A and a Postfix mail server on Server B. I want all incoming emails be forwarded to the web app via a POST request. I also need to capture attachments. I was able to ...
1
vote
1answer
78 views

Exim4 setup not working with piping

I'm trying to setup exim4 on the server, so that it can receive mail for a couple sub domains, and I want to pipe that to a PHP script. I want all incoming mail to be processed through my custom ...
0
votes
2answers
105 views

how to pipe a mysql dump to s3cmd

I want to transfer a mysql dump, compressed, to s3. I tried: mysqldump -u root -ppassword -all-databases | gzip -9 | s3cmd put s3://bucket/sql/databases.sql.gz but then I get: ERROR: Not enough ...
0
votes
1answer
27 views

Cat pipe mysql : Stopped. What stopped and how can I fix that?

I imported a large database from remote using a cat + mysql command : cat my_db.sql | mysql --host=external_host --user=my_user --password=some_password my_database And after some time, it returned ...
1
vote
5answers
144 views

How to split the output into different files?

I have a input file like foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz bar xxx yyy zzz bar xxx yyy zzz foo xxx yyy zzz .. How to split the input file by line, into foo.txt ...
0
votes
0answers
27 views

Mail not piping in postfix

I have setup a postfix server and wanted to test the piping of mail to my perl script where i can make use of it and filter the mails.I wrote a test script for that which just logs the information in ...
0
votes
1answer
65 views

Postfix Pipe then forward to original recipient

I may well be on the wrong track here with what I'm trying to do, so I'd appreciate any advice. Is it possible to pipe email to a script (which I have working), and then have Postfix forward it on ...
3
votes
0answers
726 views

DSGET escapes hash signs (#) in outputted Distinguished Names (DN)s but expects unescaped hash signs for input

Lets say I want to do the very simple query in AD dsquery user -name "John Smith" | dsget user -memberof -expand This will output the DNs of the AD groups that this user belongs to. I can make it ...
23
votes
7answers
17k views

Unzipping files that are flying in through a pipe

Can I make unzip or any similar programs work on the standard output? The situation is I'm downloading a zip file, which is supposed to be unzipped on the fly. Related issue: ...
2
votes
2answers
256 views

SELinux preventing /etc/aliases email pipe to script from working

When somebody sends an email to my server, e.g. somestringthatisnotnecessarilyauser@myserver.com I want it to pipe to a PHP script. So in my /etc/aliases file I have: ...
0
votes
1answer
36 views

How to comma-demilit the output from cut?

So far, I have this: grep -B 36 'pattern1' Mapper.1.Configuration.MapRules | grep "pattern2" | cut -d'"' -f2 which give me a new-line delimited list of values that I need. I could put this into a ...
1
vote
2answers
56 views

how to pipe results from LS to CD in ubuntu

I'd like to ls for the latest created directory in a given directory (we create a new folder for each release) and then cd to that directory. I'd like to create an alias for this so I don't have to ...
-1
votes
1answer
62 views

Make a copy of email using pipe in postfix alongside 1 content_filter

I am using postfix and already usHi. I am using postfix and already using a script as a content_filter which re-injects back to smtpd to all users, but before this happens, I would like to make a copy ...
0
votes
2answers
327 views

pipe raw email message to python script

In exim4, I use following pipe to send a message to a python script, process it, and upload it to django: send_to_django_mailbox: driver = pipe command = /usr/local/bin/python ...
7
votes
5answers
407 views

Grep-ing gzipped files [duplicate]

I have a set of 100 log files, compressed using gzip. I need to find all lines matching a given expression. I'd use grep, but of course, that's a bit of a nightmare because I'll have to unzip all ...
0
votes
1answer
958 views

Postfix: Pass a copy of an email to a script but deliver the original one to mailbox

It's actually quite simple: I want to pass all incoming emails to a PHP-script, but only as a copy, the original email shall still be delivered to the mailbox as usual. I just can't seem to get it ...
0
votes
2answers
150 views

Procmail - Replace From with text from within email

I am trying to use Procmail to filter through mail that goes to my ticket channel in WHMCS. It works fine as far as piping goes. But emails from the Zopim live chat module on the site need filtering ...
0
votes
1answer
66 views

Tell Postfix to pipe From certain emails to certain scripts

I am currently using Postfix to pipe incoming email form our support email address to our WHMCS install to the support department. This has been working great for sometime. Problem is now we have a ...
-1
votes
1answer
934 views

Piping Mail with Exim: Only Works Locally

Whenever I send an email to my catchall alias via SSH (i.e., locally), Exim successfully pipes the e-mail to a PHP script, as I told it to do. However, when I try to send an e-mail to my catchall ...
2
votes
1answer
44 views

Postfix - Transferring NOTIFY command to script using pipe

I have set up system where all mails are piped to my script. In master.cf I have: phptran unix - n n - - pipe flags=DFORq user=nobody argv=/usr/bin/php5 /root/phptran.php ${sender} ${recipient} I ...
1
vote
8answers
9k views

PsExec and Remote Environment Variables, Logging, Etc

When I run PsExec on a remote computer, I always fall short of what I want. What I would like ideally in most situations is a) a log on an admin server where each individual log has the name of each ...
0
votes
2answers
469 views

Postfix piping to php issue: “cannot append message to file: cannot open file: Permission denied”

I am having some issues with setting up piping to a php app (WHMCS). The mail is coming to the server however it is bouncing. The maillog shows:- May 15 12:51:14 hostname postfix/smtpd[2123]: ...
3
votes
8answers
950 views

Redirect all incoming mail into a script

I have no idea about Mail Delivery. but i need redirect ALL incoming e-mail (*@mydomain.com) into an a php script. i'm using debian Exists a simple mail server to do this? (without exim, postfix, ...
0
votes
2answers
273 views

Netcat output pipe, json parsing

What I want is this: netcat to the server, which streams json formatted loglines. pipe the output of nc to "something" that will format the json as plaintext, in a customizable format (thinking ...
7
votes
3answers
3k views

how to pipe data to sftp connection?

ftp supports the put "|..." "remote-file.name" command to pipe data to an ftp connection. Is there something similar available for sftp? In sftp i get the following error: sftp ...
5
votes
3answers
3k views

Redirect output of mysqldump to scp

I worked with a linux pro years ago who did this nifty trick. He could do a mysqldump but redirect the output to an scp/ssh connection rather than writing to disk. We utilised this quiet a bit where i ...
0
votes
1answer
284 views

Postfix sendmail sets original recipient

I have a postfix + dovecot with a spamassassin doing some content filtering on the postfix side. The problem is that with a recent update the originally available sendmail binary was replaced with the ...
16
votes
4answers
14k views

How to pipe stderr without piping stdout

How do I pipe the standard error stream without piping the standard out stream? I know this command works, but it also writes the standard out. Command 2>&1 | tee -a $LOG How do I get ...
17
votes
1answer
1k views

Shell command slow when using pipe, fast with intermediate file

Does anyone understand this huge difference in processing time, when using an intermediate file, or when using a pipe? I'm converting tiff to pdf using standard tools on a fresh debian squeeze server. ...
1
vote
1answer
96 views

Can I use MX records to deliver some addresses to Google Apps and some to my server?

I have whm installed on my VPS, which my domain MX records are pointing to: 0:mail.mydomain.com and whm/cpanel has mail forwarding rules which pipes certain @mydomain email addresses into my CRM ...
1
vote
1answer
343 views

Postfix won't pipe to PHP file through aliases file

I'm trying to pipe from postfix to a command. According to Postfix logs it worked, but when I check the command it didn't. This is a fresh postfix install. This is my alias file: # See man 5 aliases ...
0
votes
1answer
834 views

reading stdin in shell

#!/bin/sh #myVar=`date`#case 1 #myVar=`cat /dev/stdin`#case 2 myVar=($(< /dev/stdin)) #case 3 echo $myVar exit 2 case 1 works case 2 and 3 don't work. When I test with either 2 or 3; there is no ...
2
votes
1answer
213 views

transparent signals over ssh

By transparently I mean forwarding of: stdin, stdout and stderr standard signals (SIGHUP or SIGINT would be great for a start) As an example, consider these invocations of a (pointless) local and ...
0
votes
1answer
678 views

file transfer with ssh pipe; without scp

Scenario: I'm having about hundred odd text files which are compressed as .gz. They need to be transferred to a remote server. I do not want to use scp. Both, linux servers. my requirement/my idea: I ...
1
vote
2answers
300 views

nginx - log access and error to pipe and use multilog to log rotate

What I am trying to do: Log rotate nginx access and error log using multilog My approach: Log nginx access and error to a pipe, so I can have another process that runs multilog that reads from that ...
2
votes
2answers
145 views

Adding a progress bar to a data pipe

Are there any alternatives to pv? I'd like to see the current transfer rate of a data pipe, a progress bar and an estimated completion time. Any other tools that can do that?
0
votes
2answers
492 views

Postfix bounce local delivery with source address from orig_to

I am creating a python script to deliver local mail using various means. The problem is this: This script has to accept multiple virtual domains defined in /etc/postfix/virtual The script does the ...
0
votes
2answers
223 views

Skipping a “Press certain key to continue” in a bash script

I'm installing RVM for Ruby with the following command: curl -L https://get.rvm.io | sudo su myuser -c "bash -s stable --rails" I specifically need it to be installed under that user - and it will ...
1
vote
1answer
511 views

WATCH command with pipes

Hithere, how do I watch this command: netstat -plan|grep :80|egrep -v "(:8082)|(:8080)|(:8081)"|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -n It errors out when surrounding it with single/double ...
1
vote
2answers
285 views

Continual tailing and sorting of multiple files on linux?

Is there a way to use pipes or FIFO in combination to continually monitor several (same format) log files whilst sorting on the first field and then being able to effectively do a tail -f on that ...
0
votes
5answers
2k views

How to recursively search and replace from command line on unix/linux system

So I want to change several files at one with one command. This is what I have so far: find -regex ".*\.ext$" | xargs grep -l searchText 2> /dev/null | xargs -i sed 's/searchText/replaceText/' ...
2
votes
1answer
569 views

pipe from tar to ftp

I have ftp access to a server I do not control. I'd like to start sending archives of my server's FS to that ftp. The problem is I don't have enough free space on my system to create a backup archive ...
0
votes
1answer
1k views

Postfix “mail-to-script” pipe only delivers empty messages

i have a problem here. I want that a incoming email is piped to a php script in the system through postfix. My System is running with ispconfig 3, postfix and dovecot (< virtual mailbox users are ...
3
votes
6answers
982 views

Pass a pipe to a command that expects a filename

Say I have a command foo which takes a filename argument: foo myfile.txt. Annoyingly, foo doesn't read from standard input. Instead of an actual file, I'd like to pass it the result of another command ...
2
votes
7answers
2k views

Running script in background without sticking to shell

i want to run a shell script remotely via ssh and the ssh shell should end when the script ends. The script itself runs another script whose output is piped to a log file. Example: I run the script ...
0
votes
1answer
1k views

syslog-ng not flushing the pipe to external program (SOLVED)

I have written a python script that takes log entries from syslog-ng and writes them to MongoDB (I couldn't do it with afmongodb driver because I need to do some special processing). This is how it ...