On 1/29/2020 9:26 AM, Averlon wrote:
Dear all,

I have a client in my network, a technical device, which I can only set some parameters to send mails (mailserver, port, sender-address, receipient-address, …), but not manipulate or administrate.

I have a Postfix installation in my INTRANET, using port 25, just to get e-Mails from clients and relay them to some relay-host of my provider.

In general, the postfix works.

The client sends a curious telnet command string and I would need to manipulate that when it is received by postfix to be able to perform the relay conrrect.

+++

SMTP 70 C: MAIL FROM:<1e>

SMTP 68 S: 250 2.1.0 Ok

SMTP 67 C: RCPT TO:<D>

SMTP 68 S: 250 2.1.5 Ok

SMTP 72 C: RCPT TO:<status>

SMTP 68 S: 250 2.1.5 Ok

SMTP 77 C: RCPT TO:<diagnostics>

SMTP 68 S: 250 2.1.5 Ok

SMTP 70 C: RCPT TO:<ping>

SMTP 68 S: 250 2.1.5 Ok

SMTP 105 C: RCPT TO:<ping google-public-dns-a.google.com 1 1>

SMTP 94 S: 501 5.1.3 Bad recipient address syntax

SMTP 60 C: QUIT

+++

This is the communication of the client.

Now I would like to manipulate the “MAIL FROM” and the “RCPT TO” to some form that works and eliminate the “ping …..” at all.

I have tried with

canonical_maps = regexp:/etc/postfix/av_canonical.cf



Look at
http://www.postfix.org/postconf.5.html#smtpd_command_filter



  -- Noel Jones

Reply via email to