Search found 17 matches

by matthew1471
2019-04-27 17:37
Forum: General discussions
Topic: fake "mail from"
Replies: 27
Views: 4674

Re: fake "mail from"

Was a bit surprised this feature wasn't already built in as some tick-box option to protect the local domain(s) (particularly as being actively exploited and the cause is quite nuanced and relies on understanding the difference between SMTP MAIL FROM and the e-mail's From header). Here's my script. ...
by matthew1471
2019-04-27 17:34
Forum: General discussions
Topic: Block spoofed mail
Replies: 26
Views: 6924

Re: Block spoofed mail

Was a bit surprised this feature wasn't already built in as some tick-box option to protect the local domain(s) (particularly as being actively exploited and the cause is quite nuanced and relies on understanding the difference between SMTP MAIL FROM and the e-mail's From header). Here's my script. ...
by matthew1471
2019-03-07 16:27
Forum: General discussions
Topic: Moving many messages between IMAP folders = duplicate hell
Replies: 27
Views: 8924

Re: Moving many messages between IMAP folders = duplicate hell

I don't trust add-ons and wanted to have control over the process (performing full content hashing etc. to ensure I wasn't deleting some that just look similar from the headers alone). For those who care for C# and use MySQL, there's some source code here : https://www.hmailserver.com/forum/viewtopi...
by matthew1471
2019-03-07 16:01
Forum: User-submitted tutorials
Topic: How To Delete Duplicate E-mails (Particularly During IMAP Move)
Replies: 0
Views: 1014

How To Delete Duplicate E-mails (Particularly During IMAP Move)

So I moved a load of e-mails into a folder. I hadn't appreciated an IMAP Move is basically a copy and then a delete. Thunderbird I did not realise times-out quite easily (especially on large move operations). This meant I had a LOT of duplicate e-mails. Here is a C# program to fix that (provided you...
by matthew1471
2015-12-17 23:27
Forum: General discussions
Topic: Return-Path Invalid
Replies: 3
Views: 1209

Return-Path Invalid

Hi hMailServer, I am looking at a particularly malformed e-mail sent by the UK mobile provider O2. One of the error messages that a MIME validator is throwing is that the Return-Path header is not correct as the e-mail address should be encapsulated with a <, isn't this a header that hMailServer gen...
by matthew1471
2014-05-31 18:30
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

Just to update this thread, Roger replied and it turns out there's a crucial reason my friend's SPF was incorrect. My SPF library does it correctly. "Redirect=" is a modifier, not a mechanism, and it means "if no mechanisms match, then redirect". ergo: > whereas the library seems to force this and f...
by matthew1471
2014-04-30 23:39
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

Thanks, I've taken a look at the code :-) // parse the SPF record while (result!=SPF_TempError && result!=SPF_PermError) { ... switch (*cp) { case '~': cp++; prefix=SPF_SoftFail; break; case '-': cp++; prefix=SPF_Fail; break; .... } // redirect if (namelen==8 && memicmp(name,"redirect",8)==0) { Look...
by matthew1471
2014-04-29 00:52
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

Well hmail uses a library for SPF. The code is not hmail specific. Bill Interesting.. would you be able to name the library? :-) pySPF is happy with it: Input accepted, querying now... evaluating v=spf1 redirect=mail.negativezero.co.uk -all ... SPF record passed validation test with pySPF (Python S...
by matthew1471
2014-04-29 00:45
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

did you lookup redirect vs include? Yep, I personally use include on my own domains.. that way I can add additional rules. He preferred redirect which should mean that it will blindly follow the redirected one instead of whatever else you put in there (apart from servers that don't understand the m...
by matthew1471
2014-04-29 00:41
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

My read of the link you posted would say this above is incorrectly formatted There shouldn't be a '-all' at the end of a redirect statement The redirect should replace whatever the SPF rule is, but it doesn't seem to explicitly say you can't put in other mechanisms, only ONE modifier (redirect is a...
by matthew1471
2014-04-29 00:38
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

Re: SPF Implementation Incomplete?

I think you are making it vastly more complicated than it should be. ..their mx is pointing to your mailserver so their spf just needs to say I think I wrote it poorly as you mis-understood. He runs a mail-server (and it's not hMailServer) for his domain. I run a mail-server for my domain. He tried...
by matthew1471
2014-04-27 13:06
Forum: General discussions
Topic: SPF Implementation Incomplete?
Replies: 13
Views: 4005

SPF Implementation Incomplete?

Hi, Just had a friend send me an e-mail, hMailServer bounced it due to failing SPF. I've checked his SPF record and it doesn't look incorrect (it validates too): "TCPIP" 5112 "2014-04-27 10:28:38.450" "TCP - 94.102.149.130 connected to 192.168.0.1:25." "SMTPD" 5112 918 "2014-04-27 10:28:38.450" "94....
by matthew1471
2010-07-18 13:27
Forum: User contributed hMailServer 5 scripts
Topic: Running script for multiple recipients when using catch-all
Replies: 1
Views: 4619

Running script for multiple recipients when using catch-all

Sub hMailServer_RecipientDebugging(oMessage) '-- Get hMailServer to output the number of *real* mailboxes it detected. --' EventLog.Write "hMailServer detected " & oMessage.Recipients.Count & " recipients." '-- Get hMailServer to output the *real* mailboxes it detected. --' Dim LoopCount For LoopCo...
by matthew1471
2010-07-13 00:28
Forum: General discussions
Topic: Does hMailServer Support this?
Replies: 4
Views: 1252

Re: Does hMailServer Support this?

Thank you Matt for your kind reply, I have done some testing and understand now a little more how this works. The "Address" of the Recipient object gives the mailbox address. The "OriginalAddress" is whatever it was before the catch-all/alias. I wrote the following script. Sub OnAcceptMessage(oClien...
by matthew1471
2010-07-10 20:31
Forum: General discussions
Topic: Does hMailServer Support this?
Replies: 4
Views: 1252

Re: Does hMailServer Support this?

Forgot to add I could run some crazy regular expression (hard-coding the domains to react to) and a FOR loop, but this does seem a bit over engineered. Surely hMailServer should support telling me which of the multiple recipients the script is firing for and allow me to reject outright the ones it w...
by matthew1471
2010-07-10 20:14
Forum: General discussions
Topic: Does hMailServer Support this?
Replies: 4
Views: 1252

Does hMailServer Support this?

Hi, I've been running a website that when hMailServer receives e-mails it then processes it. I created a catch-all address and handle messages in an Events script (and decide whether to accept/drop/delete the message). After reading the SMTP RFC (RFC821, Example 1) I realised that when multiple reci...