Receiving mails with node-read is basically no problem thanx to the mail node.
My current problem is that I do not know how to avoid receiving the same mail twice when the server is restarted. One solution would be to delete every mail received, it I can't find a node for doing so.
Another problem which could arise is derived from the documentation - only the last mail is received. If, in a given intervall, several mails arrive, I guess only one of them will enter the flow - is tehre any solution for that?
One workaround I currently use is to send another mail to the inbox after processing the first one. The second one is recognized as "status"-mail and will not be processed.
Related
I am working on an application (in Delphi XE8) that amongst other things allows the user to send emails. The solution I have chosen is to simply save the email as a text file with a "From:" and "To:" field in a SMTP pickup directory, which has worked fine up to now. I use a SMTP virtual server set up in IIS 6.
However, a new requirement is to be able to choose the sending time of the email. Is there some way I can specify this through the text file, or is this only possibly by changing the IIS settings? I would be very grateful for any tips that anyone may have.
If your code can detect the From And To fields correctly, why not just add a Time: entry in your text file and skip that file if the time has not been reached?
Try using IMAP4 (standard protocol for service-based handling of mails and folders for a mail client) instead of SMTP. Then use an email client that supports postponing of sending messages, and use its scripting to configure message sending the way you want it.
If your program continues running till send time, you could also create a thread that waits till the time you want the message sent, but I suppose that is too simple :)
we've got different processes that send mails in case of issues encountered (e.g. not enough permissions to perform an operation on a certain order item). This works fine to the point that sometimes identical messages are sent every 5 minutes. In our environment it is very difficult to synchronize the email sending on application layer (actually there are different applications sending out email, so we'd have to touch every application if we were to implement this inside application layer).
It would seem logical for me that filtering out mails (by duplicate subjects) is best done within the email layer, e.g. the application receiving the SMTP requests.
Yet we'd also prefer not to go down to SMTP layer by ourselves, rather use an existing service/application.
Is anybody aware of a web mailer (like googlemail) which does this kind of filtering? it would be ok for us the pay for such a service, so being "free as in beer" would be nice, but being not free is not a showstopper.
Thanks in advance
Holger
I find the idea of filtering duplicate e-mail message by the Subject: header quite worrisome. If they are produced by multiple applications, how can you be certain that the content of the messages is duplicated and that you are not unwittingly dropping important notifications?
The only unique feature of a message that can be used to filter out duplicates is its Message-ID: header. If that header is the same for two messages, then it's usually reasonable to assume that they are copies of the same original message - e.g. one received directly and one that was CC'ed to a mailing list.
That said, you can do pretty much anything you want on most SMTP servers - at least those that are based on a Unix-like OS. For example, Postfix can use custom shell scripts for filtering.
You can, for example, use formail to extract the body of each message and produce its
MD5 hash. Comparing the message body hashes along with the Date:, Subject:, From:, To: and Cc: headers at the same time is a good start to detect real duplicates.
In a couple of recent projects, I've written an e-mail queue as a database table that is checked every minute by a cronjob. The cron script waits a few seconds in between sends.
The reason I did this was because I read somewhere that it helps your e-mail not end up in the spam folder if it's not blasted out from the same server all at once. I don't remember where I read it.
What do you think? Should I just mail things immediately or is an e-mail queue a good idea?
What are some pros and cons to this approach?
EDIT: Added last paragraph.
Do you have control over your SMTP server? If so, then there's no point in doing an email queue PHP-side. The SMTP server will already have queueing capabilities. If you're worried about blasting a particular receiving server, you can always turn on your SMTP server's throttling (if it has it), something along these lines.
I want to process a particular mailbox when it receives mail, I know I could have cron check every n minutes for any mail, but wondering if there's a way to "listen" for mail rather than continually polling.
Try a .forward file
You can pipe the message into any program or script you want, but also check if procmail can do what you want.
Depending on your mail server, it may be possible to actually have any incoming message be delivered to a process. Either in a .forward or by setting up something more advanced. In exim you can setup a transport to run a command, for certain addresses.
If you're using postfix I'd suggest aliasing the mailbox you're interested in to a process that will do the work for you. Then there's no polling. The message comes in and goes directly to being processed.
As Jason and Zoredache have already mentioned, you might be able to do this in the MTA itself. Another possibility is to have inotify watch the mailbox file or maildir.
if you dont have a mail-server on your own (root-access) - you could use a web service for that: http://cloudmailin.net (200mails/month for free) - works like charme and helped me out.
I have to make a newsletter sending utility application which will collect the list of subscriber from our central database and send out the newsletter. I've considered the possibility to be blacklisted due to flooding if I just flush out all emails at once, so I decided to go on a desktop-based softwer which will email those slowly.
my question is
what is the max emails per hour that may be addressed to the same email domain (recipient/incoming server)?
or what should be delay between 2 e-mails to the same server for it doesn't consider it flooding?
whichever of the above applies more appropriate to the real-world of mail servers configuration...
thanks
I make Thread.Sleep(2000) after every 2 mail
It's really going to vary by configuration, so there's not necessarily a one-size-fits-all answer. You might want to check with your ISP - it's probably them or their upstream that you'd need to worry about.
Since you're sending a newsletter, could you add multiple recipients via BCC rather than individual messages? That should be less "abusive" to all concerned.
I've implementing sending to max 600 e-mails per recipient domain. That seems to be working fine for some time now and sounds like an OK solution.
Still, some SysAdmin insight on this would be appreciated.