Score:0

debian dovecot as a submission server

bg flag

I am using debian 12 as a submission server. I cant get it to work as described. Here is my doveconf -n:

auth_mechanisms = plain login
disable_plaintext_auth = no
mail_location = maildir:/home/vmail/%d/%n
mail_privileged_group = vmail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = " imap submission"
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
submission_relay_host = localhost
submission_relay_port = 2525
userdb {
  args = uid=vmail gid=vmail home=/home/vmail/%d/%n
  driver = static
}

When i telnet to localhost 2525 i get connected when i telnet localhost 25 i get connection refused. Why is that?

vidarlo avatar
ar flag
You need to update your question to tell us *WHAT* is not working, and how it is not working. What error messages do you get? What does the log show? How are you testing your configuration?
Andrei avatar
bg flag
I have made postfix listen on port 2525. I want dovecot be a front - end for it, on port 25. Thanks.
vidarlo avatar
ar flag
No, you don't want that. Port 25 is SMTP, not submission. Submission normall runs on 587. Submission is authenticated, SMTP is not. If you don't want to receive external e-mail on this host, you don't need anything listening on port 25.
Andrei avatar
bg flag
Thank you for clarifying. can you post an answer to choose it as a solution.
Score:0
ar flag

Submission is not SMTP. It receives mail from authenticated clients, and forwards said mail to SMTP.

From the documentation:

Relay MTA

The Dovecot SMTP submission service directly proxies the mail transaction to the SMTP relay configured with the following settings:

You have to tell Dovecot where to forward e-mail. This may or may not be a local SMTP server. You have told it that localhost is the appropriate delay, so you would have to set up a MTA, such as Exim or Postfix on the same machine.

Is there any specific reason you want to use Dovecot for this? Services such as Postfix can handle authentication just fine.

Andrei avatar
bg flag
Yes, I have set up postfix on same machine on port 2525. Just wanted to know if dovecot can relay on localhost 2525. Thanks for your answer.
vidarlo avatar
ar flag
Sure it can. But why do you then wonder why port 25 is not listening?
Andrei avatar
bg flag
Do i have to add a dovecot service on port 25?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.