• mailstats usage?

    From EML@21:1/5 to All on Thu Apr 21 07:38:48 2022
    I've just enabled mailstats on a new server. To test it, I'm sending a mail from PHP (so it calls sendmail directly).

    When I send a test mail, the MTA 'msgsfr' increases immediately and, a few seconds later, the MTA 'msgsto' *also* increases. Why is this?

    If I check against /var/logs/mail.log, there are 4 entries corresponding to the outgoing message. The last one says 'message accepted for delivery', so this is presumably the local sendmail accepting message responsibility from the PHP mailer. A few
    seconds later there's another entry, also with 'message accepted for delivery', when sendmail hands off to the remote MTA. From the timings, I think this is when mailstats increments 'msgsto'. So what does 'msgsto' actually mean?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claus =?iso-8859-1?Q?A=DFmann?= @21:1/5 to EML on Thu Apr 21 14:49:46 2022
    EML wrote:

    When I send a test mail, the MTA 'msgsfr' increases immediately and, a few seconds later, the MTA 'msgsto' *also* increases. Why is this?

    Because mail which comes in usually also goes out.

    timings, I think this is when mailstats increments 'msgsto'. So what does 'msgsto' actually mean?

    Just what it says:
    msgsto Number of messages to the mailer.

    It's a fairly simple statistic, but it is essential
    to understand what "mailer" means wrt sendmail.

    --
    Note: please read the netiquette before posting. I will almost never
    reply to top-postings which include a full copy of the previous
    article(s) at the end because it's annoying, shows that the poster
    is too lazy to trim his article, and it's wasting the time of all readers.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From EML@21:1/5 to All on Fri Apr 22 02:03:49 2022
    On Thursday, April 21, 2022 at 7:49:48 PM UTC+1, Claus Aßmann wrote:

    Because mail which comes in usually also goes out.
    timings, I think this is when mailstats increments 'msgsto'. So what does 'msgsto' actually mean?
    Just what it says:
    msgsto Number of messages to the mailer.

    Thanks Claus. This is pretty confusing, though. When I run:

    $ sendmail -d8.20 -vt < ./test-sendmail.txt

    I expect mailstats to show one incoming message on the MSP, and one outgoing message on the MTA (the book doesn't show separate MSP/MTA stats - maybe this is a Deb/Ubuntu thing?)

    What I actually get is one in *and* one out on the MTA, and nothing on the MSP.

    Or maybe I've configured 'submit' incorrectly? I have a custom relay listening on port 25, which forwards filtered incoming mails on to port 7902, where sendmail is listening. So, basically sendmail only *sends* mails, unless the local system sends out
    administration mails by directly running the sendmail executable (like the example above). My submit.mc contains:

    define(`RELAY_MAILER_ARGS', `TCP $h 7902')dnl
    FEATURE(`msp', `[127.0.0.1]', `25')dnl

    Maybe that '25' is wrong? Thanks. Nice book, BTW :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claus =?iso-8859-1?Q?A=DFmann?= @21:1/5 to EML on Fri Apr 22 06:21:11 2022
    EML wrote:

    $ sendmail -d8.20 -vt < ./test-sendmail.txt

    I expect mailstats to show one incoming message on the MSP, and one outgoing

    Do you have separate statistics for the MSP?
    Do you invoke mailstats with the proper cf file when you want
    the info for the MSP?

    What I actually get is one in *and* one out on the MTA, and nothing on the MSP.

    As I wrote (for the MTA):
    ! Because mail which comes in usually also goes out.

    where sendmail is listening. So, basically sendmail only *sends* mails,

    Again:
    sendmail does NOT "only *sends* mails" it has to receive them first.


    --
    Note: please read the netiquette before posting. I will almost never
    reply to top-postings which include a full copy of the previous
    article(s) at the end because it's annoying, shows that the poster
    is too lazy to trim his article, and it's wasting the time of all readers.




    --
    Note: please read the netiquette before posting. I will almost never
    reply to top-postings which include a full copy of the previous
    article(s) at the end because it's annoying, shows that the poster
    is too lazy to trim his article, and it's wasting the time of all readers.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)