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 need to use sendmail without any system users.

The only problem that still exists in my configuration is that FEATURE(virtusertable) wants a final systemuser on RHS in my virtusertable like this:

@domain.tld           user@domain.tld
user@domain.tld       systemuser

The problem is, there is NO such systemuser and I want all mail to @domain.tld delivered to my lda (procmail, then dovecot-lda) which is capable of handling full email addresses as users.

I already tried things like


but this does not help either.

We already have an ugly workaround with procmail scripting which is reading the virtusertable, but we would love to have this handled by sendmail so that any sent email that has no RHS and/or user in the lda to be bounced. In addition using dovecot-lda is direct lda in sendmail is also no option in our setup. :(

Any help is welcome!

share|improve this question
How many virtual users do you plan to configure in your dovecot? (100,1_000,10_000,...) Do you keep docecot's mailbox list in plain text file? – Andrzej A. Filip Dec 18 '13 at 20:21

Take a look at Sendmail FAQ 3.29 - "How can I add a header specifying the actual recipient when having multiple users in a virtual domain go to a single mailbox?"

IMHO it may be easily adapted to deliver what you want - it provides all needed hooks.

BTW you may use "@domain.tld" virtusertable entry to selected error mailer. It will allow you to reject messages to virtual users not listed in virtusertable.

@domain.tld           error:nouser No such user here
adam@domain.tld       systemuser+%1
eve@domain.tld        systemuser+%1

You may also consult

share|improve this answer
Thanks a lot for having a look into this. – Jimmy Koerting Dec 18 '13 at 22:50
We have between 10 and 1000 virtual users in one host and about 10 to 200 domains handled by the same sendmail. Most customers need/want the terrible catch-all feature and we need to 'reuse' a really hugh nested procmail for many reasons, so we can't omit it. In the meantime I have everything running with some fake entries in aliases, but this is not clean and sendmail is not able to reject on not existing recipients in all cases. I guess I need to write some rules to achieve this. I hoped to use a existing solution. – Jimmy Koerting Dec 18 '13 at 23:01
up vote 0 down vote accepted

I ended up solving this by two ways:

a) Patching libsm/mbdb.c and sendmail/recipient.c to have an additional lookup into the dovecot user table. To have this working, a minor tweaking with a LOCAL_RULE_0 was needed.

b) Andrzej pointed me in a similar question on stackoverflow to solution with mailertable and access file. Following this idea I found an even easier solution to have everything we need:


@domain.tld              user_domain_tld
info@domain.tld          user_another_tld


user_domain_tld: "|/bin/procmail -a user@domain.tld"
user_another_tld: "|/bin/procmail -a user@another.tld"

Solution a) is nice to have, because it changes the accepted syntax in virtusertable and one has to have only check one file over the time, where solution b) wins because of the easy way to achieve it, which is in addition more compatible with future releases of sendmail. After all the work, I use solution a), but I will change it to solution b) after christmas ;)

share|improve this answer
1) Have you considered using custom rules and text map lookups into dopvecot's userdb/password files? 2) Do you plan to submit your patches to – Andrzej A. Filip Dec 22 '13 at 9:52
1) I did this exactly that way, but sendmail/recipient.c is still invoked, so it's not possible to achieve this without a patch 2) Noone seems to be interested as my inital question to this problem was even set on hold by some super-php-hackers on stackoverflow.... Sometimes even I'm huffy ;) – Jimmy Koerting Dec 22 '13 at 12:18
oh to 2) -> except YOU, what I really appreciate!! – Jimmy Koerting Dec 22 '13 at 13:11

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.