Laravel 5.2 Mail cannot be sent outside domain - laravel-5

So when I try to send mails with Laravel's mail facade, I can only send within our company domain, when trying to send E-mails to either gmail or outlook, the mail never gets deliviered, but if I use outlook, the mail is delivered instantly.
I have turned everything upside down to figure out what it can be, but I cant find anything that cause this issue, not even a single trace of my app sending "non-internal" mails in the exchange logs.
Our company uses an Exchange 2003 server, I have checked the logs, no trace of (Out of company) mails are there
Im on a 20 hour streak, sorry for any confusion
/Tarre

The issue was that our Exchange SMTP relay didnt have the correct connectors and configuration.
To use exchange with SMTP.
Add a Connector bridge between your Exchange server and the Virtual SMTP server.
Configure "trusted" IP's.
Everything is done in the Exchange Server Management part.

Related

Which SMTP sever to send Java Mail to when the server is cloud-based?

Java 8 here, although this really is more of a generic Exchange/SMTP question I suppose.
I purchased a domain name and Office 365 support from GoDaddy, and as a result, have several email addresses through them. Let's say one of these is support#myapp.example.com.
I am writing a Java 8 app that will allow users to send emails to this support address (through the app). I will likely use the excellent Simple Java Mail library, which wraps the Java Mail API. And so somewhere in my app there will be some code that looks something like:
Email email = EmailBuilder.startingBlank()
.to("MyApp Help Desk", "support#myapp.example.com")
.withSubject("Support Ticket #12345")
.withPlainText("Something went wrong inside the MyApp!")
.buildEmail();
Mailer mailer = MailerBuilder
.withSMTPServer("smtp.host.com", 587, "user#host.com", "password")
.withTransportStrategy(TransportStrategy.SMTP_TLS)
.withProperty("mail.smtp.sendpartial", true)
.buildMailer();
mailer.sendMail(email);
Pretty straight-forward stuff, right? Except I'm confused about one simple thing: which SMTP server am I using here? Would I use the Microsoft Exchange server that my GoDaddy account provides me, or would I choose something else?
That depends a little bit on what you want to do.
If you just want to make one attempt to send the mail, you connect to the mail server that accepts mail for support#myapp.example.com. It sounds like this is an office365 server owned by Microsoft that accepts mail for myapp.example.com. There should be public DNS records for that domain. I haven't used the Simple Java Mail library, but from your pseudocode, I assume it does the DNS lookups for you.
It sometimes happens that an application encounters errors when trying to send an email. For example, somebody could restart your app server in the middle of the smtp conversation, or reboot your router, or something else. It's pretty common to use a Mail Transfer Agent (MTA) such as Exchange to help make this process more robust. If the MTA fails on the first delivery attempt, it will retry delivery for some configurable period of time. In your case, you could send the email to your Exchange server, and it would route the email to myapp.example.com.
(In this case, Exchange is sort of acting as a Mail Submission Agent (MSA), but that's kind of a nitpick.)
Hope this helps.

Preventing DOS_OUTLOOK_TO_MX SpamAssasin's flag

I have an application hosted in an Amazon EC2 Server that uses e-mail service from a shared web host. I did this to utilize the shared hosting e-mail server and the available e-mail administration tool and webmail interface.
My application uses amazon SES to send e-mail. I just authorized SES to send mails with my domain name (by adding some entries to my dns records and confirming I'm the domain owner), and this is working ok. When I need to send a mail, I connect to SES SMTP server and send it using PHPMailer.
Everything is working ok, except my mails are getting the DOS_OUTLOOK_TO_MX flag in SpamAsssasin's, making it sometimes be classified as spam.
What this flag means? Is there some way to avoid it?
Spamassassin DOS_OUTLOOK_TO_MX rule is fired when two internal flags are set by processed message: __DOS_DIRECT_TO_MX and __ANY_OUTLOOK_MUA.
__DOS_DIRECT_TO_MX flag means that the message was sent directly from sender email client to recipient MTA server. This is usually true for internal mail but can occur in your case when a recipient also uses Amazon SES for mail processing.
__ANY_OUTLOOK_MUA flag means that the message has X-Mailer =~ /^Microsoft (?:Office )?Outlook\b/ header.
Both internal flags are harmless by themselves but their combination leads to DOS_OUTLOOK_TO_MX with high spam score. You need to check X-Mailer header of messages sent with PHPMailer. This header should be set to PHPMailer, not to Microsoft Outlook or something similar.

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

Heroku sending outgoing email: IPs in DUL and blocked by Trend micro

We currently need some help setting up email sending from one of our Rails apps via our own Microsoft Exchange SMTP server. It seems that the Heroku IPs are blocked by Trend Micro. We are having this message:
"Your email messages have been blocked by the recipient OR by Trend Micro Email Reputation Service. Contact the recipient or his/her administrator using alternate means to resolve the issue"
What can we do in this case, please give us some guidelines.
Thanks
If you can get around the requirement to use the exchange server that's blocking you, you can just use one of the email add-ons on Heroku. Alternatively, you could maybe use the Proximo add-on to get a static external IP address to send emails from, and then make sure that static IP is whitelisted on your exchange server.

How can I send mail with SMTP and see the mail in the Outlook outbox?

We have a new Exchange server and use SMTP to send mails over it. This works so far, but we have no idea how the SMTP mail can be configured so that the outbox in Outlook 2003 of the sender account shows this mail. Is this only possible using MAPI or other mail client protocols?
Yes, email sent via SMTP will not be stored in the Exchange database. The simple way to work around it would be to automatically BCC the sender on any email sent via SMTP. It wouldn't be perfect as it would look like an incoming email, but at least the information would be there.
There might be addon products that you could buy that would listen in on any SMTP traffic and automatically create "sent items".
But the best solution would be something like Exchange Web Services, CDO or MAPI (depending on what your needs are and what software versions you're using).
If the accounts are IMAP accounts, you can use that to put the mail into the Sent folder. Otherwise, you'll have to use the Microsoft protocols like MAPI.

Resources