Tracing mail sending progress

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tracing mail sending progress

Dominik George
Hi,

I am running Postfix on my local machine and it passes on mail to a
smarthost to which it is connected through a very non-optimal
connection.

Sending a mail with a PDF attachment of 3 MiB regularly takes up to 30
minutes.

Is there a way to trace how much of a message body has been transferred
to the next hop?

Cheers,
Nik

--
* mirabilos is handling my post-1990 smartphone *
<mirabilos> Aaah, it vibrates! Wherefore art thou, demonic device??

PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17  FD26 B79A 3C16 A0C4 F296

signature.asc (923 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tracing mail sending progress

Wietse Venema
Dominik George:
> I am running Postfix on my local machine and it passes on mail to a
> smarthost to which it is connected through a very non-optimal
> connection.
>
> Sending a mail with a PDF attachment of 3 MiB regularly takes up to 30
> minutes.

That's similar to my (backup) dialup connection, not too long ago.

> Is there a way to trace how much of a message body has been transferred
> to the next hop?

There is no progress bar :-)

However, tcpdump will report byte offsets relative to the beginning
of a TCP connection, or if the connection exists before you start
tcpdump, relative to the first packet that tcpdump sees.

With some tcpdump versions this can be as simple as:

    # tcpdump -ni name-of-inteface-here host foo and port 25
    ...
    09:11:38.945152 IP 192.168.0.2.smtp > 192.168.1.2.57601: Flags [P.],
    seq 49:97, ack 96, win 8326, options [nop,nop,TS val 1896616435 ecr
    1425166], length 48
    ...

This shows bytes 49-98 being sent.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Tracing mail sending progress

Tobia Conforto
Wietse Venema wrote:
> Dominik George:
>> Is there a way to trace how much of a message body has been transferred
>> to the next hop?
>
> tcpdump will report byte offsets relative to the beginning of a TCP connection

There is also iptraf, an easy, interactive ncurses tool that shows packet/byte counts and current speed of tcp connections.

-Tobia