hMailServer only replies on first time - windows

I've just installed hmail on Windows 2012 to self host a mail server. Opened the ports (25, 143 - SMTP, IMAP). Setup auto reply on some test accounts on domain.
I have a strange experience: The first emails I send to the new inboxes from my gmail account get auto-replied. Thereafter any more emails sent are largely not replied (i.e. mostly not replied but occassionaly very late). The hMailServer logs show it found the emails and sending the replies. I tried with my work email account to the new hMailServer inboxes and its the same situation.
I've checked the spam and they only occasionally go in there depending on the auto reply message body. Reverse DNS has been setup by my cloud instance provider.
Not sure whats going on but the hMailServer diagnosis does show red lights against MX records not being found local and internet domains (although internet MX route checking sites give it a green light when checking).
Why is it only sending out first time and then less likely other times.

Ok its because the autoreply function only sends auto replies once per email address. I ended up applying a 'rule' instead to reply and delete the incoming the message to reach the desired behaviour.

The autoreply feature only ONCE per email address PER SESSION. That is to say, when hmailserver (service) is stopped and restarted the cache is cleared and so the first occurrence of the autoreply already sent is forgotten. (Note: it also doesnt autoreply to 'auto-reply' emails as this could cause looping)

Related

Why Sagepay notification reaches some of our servers but not the others

Currently we have a few test servers which connect to test.sagepay.com to process transactions. However, on 2 of the servers, we could successfully register transactions on sagepay, but then we didn't receive any sagepay notification coming back at all. However, on different servers (running on different IP addresses), it is working perfectly fine.
I've got the error code "5006 - Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL". It used to work perfectly fine on those servers, and only stopped working since last Thursday although we are sure that we didn't touch those servers during that period of time at all. Besides, we do see a few occasional notifications coming in from sage which we believe are the REPEAT notifications, not the original ones. We could see all those transactions registered on our accounts, but of course all of them are failed due to the fact that we haven't got any notification coming back.
And we also do make sure that our firewall is opened for the whole range 195.170.169.* from which we expect to receive the sage notification
So my questions are:
Does Sagepay have some sort of mechanism to block some IP addresses and stop sending back notification?
Is the Sagepay-serer which sends out original notifications different from the one that sends out Repeat notifications?
I've faced the very same issue. Our script was handing https:// address over to SagePay as a NotificationURL, but https was not setup, hence the notification script could not be reached. Once I changed to http and ensured that the notification script response is correct it worked.
Also it seems that when SagePay could not reach RedirectURL it tried 8 more times.
I'm not exactly answering your questions, but perhaps it will help. I'd add this as a comment, but I can't...

Exchange 2010 is sending emails from accounts that do not exist?

All of a sudden, our exchange server has started sending out emails to .com.br addresses from accounts that do not exist in our organization. For example:
sadfjkh32#myorganization.com
sasdfsdkh4352#myorganization.com
sadhdf#myorganization.com
Please help.
You should review your recieve connector configuration to make sure you are not allowing someone to relay mail over your server.
Aditionally use the message tracking in esm and look for those emails.
Try to find the source IP address of those emails, meaning where they are generated.
Are they generating from an application server on your network. Maybe a scanner device, a pc...
As soon as you find the ip address you will have a better idea what is going on
Liran Zamir

How Can achieve delivery failure notice mail using Spring JavMail?

I am using Spring JavaMail for my Email communication application. How Can achieve the functionality that when a email delivery fails due the reason of wrong email address?
Achieving this reliably is not trivial. The protocol specs for SMTP in RFC 821 specifies a number of return codes. Notably 550 is what an SMTP server should return when attempting to send an email to a nonexistent address. I say should because most public-facing SMTP servers won't do this - they either quietly accepts the message and then drops it or, if they are a little more good-mannered, accepts the message but sends a "delivery failed" notice back to the sender ("from" address). Public services like MSN and Gmail will also blacklist senders if they send enough emails to non-existing addresses to prevent spam.
The reason for this is to prevent email-fishing and spamming.
So what you can do is to
Check for SendFailedException in your code. This will only work for servers that follow the SMTP specifications and actually send an error code back. Like I said, very few public servers actually do this.
Set up a proper mailbox for the address you use as sender and monitor that inbox for delivery failed notices. Note thought that these need not follow any common pattern, which is why this is non-trivial.
For the email servers that doesn't give any notice, you really have no way of knowing.
This is one of the reasons why companies buy mass emailing services from dedicated providers, since they have all these things already built to measure bounce-rate etc. But even with those, it's never going to be 100% accurate.
These FAQ entries might help as well:
If I send a message to a bad address, why don't I get a SendFailedException or TransportEvent indicating that the address is bad?
When a message can't be delivered, a failure message is returned. How can I detect these "bounced" messages?

Implement my own Email server in my machine

I'm very new to Email server config field.
I have 10 000 Email address in my database. My only requirement is send a mail to each and every email address. But I do not need to receive any mail(not need static IP). I know it is not possible with common mails like Gmail or hotmail. How can I do it ?
I have tried SMTP. Installed IIS 7. When I going to config the SMTP it ask a email address. I believe that it is act as a client and foreword mails to real Email server.
How can I implement my own Email server in my machine ? Or if I use Linux kernel how the things happening ?
please help me.
Well... we're talking about sending a mailing, right? :]
Hey, it's 2012, where in the middle of SPAM war! I'm more than 100% sure that you'll waste lot of time and end up with noting or with your e-mail account blocked by your ISP for sending out e-mail. Because you will have to use your existing SMTP server / account for encrypted sendout or your own, local server will only be able to use port 25, which is blocked on most destination servers.
Want to know the best solution? Find any site (like freelancer.com), where you can offer a one-time job of sending your e-mail do these recipients and pay for it. This is the simplest, fastest and low-nervous way. And it should be fairly cheap for only 10k addresses (I found some Hindi company on freelancer, where I paid 10$ (ten bucks!) for a mailing to 500k+ addresses, though quality and time of doing this job was really poor).
I had the very same issue. I wasted few hours for trying to setup own mail server or use some specific mailing piece of software. I considered many solutions, waste too much time and ended up getting someone from freelancer.com to do the job for me and paid for it.
You can also consider a professional mail sending service, like for example MailChimp.
MailChimp allows you to send up to 12 000 e-mail per month absolutely free (as a demo of their paid services). But since you can have only 2k addresses in your address book per once, you would have to split your 10k database into five parts and send out whole mailing in five days long period. But still, free.

Pipe incoming email to a script on Windows IIS SMTP?

I have a web application running on Windows IIS. This app has a database where each item has a unique key (1, 2, 3...), and a list of email addresses (among other things).
I would like users to send email to the server, using an email address that identifies the item, then have the server relay the message to the email addresses for that item. For example, if a user sends email to the following address:
item-75#myserver.example.com
Then the server would receive the email and pipe it to a script. The script would query the database for item 75 to get a list of email addresses, then re-send the email.
I could do this easily on a unix system using sendmail, but I have no idea if a similar setup can be accomplished on a Windows system (or if it would require additional software).
(This sounds like you want to implement a feature like craigslist).
The IIS SMTP service can send email, and also accept email.
Here is what you want to do.
Configure your IIS SMTP service to accept emails for a domain (You can configure this in the properties of the IIS SMTP service, under domains). Say domain name "myserver.example.com"
Then, in your DNS server, configure a MX record that points to "myserver.example.com".
Now, when email gets sent to your IIS SMTP server, it will actually get placed in your mailroot/drop folder (you can also change this folder in the IIS SMTP Service properties).
Now that you are accepting email, the next step is to write a script that will:
1)Parse the emails.
2)Modify them accordingly (do you just want to change the "to" address?).
3)If you want to resend the emails, then you need to modify them accordingly.
You will need to add a single X-Sender header, that is used to identify the email address sending the email, and a X-Receiver header, for each recipient that is going to accept the email. Here is an example email that was modified:
X-Sender: me#mywebsite.com
X-Receiver: recip1#theirdomain.com
X-Receiver: recip2#theirdomain.com
From: "jim bob" <jim#example.com>
To: <item-75#myserver.example.com>
Subject: test
MIME-Version: 1.0
Content-Type: text/plain;
Message-ID: <024f01c9e130$b3eca500$0401a8c0#local>
test
Once you have this modified content, you will want to write it to a file in the mailroot/pickup directory. Be sure to use a unique name.
The IIS SMTP Service will come by, pickup the email, and relay it on, sending the email using the X-Sender as the MAIL FROM address, and sending it to each email address listed in each X-Receiver header.
4)Run this script as a scheduled task. Another option is to build it as a windows service, or to implement something like a filesystemwatcher, where it executes each time an email is created as a file.
5)Another option to all of this is to actually implement a SMTP Event Sink, but I think that is overkill for what you want to do, and can create more headaches, than it solves. I would only go the event sink route if I like pain.
Hopefully I didn't make that about as clear as mud.
Event Sinks aren't difficult at all! In fact, there are about a dozen examples written in VBS (which runs on a Win server using WSH) which accomplish exactly what you wish to do. The OnArrival event sink runs in REAL-TIME using any computer user account you wish w/o any security risk since the message is asynchronous and doesn't report back.
This is actually a terribly easy thing to do - one of the easiest. Once set up, it never breaks either. On one server I've had one running for more than 9 years processing a few thousand incoming messages per day! I've set up about a dozen of these things - if it takes you more than a couple hours, you're doing it very wrong. If it were any easier than this on UNIX, my grandmother could be a UNIX programmer so I wouldn't go bragging that this is easier to do on a UNIX server.
http://msdn.microsoft.com/en-us/library/ms528023.aspx
http://support.microsoft.com/kb/894286
http://msdn.microsoft.com/en-us/library/ms526206.aspx
http://msdn.microsoft.com/en-us/library/ms526620.aspx
You could read in email through POP3 or IMAP using a timed script. I'm also a UNIXer so I'm struggling to comprehend how something like this is so difficult, but there you have it. Here's what I reckon you should do.
Make a script in whatever language you like. As long as it can read from POP3 or IMAP.
Have Windows run the script every 5 minutes
Have the script access the mailbox and action any emails it needs to.
My personal preference would be to install Python, but if you're limited... I don't know. ASPNET isn't bad, but I've never used it for dirty-scripting before.

Resources