1

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 "username@domain.com". 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 "username@domain.com", 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!

Nick
  • 11
  • 2
  • How have you integrated dovecot support into sendmail configuration? Do you use multiple virtual/email domains? – AnFi Jan 19 '14 at 17:34
  • This could be completely wrong but I've done the following. I've added the below to the sendmail.mc 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

1 Answers1

1

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 :
https://wiki.archlinux.org/index.php/Simple_Virtual_User_Mail_System

AnFi
  • 5,883
  • 1
  • 12
  • 26