I want to integrate my app to office 365 / Exchange server for incoming mails. How to proceed? - email

When any user from the internet is posting mail to our mail server, ( for example, suppose I own contoso.com and I
am using office.outlook.com to connect to our mailbox).
When mail has been posted to contoso.com, I want to examine the mail before it reaches to end-user i.e. contoso.com.
Suppose I have an application called ContosoExaminerApp. Then my mail flow would be something like
Internet ---> ContosoExaminerApp(it can add some additional information or check for malicious mails) --> contoso.com(mail server/office 365)

Related

Email succesfully sent but not appear in Sent Items (Microsoft 365)

Hi Good day to everyone here.
My first questions, here we go but i'll try to explain it the best way I could.
I develop auto sending email features using javaxmail in my application for my customer.
Previously when using setting smtp.office365.com I able to send email and the copies of sent email are display in Sent Items folder.
Recently when there are hiccup with smtp office (time out frequently), the IT department at my customer change the setting to use local server instead for smtp (with ip address 172.162.etc.etc). However since the start using this new setting, the email no longer appear in Sent Items but the email still able to sent out ( I test sending email to myself and able to received it ).
Since Im not really familiar and have very limited knowledge on server side for mail server, is there anything I can suggest to the IT department to check for? I only can login the email account on web (https://outlook.office.com/mail/) but when using outlook it required authentication. With web mail i already go thru all settings available and didn't see anything related.
Thanks in advance. Sorry if the question confusing and misleading.
Well, of course - your local SMTP server knows absolutely nothing about your remote Exchange mailbox. It cannot possibly place anything in your Sent Items folder.
You need to send using your Exchange Server - its SMTP server does place sent messages in the Sent Items folder owned by the authenticated user. Keep in mind that MS has recently disabled basic auth in M365. You need to re-enable it for your tenant and the particular mailbox used to send messages.

User cannot mail themself via Exchange

We currently experience the problem that a user cannot send a mail to herself.
She get the error that she's not allowed to send e-mails from this address.
(You are not allowed to send on behalf of this user...)
Her e-mail address is AAA#domain.com.
(From AAA#domain.com to AAA#domain.com)
She can:
Send e-mails internally
Send e-mails externally
Receive internal e-mails
Receive external e-mails
We make use of Office 2016 and Exchange 2010 14.03.0399.000
I found out that the local address book was corrupt.
Disabled addressbook, deleted the local file and enabled it again.
This solved the issue

Sending email from GCE or AWS on behalf of users

How could I use Google Compute Engine (or a similar service, like AWS) to send email on behalf of users via their SMTP server?
I am interested in building an online email client which allows users to enter their SMTP and POP servers and send/receive email, like they would with their desktop clients. GCE blocks all SMTP ports to prevent abuse and recommends using a mail service like SendGrid instead. However, after researching dozens of these services, they all seem to only support transactional email using their own SMTP servers, or possibly a pre-cleared smtp server. I simply want to send email using the user's SMTP server (ex smtp.mail.yahoo.com), just like they would if they were using a desktop client.
I realize I could host my own servers but I am not interested in maintaining the infrastructure. I would like to host everything on a cloud service. Is there any way I can work around Google's restrictions with an existing service?
As I'm sure you are aware, you would have to have the user enter their SMTP server information and account credentials. You would then use that information to connect to their SMTP server.
By default AWS EC2 instances have SMTP traffic on port 25 rate limited. To remove this limitation, you would need to fill out and submit the following form:
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
If you're looking to send mail as a Gmail, Hotmail, or Yahoo user, you'll probably want to call the service's API to have the server send mail on the user's behalf. There are several benefits of this:
You'll need to get authorization from users (usually via an OAuth flow)
in order to access their mail. This means that users shouldn't be
surprised that you're sending mail from their accounts, and they'll
have some control over your access.
The mail will be signed and come from the appropriate IP addresses to
comply with the various spam-control mechanisms set up by those
companies. Without this, it's likely that the mail you send will end
up in the bit-bucket of the recipient.
By using the API, the service should be able to keep a copy of the
sent mail in the user's outgoing mail folder. This will let the user
see and search for the original message sent if they want.
Unfortunately, this may also mean that each mail service you want to send from will need separate integration, and that you may not be able to send as the user's email address from smaller providers.
Note that the App Engine mail API allows you to send mail as the currently logged-in user (when logging in, users have a similar consent screen to the OAuth process mentioned above).

Creating a plugin/component that will filter incoming emails on an exchange server?

Is there a predefined protocol / API that will allow me to create a plugin component for exchange (let's say 2007+)?
I need to write a simple spam filter that will communicate with the exchange server and receive every mail that is received by that server. If the mail doesn't pass a check, it will be deleted from the server before being delivered to the user. If it is ok, it will be placed in the user's inbox.
I am looking for a protocol that supports the following:
subscribe to receive a notification whenever an email arrives to the server (before the email is placed in the users' in-box.
get the content of such emails.
have the ability to block further processing on some emails (so they are blocked before reaching the inbox).
Thanks in advance,
May be u can write a transport agent(Exchange Server 2007onwards) which will monitor and act on all the emails flowing through the organisation.
You can get most of the details of an email via a transport agent depending on the event at which u trigger the agent.
Here's a link which gives a thorough documentation.
http://msdn.microsoft.com/en-us/library/exchange/bb204097(v=exchg.150).aspx
You can check body/subject and if it doesn't comply with any of the organisational policy,just clear off all the recipients and the email delivery won't happen.

Can I use my web server as mail server?

I have a dedicated Linux web server where my website is running like www.example.com.
Now I want to start another service for my users and want to give mailing features like Gmail and Yahoo mail.
I want to give facility to my users to create email IDs as they create on Gmail or Yahoo Mail and use it as their email address like XYZ#example.com or ABC#example.com.
Is this possible for me to use my dedicated web server as mail server too,
or I need to hire a new specific mail server for this purpose.
Also, if I can use my server as mail server and can give IMAP and POP like features then what are the PROs and CONs in that?
My hosting company says that I have facility to create unlimited email addresses
and I have created a few for mt like support#example.com and feedback#example.com
and I am getting emails on these IDs.
Is that mean, my hosting already have setup a mail server for me (the same I mentioned in my question and want to setup)
Or this is just for me to use and manage my website and I can not share these email addresses with my users by giving an email service.
Yes you can run simultaneously a web and mail server. Follow part 3 of this guide: http://mysql-apache-php.com/ to set up email. Just make sure that your router is fully capable (supports NAT etc.) - it should be able anyway
However it does appear from your question that your hosting company has set up its own mail server. Which does mean unlimited emails, however the only issue could be the amount of space they are willing to host for you (As in you can only have 2 GB of space on their mail server). Hope this helps.