Qmail - Forward email without attachment - forwarding

I have pretty standard Qmail toaster installation. I'm using the dot files to set up mail forwarding for my account, so when I recieve an e-mail, this e-mail stays in my mailbox and is also forwarded to another email address. Easy, you say. And yes, it is, it is working fine ... except ... That this another email adress is actually a cell phone number, so I get an SMS notification about each email I recieve.
But, as our phone provider limits the size of an SMS, if I recieve an email with attachment, Qmail tries to forward it to my mobile phone, but this fails, the error message gets back to original email sender and he thinks the email was not delivered at all.
I haven't found any solution to this, but I came to an idea - if there is a possibility to LIMIT the Qmail, so he doesn't forward the specific type of emails (in my case, emails with attachments) ? Or somehow restrict him from sending back the error messages from these forwards ?

Stripmime
http://www.phred.org/~alex/stripmime.html
.qmail-default:
| /usr/local/bin/stripmime.pl | /home/vpopmail/bin/vdelivermail '' myphone#example.com
or
Demime
http://scifi.squawk.com/demime.html (link not working anymore)
.qmail-default:
|/var/qmail/bin/demime -8 myphone#example.com

Related

Twilio SMS sent to Sendgrid to forward SMS as email to our ticketingsystem

thanks for having me! I'm a real n00b when it comes to coding and, so waaay over my head here.
The sending sms via twilio and recieving it in our ticketingsystem/RMM works as expected. In the subject line of the email is the phonenumber from the sender, the email we recieve gets recieved as "+46123456789" (just en example). The RMM we use has an API, I would like the Twilio service to connect to our RMM API and replace the phonenumber with the user email instead of sending number. So when they send sms and we recieve the email the email would then automaticly be assigned to the correct person. Cause the RMM system uses only the email adress when assigning email to a person. I hope this makes sense to someone, i find it so hard to explain what im trying to achieve.
Expecting to recieve an email sent as sms by recognizing the number from our RMM API

AWS SES bounced/complain email handle

We have some issues related with AWS SES bounce and complain emails,
and we send send emails on these conditions. these conditions are as follows:
1) When new user registered, 2) When user forget his/her password and 3) When he/she purchased any video from ourplatform. To send email we have implemented AWS SES mail service and successfully managed to send email from AWS SES. But here I have some doubt to handle Bounced and Complaint email. According to this post on stackoverflow:
Handle hard bounces / complaints or just stick to suppression list?
We have managed list of emails in our database, when new user 1st time registered into our platform and getting notification for bounced and complaint notifications from AWS SNS. But here are some case I want to discuss with you:
Bounce: When user 1st time registered into our platform and his/her email does not exist i.e. jm123#gmail.com in that case we save his/her email into our bounced email list, but when 2nd time he creates a email with the same email id ( jim123#gmail.com ) and want to register with our platform again then how we will remove that email from list because we have already black listed that email in our platform.
Complaint: In 2nd case when user accidentally put our platforms email as spam when we send him/her a email and getting complaint notifications for that email and for complaint emails we have managed list of complaint emails and saved that email in this list so that same user can not get email from the next time but after some time that user white list us from spam and wants our email notifications.
Note: Is this necessary to handle all bounced or complaint email into our database because randomness of emails are infinite and for all random emails we have to handle into our database. and before send emails to any new registered user, 1st we have to process our bounced and complaint emails list then we will decide the user is eligible to receive our email or not.
Sorry for my bad English.
The StackOverflow Question you linked to covers this in the Answer.
Yes, you should maintain your own database table of at least some of the permanent bounced emails, something like:
record ID (auto increment), email address, bounce type: invalid mailbox | user complaint | rejected for content | rejected for spam blacklist
Bounce: "when 2nd time he creates a email with the same email id ...
how we will remove that email from list because we have already black
listed that email in our platform?"
When the user tries to add the email, you query the email address in your table, you see the type is "invalid mailbox", and then reject it as invalid. You could possibly also log the IP address to catch spammers trying to create fake accounts.
Complaint: "... but after some time that user white list us from spam
and wants our email notifications."
When the user tries to add the email, you query the email address in your table, you see the type is "user complaint", and maybe ask them "are you sure?" before adding them back to your mail list. You change the type of the email in your database to something like "user confirmed OK to send"
You could also just add one extra field to your existing mailing list table to hold the bounce type, with the default type being 0 / OK / not bounced. Then when sending email you skip sending emails where the type is not 0 / OK.
But in hard bounced if user will have valid email address after put
his email address in table and he/she wants our subscription then how
we could handle
You could allow them to re-add the address and set the type back to 0, but this might be a fake address like "fake#fakefake.com."
If you want to let them do this you could have a second field "times bounce was cleared" and add +1 each time the address is set back to 0 / OK / mail allowed. If this counter reaches 3-5 you never let them add the email again. They must use a different email.
what about soft bounce
"Transient" (soft) bounces should be ignored. SES will try again later and if it still fails then you will get a hard bounce.

Preventing an email from being sent to Outlook's Junk folder

I'm writing an application that creates a word document and emails it to a user from our shared mailbox. The code works fine, however the message is delivered to the Junk folder instead of the Inbox.
I believe this is because it's coming directly from the email address (mymailbox#company.com), instead of the mailbox name in our Global Address List (My Mailbox).
Is there a way to get VB.Net to recognize my Global Address List so I can send directly from the mailbox name; or is there another solution to this problem?
You can set the "from" address in mailmessage.from to the proper email address. However, the "from" address is usually not enough to get an email sent to the spam folder.
There are several steps you can take to make it more likely your email gets through. The links in the comment above Rachel Gallen cover these pretty well.
http://www.allspammedup.com/2009/09/7-ways-to-prevent-your-emails-being-blocked-as-spam/
http://www.interspire.com/content/2006/09/28/improve-your-email-delivery-rates/
Just why something ends up in the junk mail is something set by the recipient's email client and/or ISP and not something you have control over. You may be able to maximise your chances of appearing to be non-spam by making your email have fewer spammy characteristics - if you could re-cast your sending system to create the message as an email rather than an attachment this may help.

Read mail (IMAP) but only show messages from certain email address

Can I retrieve emails using IMAP server details from a UITextField and show them in a UITableView but only show emails which come from a certain email address (e.g. example#example.com)?
Thanks,
James
SMTP is for sending Mails, not receiving them. If you want to try IMAP for receiving check MailCore, it might help some hassle implementing IMAP.

Mailsystem Failure Delivery - Custom subject

When a mail is bounced it has a standard subject.
Is it possible to change with a custom subject or the subject which we gave or with a dynamic subject?
I am building a simple system in php to count all send and not sent mails with the help of bounced mails.
So i need to parse the body of the bounced mail to find the email address to which the mail was not sent.
If there could be any other less overhead option then that could be nice. We can reduce the processing time to parse.
You can send a custom x-mail-id header or use the standard Mail-ID header. You store in a table a map of the id to email addresses.
From there it is simple to find out which email bounced by matching the id to the email address in your table.
That subject could be generated by any server along the path your mail message takes, so I'd say no, you can't change that.