Answer the question
In order to leave comments, you need to log in
How to set up an smtp proxy balancer with login spoofing?
Hello!
There are several mail servers like `mail{N}.example.com` (I don't have access to them) and users with mail clients and their accounts. It is necessary to put a proxy balancer `mb.example.com` between users and servers (replacing the server address on clients).
I used this solution on nginx + auth_http . However, the difficulty is that the backends have different login formats (IAFedorov, ia_fedorov, etc.), but I don’t see anything about login in the article - only ip/port.
In addition, when I try to send an email, I get the response "550 relay access denied - please authenticate".
What am I doing wrong?
nginx config:
mail {
auth_http mb.example.com:80;
server {
server_name mb.example.com;
listen 25;
protocol smtp;
proxy on;
proxy_pass_error_message on;
smtp_auth login plain;
xclient off;
}
}
<?php
header('Auth-Status: OK');
header('Auth-Server: 11.22.33.44');
header('Auth-Port: 25');
header('Auth-User: some_username');
header('Auth-Pass: some_password');
Sep 26 09:55:42 username postfix/smtpd[7865]: NOQUEUE: reject: RCPT from unknown[11.22.33.44]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>
Answer the question
In order to leave comments, you need to log in
If I understand the task correctly, do I need clients to get to "their" backends through smtp-proxy?
The option in postfix is called transport_maps.
Here is an excerpt from the documentation
# The optional transport(5) table specifies a mapping from
# email addresses to message delivery transports and next-
# hop destinations. Message delivery transports such as
# local or smtp are defined in the master.cf file, and next-
# hop destinations are typically hosts or domain names. The
# table is searched by the trivial-rewrite(8) daemon.
#
And here is an example:
We make the config /etc/postfix/transport , the contents are:
[email protected] mail01.example.com
[email protected] mail02.example.com
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question