How to resolve fatal postfix error in Console every 10 seconds

On both my iMac and MacBookPro, I get the following Console error message every 10 seconds:


fatal: file /etc/postfix/main.cf parameter mail_owner: user postfix has same user ID as _postfix


I am using Sierra 10.12.6 on both computers.


The error occurs as soon as I boot up, even if Mail is not yet running. Shift-booting does not help. I reinstalled Sierra on the iMac but that also did not help.


Though I don't understand this very well, I then tried to edit main.cf but was not allowed because it was in use by the OS. I tried to edit a copy of it but received the same message. I then entered "sudo postfix stop" in Terminal but received the error message "postfix: fatal: file /etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfix"


Both computers operate fairly fast most of the time so the slow down is not unacceptable.

iMac, macOS Sierra (10.12.5), Intel 27" Core i7

Posted on Nov 30, 2017 2:26 PM

Reply
15 replies

Nov 30, 2017 8:01 PM in response to budsimrin

Did you look at main.cf & find that it had been altered ?. I presume that you were trying to change mail_owner = … to mail_owner = _postfix .


If you have looked & seen that it's changed, then in Finder, you should see a file just after main.cf named main.cf.default. Usually, you can duplicate this after authenticating as an admin; then trash main.cf; then rename the duplicate to main.cf… assuming that main.cf.default appears unchanged, to make any of that worthwhile.

My stock Sierra 10.12.6 install has all the files in that directory modified on September 23 2016.


BBEdit would allow you to edit in place, after authenticating to install a helper tool.

Dec 1, 2017 9:29 AM in response to budsimrin

That's odd : I checked using Sierra 10.12.6 here before suggesting duplicate/trash etc

Copy main.cf to the Desktop or some other folder, you may be able to read it then, to at least see what mail_owner is set to.


cat /etc/postfix/main.cf | grep mail_owner should work too, of course, but seeing as things seem off...


ls -leO /etc/postfix/ looks like below here : being a fresh install of Sierra in February 2017, & then usual updates. I see that a recent Sierra 10.12.6 installer has slightly later dates ( October 14 2016) but yours clearly seem off, as if some install or other incident changed them, (along with who knows what else…) even if only invalid timestamps.


total 224

-rw-r--r-- 1 root wheel compressed 11942 Sep 23 2016 LICENSE

-rw-r--r-- 1 root wheel compressed 1629 Sep 23 2016 TLS_LICENSE

-rw-r--r-- 1 root wheel compressed 21519 Sep 23 2016 access

-rw-r--r-- 1 root wheel compressed 10086 Sep 23 2016 aliases

-rw-r--r-- 1 root wheel compressed 3547 Sep 23 2016 bounce.cf.default

-rw-r--r-- 1 root wheel compressed 11796 Sep 23 2016 canonical

-rw-r--r-- 1 root wheel compressed 44 Sep 23 2016 custom_header_checks

-rw-r--r-- 1 root wheel compressed 10017 Sep 23 2016 generic

-rw-r--r-- 1 root wheel compressed 22845 Sep 23 2016 header_checks

-rw-r--r-- 1 andy wheel compressed 27308 Sep 23 2016 main.cf

-rw-r--r-- 1 root wheel compressed 27308 Sep 23 2016 main.cf.default

-rw-r--r-- 1 root wheel compressed 26863 Sep 23 2016 main.cf.proto

-rw-r--r-- 1 root wheel compressed 4736 Sep 23 2016 makedefs.out

-rw-r--r-- 1 root wheel compressed 7443 Sep 23 2016 master.cf

-rw-r--r-- 1 root wheel compressed 7443 Sep 23 2016 master.cf.default

-rw-r--r-- 1 root wheel compressed 6200 Sep 23 2016 master.cf.proto

-rw-r--r-- 1 root wheel compressed 20330 Sep 23 2016 postfix-files

drwxr-xr-x 2 root wheel - 68 Sep 23 2016 postfix-files.d

-rw-r--r-- 1 root wheel compressed 6929 Sep 23 2016 relocated

-rw-r--r-- 1 root wheel compressed 12666 Sep 23 2016 transport

-rw-r--r-- 1 root wheel compressed 12619 Sep 23 2016 virtual

Dec 1, 2017 10:46 AM in response to budsimrin

I don't understand how a copy you just made to say Desktop can be in use by anything, but a restart solves similar problems with disk images here.

Quite right, 27KB. They show a generic document icon in Quicklook. I might start in single user mode & copy ~.orig to the others & hope that's the only thing altered.

Dec 1, 2017 8:54 AM in response to PN2

pn2,


Thank you. You are suggesting what I am trying to do but so far no luck. So far I cannot edit or even view main.cf and main.cf.default. My Finder dates for main.cf and main.cf.default are creation in 1969 and modified on 7/3/17 so that seems wrong.


There was no “Duplicate” command in the Finder contextual menu, and copy/paste also didn’t work in the Finder, so I used cp in Terminal. I had to use

sudo cp main.cf.default main.cf.defaultcopy

to make it work. I was afraid to trash main.cf at this point as you suggested because I don’t yet know the value of mail_owner. So I tried to edit main.cf.defaultcopy using Textwrangler but I got the error message that main.cf.defaultcopy is being used by macOS and can’t be opened.


At this point I still don’t know whether mail_owner = postfix or _postfix or something else. I suspect the former. Any idea how I should proceed? If I should delete main.cf, I guess I’m willing to try that although I suspect I’ll be denied permission.

Dec 1, 2017 10:29 AM in response to PN2

Copying to another directory doesn't help. I still get message that file is in use. I even tried to read a backup copy from an external drive with the same result. The cat command returned no result at all. I've been thinking that the files main.cf and main.cf.default are possibly too small. I think they are supposed to be about 27 KB but mine are only 11 KB. QuickView shows the files to be blank and I think QuickView should display them? I would love to delete them and let Sierra recreate them all over, but I'm afraid Sierra just carries them over from whatever they were previously.


I suspect that I may have modified these files last October because I have a file named main.cf~orig created back then. That is the kind of backup name I might have chosen but I don't recall doing this. main.cf~orig is readable and has mail_owner=_postfix.

Dec 1, 2017 4:53 PM in response to PN2

I now think that a postfix server possibly got installed on my Mac. I think this because there are several additional ~orig files and for sure I had nothing to do with them. The installation took place last October on my prior Mac and I carried it forward. The license files reference Wietse Venema and Secure Mailer license. It also mentions Postfix/TLS, by Lutz Jaenick, based on the OpenSSL Project. I worry that just copying the main.cf files without also fixing all the others may do more harm than good. Is there a way to either delete or disable the server (if that is what I am up against)?


I have attached an image of my ls -leO /etc/postfix/User uploaded file

Dec 1, 2017 7:43 PM in response to PN2

I agree, progress. But, I am not experienced using a command line. I have in fact never used it in Single User mode before except for typing fsck. I did manage successfully to cd over to the boot disk /etc/postfix directory. I then used the mv command on each of the ~orig files but I don't think the over-writes were accepted? I don't know if that was the right command to use, but here is a typical example from my session.


local host: postfix root# mv main.cf~orig main.cf

override rw-r--r-- root/wheel for main.cf? (y/n)? I answered y

mv: rename main.cf~orig to main.cf: Read-only file system


After I rebooted, the fatal console messages were still there. The directory looks unchanged as far as files dates and file sizes.


So, I was root but restricted to read-only? Surely there is a way around that? I could do a clean install but that is soooo painful.

Dec 2, 2017 1:54 PM in response to PN2

That fixed it. Thank you so much for walking me through this.


As for the culprit... As I examine the apps that I have installed since last Oct, the only one that I can find related to mail is Office 2016. I installed Outlook as part of the package but didn't use it, and I uninstalled as best as I could the entire package a few months later as it was totally dysfunctional. I went back to Office 2011. But... I wonder if Outlook installed this postfix server as part of its package. Maybe or maybe not. I just now looked up on the web how to more fully uninstall Office 2016 and I just completed those steps. It may be my imagination but the computer seemed to boot quite a bit faster just now. I'm keeping my fingers crossed.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to resolve fatal postfix error in Console every 10 seconds

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.