Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

carlsson

macrumors 6502a
Original poster
Jul 18, 2001
576
494
As the Title. Where can I find this setting?

Example: I am trying to send a mail from a scanner. The scanner doesn't add any subject, so the mail returns with an error. :(
 

carlsson

macrumors 6502a
Original poster
Jul 18, 2001
576
494
Sorry, it's 10.9.5. :eek:

Thanks for that, I'll take a look!
 

carlsson

macrumors 6502a
Original poster
Jul 18, 2001
576
494
It would help if you told what version of OS X server you are using.

Most will have something like that set in the postfix rules by default. Look in this file:

/etc/postfix/custom_header_checks
(this is where the version matters... ML and later are in /Library/Server/Mail/Config, unless the admin has rebuilt postfix and put it back in the default locations... like I do)

Search for a line with "empty subject header" and if it exists, comment it out (add "#" to the beginning). Then you can tell postfix to reload the configuration (postfix reload).

Thanks Dyt!

One thing though: Even though I have 10.9 the file was located in /etc/postfix. Furthermore, it only had one line and that was the 'empty subject header' pref...
 

carlsson

macrumors 6502a
Original poster
Jul 18, 2001
576
494
It's all good as long as it works. I have mine in /etc/postfix too on 10.7 and 10.10, I think because they are servers they are there. If you're not using any of the postfix rules (I use them extensively) then it might be barren...

Well, it turns out I was too quick. It doesn't work after all. Even restarted the server to no avail.

Error is:
550 5.7.1 empty subject header

Are those settings stored anywhere else maybe?
 

carlsson

macrumors 6502a
Original poster
Jul 18, 2001
576
494
Try "postconf -h header_checks" and make sure that is the file you've edited. It looks like the error from postfix, but if you can do a test with a mail client and send an empty subject mail, you can verify that postfix is causing the rejection.

That command gives no result. Ie:

bash-3.2# postconf -h header_checks

bash-3.2#

If I understand it correctly that *should* give info about rejecting empty headers, right!?

WAM, I'll try to edit the file again.

This is how the file looks now. The one and only line is this:

/^subject: *$/ REJECT empty subject header


These are the latest command from Terminal:

bash-3.2# postconf -h header_checks

bash-3.2# pico /etc/postfix/custom_header_checks
bash-3.2# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
bash-3.2# postconf -h header_checks

bash-3.2#


Any ideas?

Darn, I wish I could more of this... :confused:
 

dyt1983

macrumors 65816
May 6, 2014
1,365
165
USA USA USA
That command gives no result. Ie:

If I understand it correctly that *should* give info about rejecting empty headers, right!?

Actually, that command should tell you where the file for configuring header checks is (if set).

So "postconf header_checks" (no -h flag) would print

header_checks =

because it doesn't seem to be set. That means... postfix itself isn't using that file. Next step is to try to send mail yourself through your mail server, with an empty subject. If you get an error with that, the mail headers should give you a better idea where it is failing. It is possible that you have a milter running, or some other configuration that is rejecting it. You may need to check the whole configuration file for something.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.