The pipe tag has no wiki summary.
0
votes
2answers
17 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]: ...
0
votes
0answers
18 views
Piping Wildcard Email to Scripts [duplicate]
I am working on a server with this stack...
Ubuntu 12.0.4
Posfix
Apache
MySQL
ProFTPd
BIND DNS
I need to figure out how I can Pipe email to a PHP script.
Let's say I make a domain testing.com and ...
0
votes
0answers
8 views
Beginner problems on pipe, fork and if statement [migrated]
I am learning about socket programming and I am well-know to c-programming.
Based on my c-programming knowledge, once the process inside else statement is processed. The process inside if statement ...
0
votes
2answers
60 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 ...
0
votes
0answers
91 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 ...
0
votes
1answer
105 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 ...
1
vote
1answer
67 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 ...
0
votes
1answer
97 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
179 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 ...
0
votes
1answer
252 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 ...
2
votes
2answers
97 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?
1
vote
2answers
137 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 ...
3
votes
8answers
410 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
164 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 ...
0
votes
2answers
259 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 ...
-1
votes
1answer
95 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 ...
2
votes
1answer
134 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 ...
1
vote
2answers
174 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 ...
2
votes
1answer
230 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
737 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 ...
7
votes
3answers
1k 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 ...
2
votes
6answers
202 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 ...
0
votes
0answers
90 views
Pipe emails with Postfix and virtual addresses
I'm trying to setup Hesk Help Desk and want to pipe emails to their system from a specific email account. We currently have our server setup with Postfix as the MTA and Dovecot as the POP/IMAP agent. ...
0
votes
1answer
382 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 ...
15
votes
1answer
532 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. ...
2
votes
2answers
629 views
Why is this tee losing stdout?
Simple script:
#!/bin/bash
remote_ssh_account="depesz@localhost"
directory_to_tar=pgdata
exec nice tar cf - "$directory_to_tar" | \
tee >(
md5sum - | \
ssh ...
4
votes
1answer
125 views
How to concatenate streams?
I know cat can concatenate files, but I need to concatenate a mix of files and streams and pipe the result to another process.
To make the question more concrete, I want to concatenate cat abc.sql ...
1
vote
3answers
99 views
Why is ``head`` hanging and not terminating?
I have a shell script that has to find the newest file on a remote host. I have this bit:
ssh -q $HOSTNAME -t ls -t -1 /path/to/somewhere/ | head -n 1
It prints the first line, then waits and ...
2
votes
3answers
90 views
is it safe to pass passwords in plaintext to a script if you use subshells?
I have a script and it does a read -p to a variable named PASSWD:
smbclient -L 192.1.1.1 -U username%$PASSWD
I believe that I won't be able to see this in the history. On this link, it says that ...
-1
votes
1answer
124 views
why does pipebackand always return ANY qtype?
when sent a query dns to pdns with type equal A , the latter sent to pipe backend using pipe protocl and qtype always egual ANY why?i use powerdns 2.9.22 and my os is ubuntu thank you in advance
0
votes
1answer
204 views
Enabling Pipe(|) functionality with Postfix for a .forward file
I'm running into an issue trying to get pipe forwarding working on postfix. Rather than running the script I'm intending to run, it's appending to my script. Testing on other servers this seems to ...
0
votes
1answer
112 views
Postfix, set privileges for piping
I configured postfix on my box to call a php script on incoming e-mails, using virtual aliases. The script is being called, but it runs as "nobody" and thus I can't send signals to another program ...
3
votes
3answers
197 views
linux: piping data to multiple machines through ssh
I have a few terabytes of data that are processed by a tool. The output of the tool should be sent to two other machines simultaneously (simultaneously, because there's downtime while the tool runs ...
1
vote
1answer
128 views
How to run truss with piped command in Solaris
How to run a truss command with piped output?
eg.
# truss -leDo /tmp/truss.out tar cvf - dirs/ | gzip -1 > archive.tar.gz
I get only the "tar" output in truss, not from gzip!
0
votes
1answer
149 views
Forward mail to mailbox in addition to piping
I've set up postfix to pipe emails through rdm-mailhandler.rb (redmine), but I'd also like the emails to be delivered to the mailbox.
transport:
support@myhost.com redmine
master.cf:
redmine ...
0
votes
2answers
837 views
Piping in postfix/aliases [duplicate]
Possible Duplicate:
How to configure postfix to pipe all incoming email to a script?
I'm having problems setting up simple piping for Redmine (or '|cat > /tmp/temp')
/etc/postfix/virtual:
...
1
vote
3answers
237 views
How to get the output of a php script executed by a piped mail?
I've configured an email address to pipe (forward) all emails to /path/to/script.php
I thought I'll receive the output of the script as an email reply but it doesn't work.
How can I get the output ...
3
votes
2answers
108 views
Programme that accepts stdin, then writes to a datetime stamped file?
I wonder is there a programme that'll do what I want. This is like an streaming log rotation programme. For the linux/unix command line.
Let's say I have some input that is streaming some data. I ...
4
votes
5answers
382 views
Bash: Execute piped lines from stdin
I haven't found a solution to this after some searching. I think the search terms are just too general. I'd like to know how to execute a number of lines (at the bash prompt) which are generated by ...
0
votes
2answers
1k views
How do I pipe the output of uptime/df to curl?
I want to send the output of uptime and df commands to a web app using cURL. I tried:
uptime | curl http://someurl.com -T -
But that didn't seem to send the data.
What is the proper way to send ...
4
votes
4answers
603 views
100mb/s upgrade to 1gbps network - To Prevent DDOS
I have been under constant DDOS attack the last couple of weeks.
Now it seems my servers network is being flooded till it just doesn't have space anymore to receive and send normal packages.
I run ...
3
votes
2answers
232 views
Linux Pipe, Warning Messages, stdout
This is probably the best place to ask the question in its simplest form. I am writing a script which takes output of a command and puts it into a variable. After some debugging I figured out the ...
2
votes
1answer
613 views
pipe multiple files, single ssh connection, remote commands
I'd like to pipe several files to a remote server, piped as input to commands run on the remote server, over ssh, but only one ssh connection/command is permitted. (In the remote authorized_keys file, ...
0
votes
1answer
670 views
Why is this apache php piped log script not working properly?
i have a piped logging program like this:
#!/usr/bin/php
<?php
$fd = fopen("php://stdin", "r");
while(true) {
$l = fread($fd,8192);
$l = trim($l);
if($l =="") continue;
...
6
votes
1answer
437 views
using temporary files vs pipes advantages and disadvantages
say I have a file named jobs.csv
and I would like to get the top 50k jobs done by Foo
I can either do:
# cat jobs.csv | sort -u | head -n 50000 > /tmp/jobs.csv
# cat /tmp/jobs.csv | while read ...
4
votes
2answers
1k views
How can I handle spaces in file names when using xargs on find results?
One of my common practices is to perform greps on all files of a certain type, e.g., find all the HTML files that have the word "rumpus" in them. To do it, I use
find /path/to -name "*.html" | xargs ...
1
vote
1answer
452 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 ...
0
votes
3answers
333 views
how to “batch” output of “tail -F” or output all data in a stream every X seconds?
I am trying to monitor a log file in real-time.
Say I issue a command such as:
tail -F mysystem.log|grep -i error|mail ...
This is supposed to monitor my log file, every time it sees an error, email ...
0
votes
2answers
72 views
Piping emails from a development server to a text file
Is there a way to capture all mail from a unix server and pipe it to a log file? Or maybe at least all mail from PHP? I know of a trick where in php.ini sendmail is tricked byt this line:
...
0
votes
2answers
285 views
How pipe email to PHP with Maildirs
I used to pipe incoming emails using:
|/path/to/php/script in .forward file at /home folder.
But the actual system I'm working on is based on MaƬldir instead MBOX. So that solution does not work.
I ...