Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon Content Filter > Do CF rules run on unsuccessful email deliveries?

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon Content Filter  /

Do CF rules run on unsuccessful email deliveries?

[Villanueva, Chris]
Chris Villanuev…
Newbie
Newbie
Posts: 39

MDaemon
SecurityPlus
Chris Villanueva - 07:12pm, Mar 20 2017

I'd like to know when an email from a certain sender has arrived with a certain subject by making some kind of CF rule to send a confirmation/verification email. The reason?

Our mdaemon recipient said the sender issued a late payment fee.

The recipient asked me to investigate. I searched the logs.

The suspect email arrived at the expected date. But it said: Socket error 10054 - Connection was reset by the other side!

So, our recipient never got the email and thus paid the bill with a late fee.

  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Jay Tolbert - Mar 21, 2017 11:34 am (#1 Total: 3)  

 

Photo of Author
Jay Tolbert
Guru
Guru
Posts: 2837

MDaemon
RelayFax
SecurityPlus
WebAdmin
If MDaemon doesn't accept the message, CF won't get a shot at processing
it. In the MDaemon Help Index tab, look up order of processing for a
chart of when things happen.

In the SMTP-IN log, the key line is:

--> 250 2.6.0 Ok, message saved <Message-ID: <something@somewhere>>

Once MDaemon sends that it accepts responsibility for message delivery.
If the connection is terminated before that there is no message for
MDaemon to process.

That said, there is a setting in Setting -> Preferences, Fixes "Accept
message even if connection drops after DATA" which will, if enabled,
keep and process messages when the connection drops between the time
MDaemon finishes receiving the message but before MDaemon has a chance
to reply with the 250 response. The switch can be useful if MDaemon
took a long time to respond after the DATA was sent. But the other MTA
should wait a reasonable amount of time for a response. The RFC calls
for 10 minutes (https://tools.ietf.org/html/rfc5321#section-4.5.3.2.6).
I would look at what the delay was on that message and see what typical
delays are. I generally see timing of no more than 20 seconds unless
the message is very large. If there is a large delay in the SMTP-IN log
between the "Message size:" line through the 250 response see which of
the checks are causing the biggest delays and see if anything can be
done about them (maybe DNS timeouts?). I remember I tried enabling this
once to fix one problem but it caused others with an MTA that hung up
and continually resent the same message so the user got many,many copies
before I shut it off.

Alternately to the CF, you do get a pass with Plugins and the Spam
Filter. You could write some plugin to capture these messages but you
wouldn't know if they actually were going to get accepted later. Might
be able to do something similar with a SA perl module file.

Also, you could just find something to process the MDaemon SMTP-IN log
and look for rejected messages and compile a list or look for specific
domains and give you a report. You wouldn't have the message but you
would know they attempted it. But they could have successfully resent
it later.

Jay Tolbert
Dickerson Engineering, Inc.

On 3/20/2017 7:12 PM, Chris Villanueva wrote:
> I'd like to know when an email from a certain sender has arrived with
> a certain subject by making some kind of CF rule to send a
> confirmation/verification email. The reason?
>
> Our mdaemon recipient said the sender issued a late payment fee.
>
> The recipient asked me to investigate. I searched the logs.
>
> The suspect email arrived at the expected date. But it said: Socket
> error 10054 - Connection was reset by the other side!
>
> So, our recipient never got the email and thus paid the bill with a
> late fee.


Replies to this message
  • Chris Villanueva (Mar 22, 2017 7:50 pm)
  • Chris Villanueva (Mar 24, 2017 9:49 pm)


  • Chris Villanueva - Mar 22, 2017 7:50 pm (#2 Total: 3)  

     

    Photo of Author
    Chris Villanuev…
    Newbie
    Newbie
    Posts: 39

    MDaemon
    SecurityPlus
    Replying to: Jay Tolbert (Mar 21, 2017 11:34 am)
    If MDaemon doesn't accept the message, CF won't get a shot at processing it. In the MDaemon Help...

    Thank you, Jay. I appreciate your detailed help.
    Have a nice day/night.

    Chris

    Chris Villanueva - Mar 24, 2017 9:49 pm (#3 Total: 3)  

     

    Photo of Author
    Chris Villanuev…
    Newbie
    Newbie
    Posts: 39

    MDaemon
    SecurityPlus
    Replying to: Jay Tolbert (Mar 21, 2017 11:34 am)
    If MDaemon doesn't accept the message, CF won't get a shot at processing it. In the MDaemon Help...

    FWIW, I've attached a simple .bat file that runs once a week. Basically, it searches the recent (not in the OldLogs folder) MDaemon-*-SMTP-(in).log files for the email address. If found, it sends an email to me.

    Attachments:

    Sample.bat (0 KB) (153 Downloads)




      All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



     Content:

    Read New | Search

     Guest:

    Email to Admin



    You are visiting as a Guest user.