Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Tweak postfix User IDs to align with Repair Permissions UNIX
If you are in the habit of making sure you run Repair Permissions regularly (i.e. from weekly.local), you might have noticed that it "repairs" the Postfix directories such that Postfix will no longer work. The problem (on my 10.3.3 box, anyway) appears to be that the UID for the postfix user has changed from "27" to "255" at some point, and the Repair Permissions app is assuming the first is correct. When it changes the perms on various postfix directories, postfix will refuse to run.

Up to now, I've just been running a fixuppostfix script after the /usr/sbin/diskutil repairPermissions / command in my weekly.local to repair the repair. This works fine, but a bit of research on the web suggests that the postfix user is probably not quite right set to 255.

To fix this at the source, I opened up Netinfo Manager and selected users in column two, and postfix in column three. I changed the uid to 27 and saved the changes (you may be prompted to authenticate as an admin user).

Now, my periodic scripts don't break Postfix. No problems after a few weeks. An Apple update may break this in the future; at some point they will have to decide what the postfix UID is, and either Repair Permissions will agree with this, or not.

[robg adds: I don't run postfix and have no experience with it, so I can't comment on which UID is 'right.' If anyone can confirm (or not) this info, please feel free to do so in the comments...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,688 views]  

Tweak postfix User IDs to align with Repair Permissions | 12 comments | Create New Account
Click here to return to the 'Tweak postfix User IDs to align with Repair Permissions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Tweak postfix User IDs to align with Repair Permissions
Authored by: jbird on Apr 14, '04 11:32:57AM

My 10.3.3 Postfix user is correctly set to UID 27.

Perhaps this is possible bug somewhere? (or even a Hack, virus, etc?- just a thought)



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: TomK on Apr 14, '04 01:11:38PM

My uid stays 27 as well and I run repair permissions every day with Macaroni.

---
Tom Knoff
Digital Design & Production
tom@dd-p.net
http://www.dd-p.net



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: 47ronin on Apr 14, '04 01:57:56PM

If your Postfix works fine through repairPermissions, it's because you did a clean install of Panther. Upgrade/Archive installs of Panther from Jag have this Postfix problem because the postfix user is not created. Hopefully this hint will correct this error.



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: thoughton on Apr 14, '04 02:41:04PM

I'm not so sure about the clean install thing, I recently wiped my HD and re-installed 10.3.3, and then enabled postfix (with postfix enabler) for the first time ever, and my postfix still breaks after repairing permissions.

FWIW, my postfix uid was 23456 before I changed it with this hint.



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: DavidRavenMoon on Apr 15, '04 08:53:07PM

I did an archive and install, and my UID is 27.
.



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: thoughton on Apr 14, '04 03:11:49PM

After following the instructions in this hint to change the uid to 27 I repaired permissions but it broke postfix again. However after also changing the gid to 27 postfix continues working even through repairing permissions. I don't know if changing the gid will cause any problems later.

Oh yes, my uid and gid were both previously 23456. This may have been due to using Postfix Enabler to first setup postfix, I don't know.



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: Anonymous on Apr 14, '04 07:11:05PM

It should be ok. Interestingly enough, the postfix GID on my box is 255. The important group ID is "postdrop" which should be 28. However, the postfix group does not appear to be used, whereas the postdrop group is.

I don't know why the UID and GID was set to 23456 or 255, but this appears to be incorrect.

Generally, non-login users like postfix should be

[ Reply to This | # ]

Tweak postfix User IDs to align with Repair Permissions
Authored by: thoughton on Apr 15, '04 03:30:27AM

Hmm strange that postfix wouldnt work for me with gid of 23456 but yours worked with 255. Oddly enough, after changing the postfix gid from 23456 to 27 and repairing permissions, I noticed a few lines about 'postdrop should be 28, currently is 23456, repairing' etc messages. Strange since I didn't set anything to gid 28 that I know of.

Anyway I'm just glad I finally got it to stop breaking whenever CCC repaired permissions. I hadn't even prepared a high-tech script like you :-) I just manually pasted in that chunk of sudo chowns every time! So I am mightily pleased not to have to do that anymore :-) so thanks for the hint!



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: danielj7 on Apr 14, '04 07:13:46PM

This is caused by older versions of Fink. Under 10.2, the Fink package "passwd" would create a "postfix" user with ID 255. It also creates groups "postfix" and "mail" with IDs of 255 and 261. Early releases of Fink for 10.3 continued to do this, and overwrote Apple's versions which are new to 10.3. Also, when updating to 10.3 when Fink has already been installed, Apple's installer doesn't overwrite the "postfix" user and group so they remain 255. Recent versions of Fink don't do this anymore, but the damage isn't undone if you used an older version.

The way to fix it is to use Netinfo Manager, as indicated. You also should make sure that the "postfix" and "mail" groups have IDs of 27 and 6.



[ Reply to This | # ]
Tweak postfix User IDs to align with Repair Permissions
Authored by: Anonymous on Apr 14, '04 07:23:30PM

Thanks for this explanation. The GID for mail is already 6 on my 10.3.3. The postfix GID does not seem to be used (or "wheel" is good enough). Of course, there are those directories that require "postdrop", which wants to be "28", and was correct on my box.

I changed it (the postfix GID) to 27 anyway.

---
cm

[ Reply to This | # ]

Tweak postfix User IDs to align with Repair Permissions
Authored by: Anonymous on Apr 14, '04 07:16:20PM

For reference, here is the "fixupperms" script I'd previously been running in my weekly.local, right after the Repair Permissions command:

#!/usr/bin/sh
# 
# Fixup the Postfix queue perms
#

sudo chown -R postfix /private/var/spool/postfix
sudo chown root /private/var/spool/postfix
sudo chown root /private/var/spool/postfix
sudo chown :postdrop /private/var/spool/postfix/public
sudo chown :postdrop /private/var/spool/postfix/maildrop
sudo chown :postdrop /usr/sbin/postqueue
sudo chown :postdrop /usr/sbin/postdrop

#EOF

---
cm

[ Reply to This | # ]

Tweak postfix User IDs to align with Repair Permissions
Authored by: buddilla on Apr 26, '04 02:38:09AM

When i run repiar permissions it changes my Read Write Execute permissions on /private/var/mail so i end up getting error logs stating that i have to set my permissions back 1777. In terms of using fink to install ports for OSX I find more dificult to use more i delv into unix. try fink install kdebase3. GNU files dont ever install for me when using fink darwinports. Ha trying to install courier-imap 3.0.3 just gives me a res_query problem i have yet to have figured out. Unix apps belong in thier correct default directories not some stupid directory like /sw/bin or /opt/local. Makes install ports by hand hard when you have like 3 or 4 different make versions installed on one system. Get with the real install by hand. Atleast you'll have the pleasure of actually configuring something on your own that you know will work cus you did it on your own. haha several days trying to figure out why courier-imap wont configure has gotten me steamed. ok im done. MMM i guess on a good note just set the right user ids as well as group ids for post fix.

uid/gid for 10.3.3 postfix: uid 27 gid 27
mail: uid none gid 6
cyrus: uid 77 gid 6
mailmain: uid 78 gid 78
courier: uid 100 gid 100
postdrop: uid none gid 22
www: uid 70 gid 70

maybe this will make things easier.

:)

---
aim: buddilla
Geeklog User (Dual G4 500MHZ Panther)

[ Reply to This | # ]