Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a router which delivers mail to certain domains into a MailDir for the domain, and uses a domain:user map to give file ownership to the right user.

The problem is that since updating the uid of the users (needed to bring in sync with other servers), exim is throwing errors into the panic log saying

Failed to get user name for uid 1001

Where 1001 is the old uid for one of the users concerned (the new one is 1008). It also generates these errors for 1002, the other user that I changed.

Here's the router

        debug_print = "T: domain_catch_all_transport for $local_part@$domain"
        driver = appendfile
        user = ${lookup{$domain}lsearch{/etc/exim4/civicrm-catchalls}}
        group = ${lookup{$domain}lsearch{/etc/exim4/civicrm-catchalls}}

And here's the lookup file format:

You'll note that no uids are specified. Running id usernameone shows the new user and group.

What I have tried

  • I have scanned the entire file system for anything user or group owned by the old uids and updated them.
  • I have run update-exim4.conf and service restart exim4
  • I have recursively grepped the /etc/exim4 for the offending uid, 1001 and found nothing.
  • I have checked that exim is able to deliver (and correctly set user, group) to the domains in question - all good there.

I'm still getting these warnings/errors. Looking at mainlog I see that the errors come at random times, not while processing mail(!) e.g.

2014-03-03 09:00:01 Failed to get user name for uid 1001
2014-03-03 09:00:01 Failed to get user name for uid 1003
2014-03-03 09:10:01 Failed to get user name for uid 1001
2014-03-03 09:11:38 Start queue run: pid=3457
2014-03-03 09:11:38 End queue run: pid=3457
2014-03-03 09:15:01 Failed to get user name for uid 1003
2014-03-03 09:20:01 Failed to get user name for uid 1001
2014-03-03 09:30:01 Failed to get user name for uid 1003
2014-03-03 09:30:01 Failed to get user name for uid 1001


I'm running Debian 7 (stable/Wheezy) with Exim4 4.80.7.

share|improve this question
I think we should assume you meant exim 4.80.1 and you're running what Debian calls "exim4", since that's the latest release from Debian: wheezy (stable) (mail): metapackage to ease Exim MTA (v4) installation 4.80-7. – Todd Lyons Mar 3 '14 at 15:17
@ToddLyons Corrected. Yes, I'm using the exim4 package (specifically exim-daemon-heavy), which has stated version 4.80.7 from apt-cache. – artfulrobot Mar 3 '14 at 15:21

When exim queues a message, it stores lots of extra information with the message in the queue. One of the things that is stored with the message is the uid and gid that the process should run as. I'll bet if you grep your mail queue headers (probably in /var/spool/exim4/input/*-H) you will find those lingering 1001 and 1003 entries in the second line of some *-H files. I suggest your options are:

  1. Delete those entries from the queue, or...
  2. Stop exim. Manually edit those files changing the "uid gid" to match your new uid and gid. Start exim and see if it delivers properly.

It's also possible that there are some hard coded uid/gid's in the transport configurations? The actual exim configuration file in Debian is auto-generated from configuration settings, and its location can be displayed with exim -bV. The last line will be the location of the configuration file. Do some grepping and looking through that file to see if there is anything hard-coded.

share|improve this answer
Nothing in mailq. No files in that dir. As seen from logs, doesn't appear to be related to queue runs. Adding a user for the missing uids fixes warning, but what us exim doing with those users??! – artfulrobot Mar 3 '14 at 22:40
Added another place to check. – Todd Lyons Mar 4 '14 at 0:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.