LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-21-2009, 07:03 AM   #1
rajesh.bahl
Member
 
Registered: Jan 2007
Posts: 101

Rep: Reputation: 15
How to test regular expressions in Postfix


Dear All,

Need your help in resolving a problem:-

We are using postfix on CentOS 4.7. As there was lot of spam coming, so we decided to put various restrictions. One of them being header_checks. The main configuration file points to this file.

Can some one explain what is the procedure for checking the "correctness" of this file -- i.e. what ever is expected from the execution of this file is getting executed or not ? Also how to make the map "case-insensitive"? Is it really necessary to create .db file manually ?


thanking in advance
rajesh.bahl
 
Old 03-22-2009, 09:09 AM   #2
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
Quote:
Originally Posted by rajesh.bahl View Post
Can some one explain what is the procedure for checking the "correctness" of this file -- i.e. what ever is expected from the execution of this file is getting executed or not ?
Read "man pcre_table". As described there, use "postmap -fq" to test your file.

As well, Postfix errors will be logged to the maillog or syslog.

Quote:
Also how to make the map "case-insensitive"?
By default it is case-insensitive. Again, read man pcre_table for details.

Quote:
Is it really necessary to create .db file manually ?
If you're using pcre for header_checks (generally recommended) then no, you do not build .db files. Building .db files is done when your using db/dbm format instead of pcre.

Last edited by sleddog; 03-22-2009 at 09:10 AM. Reason: Revised answer about case-sensitivity
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with regular expressions mariogarcia Linux - Software 3 01-28-2009 04:23 AM
\{a,b\} regular expressions sycamorex Linux - General 10 10-18-2008 07:38 PM
Regular Expressions ziggy25 Linux - Newbie 7 11-05-2007 07:57 AM
Postfix transport map and regular expressions mpwiedemann Linux - Software 0 07-23-2004 11:39 AM
Regular Expressions overbored Linux - Software 3 06-24-2004 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration