C
C
choodo2017-11-30 01:37:12
JavaScript
choodo, 2017-11-30 01:37:12

Can some MTA accept a letter and "shift" it to a mailbox of another domain, replacing FROM?

Can any MTA accept a letter and "shift" it to a mailbox of another domain, replacing FROM?
That is:
a letter has arrived in box 1
MTA replaces the FROM field
MTA puts it in the "inbox" of box 2

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anton Neverov, 2019-09-15
@TTATPuOT

The above answer is absolutely correct. There is another way - to use vanilla JS, without jQuery. Your function is not that very complicated.

C
CityCat4, 2017-11-30
@CityCat4

In the process of receiving a letter, you can do whatever you want with it. Maybe virtusertable will help. You may have to use your own filter on libmilter.
There is only one moment here. Delivery processing to the box is already LDA / LMTP. You need to change FROM before this moment (if you need a transparent change), because LDA cannot do this transparently - the fact of redirection flashes in the headers.
It needs to be a little different:
a letter is received at [email protected] from [email protected]
the filter replaces FROM with [email protected] the
letter in this form falls into the box
This is most likely something to mess with libmilter, I don’t know the standard means

A
Alexander Chernykh, 2017-11-30
@sashkets

you can look at procmail and write a number of rules for replacing and stacking letters in the desired mailbox

C
CyberRat, 2017-12-07
@CyberRat

On the example of standard postfix tools:
1.
a) If you need to change only the From field in the message headers (that is, what the recipient sees in his mail program as the sender's address and name), you can use the REPLACE directive in the header_checks header filter
b) If required change only Envelope-From, that is, change the sender only at the SMTP protocol level (the Return-Path field in the headers), then you need to use sender_canonical_maps
Accordingly, use both if both actions are needed at the same time.
2.
a) You can transfer to another box without changing the headers, for example, at the local delivery agent level - either using the aliases table or virtual - depending on the delivery method used. The second option is through prescribing in transport. There are even more exotic options with their own nuances, such as creating blind copies (always_bcc) or the REDIRECT instruction in header_checks
b) If you also need to change the name / address of the recipient during delivery, which are visible in the mail client, then REPLACE is used in header_checks as in paragraph 1a

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question