The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
13 views

Cron: Execute python script, capture stdout & stderr and send via msmtp

I try this for almost 4 hours now, in different ways. I googled a lot, but nothing I try work as expected. I have a simple .msmtprpc file, that allows me to send mails like this: echo -e "Subject: ...
0
votes
1answer
27 views

wget and pipe to tar in the background

I am trying to download a large file which is .tar.gz and (> 2GB) in size. The bash script also does lots of other things, so I want to kick off the download and then continue processing other ...
1
vote
1answer
141 views

Apache errorlog piping fail

Trying to log to a central syslog server, either direct using Apache's ErrorLog to pipe to logger, or getting syslog to forward, but nothing is working and the errors are not making sense to me. I can ...
1
vote
2answers
118 views

How to pipe postfix into Codeigniter controller

I currently have postfix piping into a PHP script to process the email via an alias. catchall: |/var/www/vhosts/website/httpdocs/scripts/incoming_mail.php However, I wish to use the DB config etc ...
0
votes
0answers
65 views

Remote packet capturing using fifo and dumpcap

I'm currently working on two linux servers where one server is running in 2.6.18-274.el5(Server A) and the second one in CentOS 7 (Server B). My requirement is to capture the packets of the network ...
4
votes
2answers
170 views

Postfix - Pipe multiple recipient message as a single message

I am trying to pipe emails through Postfix to a Python script I have. Currently, messages with multiple recipients are piped to the script once for each recipient. I would like these messages to be ...
0
votes
0answers
15 views

Command piped - nagios information status not expected

First of all, thanks for reading. I am configuring a new service, basicly this checks the number of entries on de home directory, is very simple. define service{ use ...
1
vote
1answer
49 views

Postfix pipe mail at user level

I am trying to filter mail at the user level. I have CentOS and Postfix installed. I managed to install a filter on the server and its working great, except, instead of filtering by user, all emails ...
0
votes
1answer
105 views

Pipe multiple files into one tar gz

I'd like to call mysqldump to create multiple backup files and then archive them in one tar.gz. I am following this tutorial on mysqldump part: ...
0
votes
2answers
49 views

Unzip piping order

I have a file, foo.zip which looks something like this: foo.zip -- fileA.txt -- fileB.txt I can pipe the output of the extracted files like this: unzip -p foo.zip *.txt | something My problem is ...
3
votes
1answer
127 views

does email pipe to program cause problems with unicode characters?

I'm piping incoming mail into a PHP script, immediately storing the RAW email in a MySQL db. It works very well, except ~0.7% of emails arrive with a truncated message body. I found someone whose ...
1
vote
1answer
26 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 redirect the outputted data to my empty drive [root@localhost rra]# ls ...
-1
votes
3answers
2k 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 ...
1
vote
1answer
196 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
3answers
930 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
86 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
230 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 ...
1
vote
1answer
125 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 ...
0
votes
2answers
257 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 ...
2
votes
2answers
640 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
69 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
120 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
139 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
574 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
476 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
2k 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
297 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
109 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 ...
2
votes
1answer
59 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 ...
0
votes
2answers
664 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
2answers
432 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 ...
2
votes
1answer
2k 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
361 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 ...
2
votes
1answer
148 views

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

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 ...
2
votes
1answer
614 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
2k 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
1k 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
170 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
595 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 ...
4
votes
8answers
1k 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
243 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
565 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
vote
1answer
924 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
285 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
355 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
897 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 ...
7
votes
3answers
4k 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 ...
7
votes
5answers
2k 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
1answer
2k views

syslog-ng not flushing the pipe to external program

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 ...