Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm setting up Dovecot with Sendmail and I almost have it working (I think).

The username for the account is a full email address such as "". What seems to be happening is that when the username is passed over to dovecot-lda from sendmail, it is receiving just "username" as the username instead of "", causing the processing to fail. The same is also happening for the SASL authentication.

Is there any way to prevent this and send through the full username to both? These full usernames will then be looked up in a Postgres database for authentication by SASL and Dovecot.

Thanks in Advance!

share|improve this question
How have you integrated dovecot support into sendmail configuration? Do you use multiple virtual/email domains? – Andrzej A. Filip Jan 19 '14 at 17:34
This could be completely wrong but I've done the following. I've added the below to the config and used Postgres for authentication of usernames and passwords: FEATURE('local_procmail', '/usr/lib/dovecot/dovecot-lda','/usr/lib/dovecot/dovecot-lda -d $u')dnl MODIFY_MAILER_FLAGS('LOCAL', '-f')dnl MAILER(procmail)dnl I'm pretty new to this mail setup, so please bare with me. Thanks! – Nick Jan 19 '14 at 21:16
I'm still reading up on all this, and the answer to your virtual email question is that yes, I want to be able to use multiple domains from the same box. That's essentially where the problem lies and need help in the configuration. With my setup at present, I can see in the dovecot logs that Sendmail is communicating fine, it's just dovecot doesn't have the domain name so can't match the incoming mail to a mailbox. I'm currently reading lots on virtuserdomains. If I set this up should everything fall into place, or are there more steps I need to take? Thanks! – Nick Jan 19 '14 at 22:52

I would be quote easy to make sendmail preserve domain name but there are two additional problems that make postfix a better choice:
a) checking existence of recipient address when Dovecot does not use (small) plain text file to list valid mailboxes
b) using the same password for IMAP/POP3 and SMTP - sendmil does not support Dovecot SASL

The link below seems to offer pretty good Postfix recipe but check it step by step and do not ignore relay_domain warning :

share|improve this answer

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.