0

I have a basic question for a mail setup which i have to implement.

We have an SMTP server (Postfix) in DMZ, which should receive and accept all mails for our internal users. Then we have a internal mail server which should provide all the mails to the users with IMAP.

The problem is, no connections from DMZ are allowed (except LDAP/s). So the internal mail server has download the mails from the server in the DMZ.

I'm not sure which tool stack to use and how to make the mails available for the internal server.

EDIT: So basically I have to do something like this with fetchmail on the internal server:

poll serverDMZ.domain.com protocol POP3 envelope "Delivered-To:" localdomains example.org user "*@example.org" there with password "Passw0rd!" is * here smtpaddress localhost ssl fetchall

But I don't now how to configure the SMTP Server in DMZ.

toplogy

Dave M
  • 4,514
  • 22
  • 31
  • 30
  • I think there are a few details missing here. Why would there be a requirement to not deliver mail directly, when fetching LDAP information directly is acceptable? – anx Apr 15 '21 at 13:46
  • @anx We have to do lab in cs class and this a requirement. It's for sure a stupid requirement. The lecturer wants us to fetch the mails with a POP3 connector or ETRN from the SMTP Server. – RustySyntax Apr 15 '21 at 14:01
  • Sorry for the misunderstandig. From the DMZ it's not allowed to *initiate* any connection except LDAP. – RustySyntax Apr 15 '21 at 14:25
  • So, how does that fit together with a feature that is solely intended to request initiating a connection? – anx Apr 15 '21 at 14:34
  • By doing it with a POP3 connector, so the connection is initiated by the internal mail server. – RustySyntax Apr 15 '21 at 14:37

2 Answers2

0

For your scenario, you won't install a second email server, instead:

  1. Configure an internal SMTP Relay server (or a Send-only SMTP Server) which will send e-mails

    Take a look at this tutorial: Configure Postfix to Send Email Using External SMTP Servers

  2. Configure fetchmail on the internal server to retrieve emails from your external mail server

  3. Configure an IMAP server on your internal server to deliver emails internally.

surfingonthenet
  • 715
  • 3
  • 7
0

Postfix handles SMTP(S) protocol. Technically it is an MTA (Mail Transfer Agent). It moves emails around to recipients mail servers or, if it is the server managing recipient's email address, either directly stores them in recipient's mailbox or passes them to another software (i.e. dovecot) which performs this task.

Softwares like dovecot are MDA (Mail Delivery Agent). They manage email 'last mile'. They speak IMAP(S) and POP3(S) and allow the retrieval of emails from a remote server to either a mail client (MUA - Mail User Agent) like Thunderbird, or fetchmail.

Long story short: my suggestion is to install an MDA like dovecot on the external server running postfix and configure postfix to deliver incoming emails to it. Internal mail server would fetch emails from it using POP3, making them available for internal users.

Qippur
  • 135
  • 1
  • 10