On 10/31/2013 6:00 PM, Sergio Mira wrote:
Guys, are you good?
I have following scenario:
[HTTP Server]: process messages
[SMTP Server]: *only *send messages
[HTTP Server] === connect to ===>>> [SMTP Server] === sends message
===>>> [world]
Ok, this is going well.
My point is: how to get feedback from [SMTP Server] to know if my
message was really sent or not?

The SMTP server reports back to the client whether the mail was accepted or not; this constitutes a "sent" status from the perspective of the HTTP process.

The SMTP protocol is documented exhaustively.

Using php-mailer or any language/api (in [HTTP Server]), I only have
feedback for connection between servers: "Connection to SMTP server was
OK", but this is not a proof that my message was really sent.

No, there is much more information exchanged.

If whatever library you are using on the HTTP end does not properly support SMTP, ditch it and use one of the dozens that do it properly.

I mean, how to get that "status=sent" or "status=bounced" that appears
in the /var/log/maillog for each message?

That is the post-queue postfix status; it is not available to the client.

I am really trying this in the last weeks, but no success.
I worked in a way that, when [HTTP Server] connects to [SMTP
Server], gets Message-ID from maillog, so later I'll go (SSH from [HTTP
Server] to [SMTP Server]) to grep the /var/log/maillog with this
Message-ID and gets this "status=sent" or "status=anything".

That sounds horrible.

But I'm pretty sure there's an automated way to do that.

No, there is no "automated way" to associate data that is not related.

There are DSNs, described fully in RFC 3461/3464 and supported by postfix.


--
J.


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

Reply via email to