Discussion:
Difference between settings in master and main .cf files
(too old to reply)
Michael Cashwell
2004-04-13 15:04:56 UTC
Permalink
Greetings,

I'm using a hashed regexp MIME header filter table that works fine if I
put "mime_header_checks = regexp:/etc/postfix/mime_header_checks" in
main.cf. However, I don't want it to apply to the submission service
(which is accessible only inside my firewall). To that end, I commented
it out in main.cf and added the "-o
mime_header_checks=regexp:/etc/postfix/mime_header_checks" line
following the smtp service. (The -o line did start with whitespace.)
But it didn't work. The filter would not trigger.

I don't understand why leaving the setting out of main.cf and applying
it to a specific service in master.cf didn't work. I have not yet tried
the reverse approach: setting the filter in main.cf and "unsetting" it
on the submission service. But even if it does, I don't understand why
the former didn't.

It's almost as if "postfix reload" only picked up changes to main.cf
and not master.cf but that's hard to believe. Or perhaps there's some
behavior I don't understand regarding "-o" options in master.cf.

Advice welcome.

Thanks,
Mike
Rob Foehl
2004-04-13 15:18:06 UTC
Permalink
Post by Michael Cashwell
I'm using a hashed regexp MIME header filter table that works fine if I
put "mime_header_checks = regexp:/etc/postfix/mime_header_checks" in
main.cf. However, I don't want it to apply to the submission service
(which is accessible only inside my firewall). To that end, I commented
it out in main.cf and added the "-o
mime_header_checks=regexp:/etc/postfix/mime_header_checks" line
following the smtp service. (The -o line did start with whitespace.)
But it didn't work. The filter would not trigger.
I don't understand why leaving the setting out of main.cf and applying
it to a specific service in master.cf didn't work. I have not yet tried
the reverse approach: setting the filter in main.cf and "unsetting" it
on the submission service. But even if it does, I don't understand why
the former didn't.
Neither do we, if you don't show us what you did.

-Rob
Ralf Hildebrandt
2004-04-13 15:20:22 UTC
Permalink
Post by Michael Cashwell
I'm using a hashed regexp MIME header filter table that works fine if I
You cannot has regexp type maps
Post by Michael Cashwell
put "mime_header_checks = regexp:/etc/postfix/mime_header_checks" in
main.cf. However, I don't want it to apply to the submission service
(which is accessible only inside my firewall). To that end, I commented
it out in main.cf and added the "-o
mime_header_checks=regexp:/etc/postfix/mime_header_checks" line
following the smtp service. (The -o line did start with whitespace.)
But it didn't work. The filter would not trigger.
mime_header_checks are done by cleanup not smtpd!
--
Ralf Hildebrandt ***@charite.de
my current spamtrap ***@charite.de
http://www.arschkrebs.de/postfix/ Tel. +49 (0)30-450 570-155
Why you can't find your system administrators:
Busy installing a new clutch to better shift paradigms with. (ala Dilbert) --Michael Faurot ***@phzzzt.atww.org
Wietse Venema
2004-04-13 15:26:31 UTC
Permalink
You forgot to include EXACT COPIES of the main.cf/master.cf
information in question, as well as logging that is evidence
of the problem.


Wietse
Michael Cashwell
2004-04-13 20:29:44 UTC
Permalink
Post by Michael Cashwell
I'm using a hashed regexp MIME header filter table that works fine if
I
You cannot have regexp type maps
I wondered about that since looking up by "key" doesn't really make
sense. I thought I read somewhere that it was done that way but clearly
I imagined that. I now have just a regexp file and with your help below
it now seems to be working fine.
Post by Michael Cashwell
I ... added the "-o
mime_header_checks=regexp:/etc/postfix/mime_header_checks" line
following the smtp service. But it didn't work. The filter would not
trigger.
mime_header_checks are done by cleanup not smtpd!
Argh! That's what I needed. I've now split out a second cleanup service
for this and have the smtp/submission behavior distinction I wanted.
Thank you very much!

To avoid this same error in the future, how would I have best found
this? Of course if I'd looked in cleanup's man page I would have seen
that it (not smtpd) used this setting, but that's exactly the knowledge
I lacked. Is there some documentation that maps the default settings to
the processes that use them? Or is it just to become familiar enough
with how Postfix factors its work that I would "know" this?

Thanks again!

-Mike
Ralf Hildebrandt
2004-04-14 06:22:42 UTC
Permalink
Post by Michael Cashwell
I wondered about that since looking up by "key" doesn't really make
sense.
It does. Sort of. Try

postmap -q - regexp:foo < mailbody
--
Ralf Hildebrandt ***@charite.de
my current spamtrap ***@charite.de
http://www.arschkrebs.de/postfix/ Tel. +49 (0)30-450 570-155
Why you can't find your system administrators:
Is engaged in a staring contest with a pack of evil dogs
V***@morganstanley.com
2004-04-14 07:33:39 UTC
Permalink
Post by Ralf Hildebrandt
Post by Michael Cashwell
I wondered about that since looking up by "key" doesn't really make
sense.
It does. Sort of. Try
postmap -q - regexp:foo < mailbody
For regexp map testing the best idiom is:

postmap -fq "$key" regexp:foo

This supports both case sensitive regular expressions and multi-line keys.
In the special instance of case insensitive body checks the less general
"postmap -q -" form is OK, since body checks are never multi-line.
--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
Continue reading on narkive:
Loading...