K
K
Kalombyr2020-02-18 10:58:34
Mail server
Kalombyr, 2020-02-18 10:58:34

How to make sure that all letters with an error in the recipient's name come to a given address?

There is a postfix + dovecot + mysql mail server.
There are several domains and many mailboxes.
It is necessary to make it so that if there was an error in the username (for example, "[email protected]" (non-existent) instead of "[email protected]" (existing)) all letters are forwarded to the mailbox "[email protected] "It is desirable that the subject of the message immediately put the email to which it was sent.
Similarly for domain2 and others.

It would be ideal if it would be possible to set parsing by regular expressions with possible errors and immediately send to the necessary addresses, and if it failed and none came up, then to the general one.

PS Theoretically, I'm ready for spam (filters + a specially appointed person to parse and redirect to the right address).

At the moment, based on the logs, virtual users have been made with popular spelling errors and redirects immediately to the correct addresses.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Mezhuev, 2020-02-18
@Kalombyr

Read VIRTUAL_README .

Example
Добавить в main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual:
# Популярные ошибки
[email protected]	[email protected]

# Остальное на секретаря
@domain1.com		[email protected]

Выполнить:
[[email protected] ~]> postmap /etc/postfix/virtual
[[email protected] ~]> systemctl reload postfix

Обработать по месту напильником.

As already noted, spam will overwhelm you. Among others, there will definitely be boxes that will only receive spam . It makes sense to block the receipt of mail to these addresses via smtpd_recipient_restrictions or use them to train antispam (honeypot).
Parsing through regular expressions can be implemented by Dovecot through Sieve: Pigeonhole Sieve Interpreter (using Dovecot as LDA for Postfix is ​​mandatory). But this is certainly a thankless job.

A
akelsey, 2020-02-18
@akelsey

How to make sure that all letters with an error in the recipient's name come to a given address?

Google search for "catchall postfix".
PS
But spam will collect perfume ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question