Score:1

How do I tell Dovecot to use another server for SMTP?

cn flag

I am a bit lost on mail servers, but I have to install a mail proxy (Proxmox Mail Gateway) in front of the actual mail server (ISPConfig, Roundcube, Dovecot, Postfix).

On receiving emails, it uses the mail proxy which then sends the emails to the IMAP/POP server. But when sending emails (from the IMAP/POP server), the mail gateway isn't used, it sends the emails directly.

I kept the configuration files to "default" except for the PMG server which I modified in the Web UI to make the email receiving work.

How do I change the SMTP server for email sending ?

Score:0
in flag

mail proxy (Proxmox Mail Gateway) in front of the actual mail server (ISPConfig, Roundcube, Dovecot, Postfix)

given what you said, your incoming e-mail flow would look like this:

proxy --> postfix --> dovecot --> user mailbox

So it is normal if an email sent from the IMAP/POP server is directly delivered since it is handled by the postfix installed on it which automatically sends it to the destination mailbox via dovecot.

To both solve your problem and optimize your e-mail flow, I suggest:

  1. continue to use one SMTP protocol from the external to the proxy

  2. use LMTP protocol instead from the proxy to your IMAP/POP server official documentation here

This way, the postfix on your IMAP/POP server will not immediately interfere with the e-mail delivery process.

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.