I have postfix and dovecot running on a server. When a certain kind of email comes in for accounts on the domain, I'd like an SMS to go out. I already set this up for one user using Postfix's BCC mapping and the "SMS email addresses" provided by the tel co.
However, here in the post-Snowden world, with heightened awareness of how easy SMS apparently is to hack, and with potential issues with long emails being sent via SMS, we want the SMS to just say "you got an email" or something like that. We don't want to BCC the entire email message via the SMS system. That's what email is for; we just want the SMS to be an alert, like the way pagers were used in the old days. I suspect there should be a way to do this but it might take me days to learn enough about procmail or script piping and postfix gateways to figure it out.
I would be surprised if I was the first person in the world to want to send an SMS alert on email events?
So the BCC is apparently not a problem. The email-to-SMS is apparently not a problem. The problem is how to modify the body of the BCC'd email, or otherwise how to send a simple SMS alert (or simple email alert) upon certain email events (specifically, when email is received for certain recipients on the server via postfix).
Thanks!
You may use dovecot's sieve with enotify or vnd.dovecot.execute.
Simple enotify can deliver exactly what you have asked for. Dovecot specific vnd.dovecot.execute can be used to implement extra protections to avoid turning mail bombing into SMS bombing.
Example from RFC5435:
require ["enotify"];
if header :contains "from" "boss#example.org" {
notify :importance "1"
:message "This is probably very important"
"mailto:alm#example.com";
}
Related
I put a lot of effort in perfectionizing my emails in Magento, in mail-tester i even have a 10. But stil the emails (also when i send a not transactional mail) go to spam in gmail and outlook.
Any idea why?
Email deliverability involves a lot of factors so more information is needed to help you. What are all the services you use to send email out other than Magento? Do you do email marketing? Do you get good engagement with your email marketing (opens. clicks) with low bounces? What's the nature of your business and the content you send in the Magento emails and other emails you send out (e.g., marketing emails) even if through other services?
What precisely is in your Sender Policy Framework Record (SPF) record (please post exactly what's in your SPF record for sending domain)? Do you have DKIM implemented with services that send mail on your behalf? Have you implemented DMARC?
Do you send email from a dedicated or shared IP address(s)? Check hosts and IP address for blacklists at mxtoolbox and check your senderscore at senderscore.org.
Do you know if the problem is limited to Magento or do other emails sent from that domain go to spam as well? You may want to set up a test account or two with gmail and outlook.com as it will be handy to have some email addresses to send to that you've never sent to before for testing purposes.
Note: I tried to post this as a comment but it was too many characters.
In my web application, I need to send an email to a group of people.
If I make the email addresses of the group of people as the TO addresses, then each recipient will be able to see who other recipients are and their email addresses. This is not what I want.
I want to make the email addresses of the group of people as the BCC addresses, which I am able to. However, I want to show "Our Team" as the recipient in the email to everybody. How can I do this? I googled but did not find useful information.
Any info or pointer is really appreciated.
Thanks in advance!
You can put whatever you want in the To header, including a fake email address, and then use the send method to send the message to whatever recipients you want.
But, you should ask yourself what you expect to happen if someone does a reply-all to the message. Do you want the reply to go to all members of your team? If so, you really need to create a mailing list, which will simplify the process of sending the message as well. Most mail server support some sort of mailing list capability. If you're using your own mail server (e.g., your company mail server), you may also want some mailing list management software.
Hi I am using the bellow function, can you please guide me how can I use Mail::failures(); in it
Mail::send('emails.caregiversetprimary', $templateArray, function($message)use($email)
{
$message->to($email, 'username')->subject('my subject');
});
Mail::failures(); < ====== this gives me black array as I have used wrong email
I am using laravel 4.1
tl;dr
You can know which recipients the email has been sent to but no which recipients have received it.
details
You need a better understanding of how mail servers work. From a Laravel point of view, there is no way (or at least not a simple one*) of knowing which recipients got the email. Its a matter of how mail protocol works. You may know which recipients the message has been sent to but no which recipients actually got it.
With Mail::failures() you get a list of recipients to which Laravel tried to send the email but it failed on actually sending it. But again, if it has been sent there is no straightforward way to known if the mail reached their inbox or no.
*If you happend to use Mailgun, Mandrill or any other 3rd party software then you are not dealing with a mail server 'per se' but with an API service. May be you could check the mail service provider documentation to research if they perform any kind of delivery tracking that you can programatically check.
Is there a way to setup Outlook 2010 to run a script or some other form of sanity-check when you attempt to SEND messages from the client? My specific situation is that I use the same outlook client for multiple accounts (work, gmail, VPS server, etc) and I've found myself a couple of times sending emails "from" the wrong account.
In a perfect world I'd want to be able to write a script with logic something like the following:
when (I hit send)
if (the "source" account is "myuserid#gmail.com") then
if (there are addresses in TO or CC that match "work.com") then
pop up a dialog box that says:
"You appear to be sending email to work.com from gmail.com - do you really want to do this?"
if yes, then send it and return
if no, go back to the message compose window
that way, I'd have to actually very intentionally use a non-work email address to send email to the work people (which is rare in my particular case)
Try SendUsingAccount to read the "source" account in ItemSend.
I'm trying to figure out how to set up an SMS service where users can communicate with people on phones that are not participating in my service. "TextFree" on iPhone does something like what I want to do. They let you sign up, then you can send messages for "free" to other friends that aren't part of the service.
It looks like when you sign up for TextFree, they assign you an email address [user#textfree.us]. People outside the service without MMS capabilities can't send an SMS to this user. The user must first send an SMS to them, starting a conversation. I think this is what they're doing:
Textfree signs up for an account with a bulk SMS provider, and is assigned a single phone #, like "123".
Joe signs up for TextFree, gets assigned email: joe#textfree.us.
Mary wants to send Joe an sms, but can't because she doesn't know what # to direct the sms to.
Joe sends an sms to Mary using textfree. This really just makes an http request to some textfree server. The server gets the request, and the destination # (Mary's phone).
The server sends the sms out using their bulk sms api provider.
Mary receives the sms, and sees the originator phone # as "123".
Mary replies to the sms, using this phone #, "123".
Their sms provider receives the message, and forwards it to textfree's http server.
Textfree now has to resolve that the sms received by Mary's phone # is destined for Joe (not sure how this can be done), so it can be delivered to Joe's account.
I think that all makes sense and seems feasible, I'm just not sure about that last step, how they could figure out which conversation sms' belong to. If all outside users are directing their sms to phone #123, how could I figure out which internal user the message is destined for? Is there some way to embed a unique identifier in an SMS, so that when the external user replies to the SMS, some unique ID can be embedded in there to provide that type of context to read on the reply side of things?
Long question, thanks for any thoughts!
As for the last part of your question (unique ID in SMS):
I know of no mechanism that could help you here. When replying to a short message phones only set the sender address as destination and the user is free to type the text. The headers in a short message PDU are solely for the basic transport parameters (encoding, sender-ID, ...). There is a way to define so called user data headers, but for this to be of any use for you, you'd have to be in control of most of the devices that are involved in the message delivery, including the handsets... So basically the only way I see to correlate messages with each other reliably is the use of some ID within the message text.
An alternate approach would be to rent a bunch of numbers and assign these permanently (I assume some subscription model here) to your users. This way you could use these as identification numbers within your service and forward the messages to their real phone numbers (or even a completely different media like email / instant messenger).