Answer the question
In order to leave comments, you need to log in
Postfix: how to forward a copy of a letter, within a domain, to a separate mailbox?
Hello colleagues.
Please help me to solve the problem.
There is a mail server based on postfix, let it be mail.example.org, which serves mail in the example.org domain.
You need to make sure that letters inside the example.org domain are sent to a separate mailbox (it is also in example.org). That is, for example, if a letter leaves [email protected] for [email protected], then forward it to [email protected]; but if the email is from [email protected] to [email protected] or from [email protected] to [email protected], then you do NOT need to forward it to [email protected]
How can such a scheme be implemented?
I tried to create my own class and do it through it ... It didn't work out.
As I tried:
In /etc/postfix/main.cf I wrote:
smtpd_delay_reject = yes
smtpd_restriction_classes = to_example
to_example = check_recipient_access hash:/etc/postfix/to_example_check
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_checks, ...
example.org to_example
example.org BCC [email protected]
postmap /etc/postfix/sender_checks
postmap /etc/postfix/to_example_check
service postfix restart
Mar 5 17:19:18 mail postfix/smtpd[13287]: warning: unknown smtpd restriction: "BCC"
Mar 5 17:19:18 mail postfix/smtpd[13287]: NOQUEUE: reject: RCPT from unknown[10.1.129.18]: 451 4.3.5 Server configuration error; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<user1>
This feature is not part of the stable Postfix release.
# uname -a
Linux mail.example.org 2.6.32-220.17.1.el6.i686 #1 SMP Tue May 15 22:09:39 BST 2012 i686 i686 i386 GNU/Linux
# cat /etc/issue
CentOS release 6.2 (Final)
# rpm -q postfix
postfix-2.6.6-2.2.el6_1.i686
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question