How to send mail to mailbox with disabled domain?

Jochen Bern jochen.bern at binect.de
Wed Sep 12 11:58:18 EEST 2018


On 09/11/2018 08:20 PM, Kai Schaetzl wrote:
> I have to disable mail acceptance for example1.com. 
> If not, mail sent *from* that server (e.g. from a web form) to that domain 
> will not leave the server. 
> However, if I disable example1.com for mail dovecot lmtp will not deliver 
> mail to this mail box anymore, although the mailbox still exists.

First and foremost, you are describing a major routing problem *for the
MTA*. You want it to do local delivery (via LMTP) for
user1 at example1.com, but forward mail addressed to foobar at example1.com to
that domain's current MX. Since MTAs usually(!) decide that based on the
*domain*, you have a need for some off-the-textbook tweaking right
there. And the config to make *dovecot* work as needed would need to
pick up from there.

If we're talking postfix, my first idea would be to make example1.com a
virtual alias domain and set up a transport table with entries
	user1 at example1.com	local:
	# ... etc. etc. ...
	example1.com		smtp:$HOW_TO_REACH_THE_MX
(with $HOW_TO_REACH_THE_MX being anything from "use the official MX from
DNS" to "contact this internal IP on this port, *without* DNS lookups",
whichever your (internal?) networking necessitates).

http://www.postfix.org/transport.5.html

With a bit of luck, that might already "contain" the weirdness to the
point that neither the MX nor dovecot need config hacks.

Regards,
-- 
Jochen Bern
Systemingenieur

www.binect.de
www.facebook.de/binect

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4278 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20180912/cbdf0dcc/attachment.p7s>


More information about the dovecot mailing list