forwarding mail like before queue filtering to remote mta

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

forwarding mail like before queue filtering to remote mta

Stefan Bauer-2
Hi,

is there a way to keep an smtp session open and do before queue filtering AND final delivery to remote mta? do only sent 250 if we have already received 250. if not send temp error.

we would like to only accept mails if we can deliver them at the same time. a local queue is not wanted due to privacy reasons.

Stefan
Reply | Threaded
Open this post in threaded view
|

Re: forwarding mail like before queue filtering to remote mta

Wietse Venema
Stefan Bauer:
> Hi,
>
> is there a way to keep an smtp session open and do before queue filtering
> AND final delivery to remote mta? do only sent 250 if we have already
> received 250. if not send temp error.

How would that work when one message has more than one recipient?
In different domains? When one domain accepts the message, and the
other tempfails? What status would Postfix return to the SMTP client?

> we would like to only accept mails if we can deliver them at the same time.
> a local queue is not wanted due to privacy reasons.

Use a proxy that accepts one recipient at a time.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: forwarding mail like before queue filtering to remote mta

Viktor Dukhovni
In reply to this post by Stefan Bauer-2
On Wed, Nov 28, 2018 at 09:56:19PM +0100, Stefan Bauer wrote:

> Is there a way to keep an smtp session open and do before queue filtering
> AND final delivery to remote mta? do only sent 250 if we have already
> received 250. if not send temp error.

Only if there is a fixed remote MTA (smarthost), regardless of the
ultimate destination domain, and that MTA never selectively rejects
just a proper subset of the recipients.

Postfix can provide a non-queueing SMTP proxy, but only when the
fixed nexthop smarthost MTA accepts everything that Postfix accepts,
or else rejects the entire message, and it supports largely the
same ESMTP features (but you can configure which ESMTP features
Postfix will advertise to match).

If Postfix is to perform non-trivial message routing or address
rewriting, then the answer is "no".

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: forwarding mail like before queue filtering to remote mta

Stefan Bauer-2
In reply to this post by Wietse Venema
The use case is only for mx service so there will be only incoming mail for same domain in same smtp session.

I assume that remote mail servers will not combine mail delivery in same smtp session when destination domains differ (even though they have same mx)

Stefan

Am Mittwoch, 28. November 2018 schrieb Wietse Venema :

> Stefan Bauer:
>> Hi,
>>
>> is there a way to keep an smtp session open and do before queue filtering
>> AND final delivery to remote mta? do only sent 250 if we have already
>> received 250. if not send temp error.
>
> How would that work when one message has more than one recipient?
> In different domains? When one domain accepts the message, and the
> other tempfails? What status would Postfix return to the SMTP client?
>
>> we would like to only accept mails if we can deliver them at the same time.
>> a local queue is not wanted due to privacy reasons.
>
> Use a proxy that accepts one recipient at a time.
>
>         Wietse
>
Reply | Threaded
Open this post in threaded view
|

Re: forwarding mail like before queue filtering to remote mta

Viktor Dukhovni
> On Nov 28, 2018, at 11:43 PM, Stefan Bauer <[hidden email]> wrote:
>
> The use case is only for mx service so there will be only incoming mail for same domain in same smtp session.
>
> I assume that remote mail servers will not combine mail delivery in same smtp session when destination domains differ (even though they have same mx)

The assumption is invalid.  Exim IIRC can deliver multiple recipients
in a single envelope, if there's a shared MX host.  So can Postfix,
if the destination MX is a statically configured nexthop.

You might also get more recipients in one envelope than will
be accepted downstream.

In any case, Postfix does not support routing without queueing.
If this is a hard requirement, you'll need a different MTA.

--
        Viktor.