Questions tagged [pcre]
46 questions
2
votes
1 answer
postfix HOLD Recieved non authenticated
i'm wondering if is possibile to put on hold emails that not have authenticated in Recieved header .
i've tryed with a simple negate operazione with pcre
!/^Received:.*Authenticated*/ HOLD
but don't works , nothing is mentioned about negation in…

user147967
- 21
- 2
2
votes
3 answers
Postfix: postmap error with pcre
I am using postfix-pcre on debian linux.
When I run postmap /etc/postfix/smtp_header_checks.pcre and postmap pcre:/etc/postfix/smtp_header_checks.pcre, I get the following error:
postmap: warning: smtp_header_checks.pcre, line 1: record is in "key:…

Mike Pennington
- 8,305
- 9
- 44
- 87
2
votes
2 answers
nginx stream map with wildcard
I am really bad with regex. I am trying to do this in nginx:
stream {
map $ssl_preread_server_name $name {
api.dom1.com dom1_backend;
*.dom2.com dom2_backend;
}
upstream dom1_backend {
server api.dom1.com:443;
…

abubin
- 21
- 1
- 3
1
vote
0 answers
clamav installation with pcre in Amazon Linux
When we install ClamAV in our Amazon Linux ElasticBeanstalk instance with yum install clamav it gets installed without PCRE support, although the libraries are present in the instance.
LibClamAV Warning: cli_loadldb: logical signature for…

arod
- 582
- 6
- 19
1
vote
1 answer
dict_pcre.so missing on debian
I've installed postfix as I normally do, using apt-get install postfix, but for some reason it's not including dict_pcre.so in the install. Is there something I've overlooked, or rather how and where do I get this missing package to install with my…

Dick Faps
- 13
- 2
1
vote
2 answers
Varnish installer cannot find PCRE when it is already installed
I am trying to install Varnish-Cache 4 on my Mac OS X 10.9.3.
But I get this error:
checking for PCRE... no
configure: error: Package requirements (libpcre) were not met:
No package 'libpcre' found
Consider adjusting the PKG_CONFIG_PATH…

jnbdz
- 927
- 5
- 24
- 46
1
vote
2 answers
postfix pcre conditional REPLACE
I need to modify the "From:" header line in incoming e-mail messages only if "Message-Id:" starts with a defined string. So in main.cf I put:
header_checks = pcre:/etc/postfix/header_checks
and header_checks file contains:
if /^Message-Id:…

Gabriele
- 341
- 1
- 4
- 14
1
vote
4 answers
greping multiple lines from MySql binlog
I have binlog from MySQL and I need to output certain time frame into a seperate file, how would I do that?
here is sample of what binlog file contains:
# at 460
#130120 0:09:17 server id 1 end_log_pos 487 Xid = 79514636
COMMIT/*!*/;
# at…

alexus
- 13,112
- 32
- 117
- 174
1
vote
2 answers
Postfix, sender_bcc - send copy on multiple adress
I have sender_bcc_maps = pcre:/etc/postfix/conf/sender_bcc in my postfix
in this file I have rules such as
/foo@bar.tld/ bcchere@bar.tld
Now i need to send blind copy to more than one email.
I tried use whitespace and comma as delimeter, but…

DominikM
- 117
- 1
- 1
- 4
1
vote
1 answer
Apache RedirectMatch not matching double slash
I want to redirect URLs with multiple consecutive slashes (e.g. //) in the path to have only one consecutive slash, e.g.
https://example.com/a//b/c/ → https://example.com/a/b/c/.
My .htaccess file contains the following statement.
RedirectMatch 301…

fionn
- 13
- 5
1
vote
1 answer
PCRE isn't UTF8 enabled
I am attempting to run a regex on my site, and I am getting this response:
Compilation failed: support for \P,
\p, and \X has not been compiled at
offset 1
After googling for a bit, I've found that apparently my PCRE on my server is not UTF8…

johnnietheblack
- 491
- 2
- 5
- 11
0
votes
1 answer
How to match nginx location block for non-whitespace character
I'm trying to configure a workaround for google's WontFix search behavior in nginx by having a simple subfolder for my searches.
So far this is what I have.
location ~* ^/search/(.*\..*)$ {
return 307 http://$1;
}
location ~* ^/search/(.*)$…

Jacob Evans
- 7,886
- 3
- 29
- 57
0
votes
1 answer
Nginx: is there an advantage, real or theoretical, of using "^.+\.ext$" instead of "\.ext$" in a regular expression location block?
Is there any reason, real or theoretical, that:
location ~* ^.+\.js$ {
access_log off;
log_not_found off;
expires max;
}
would be preferable over:
location ~* \.js$ {
access_log off;
log_not_found off;
expires max;
}
I ask…

Harold Fischer
- 269
- 3
- 8
0
votes
1 answer
Compile PHP 7.1.5 with PCRE 8.40
I tried to compile a PHP 7.1.5 with PCRE 8.40 on a legacy Ubuntu 12.04.05 LTS:
1, I compiled PCRE 8.40 from source to /usr/local/pcre.
2, configure PHP:
./configure --prefix=/usr/local/php7 --with-pcre-regex=/usr/local/pcre…

user7257780
- 11
- 2
0
votes
1 answer
Apache location directive - PCRE negative combinations (match all but..)
Yes, I'm stuck still using apache2.2 on a system and I'm trying to use a PCRE with the apache Location directive looking for any URL not containing any images or similar. Here's some things I've tried and it just doesn't seem to do a negative…

MikeyinTN
- 1
- 3