Send email from Gmail to localhost (Postfix) - email

I need to send email from Gmail to my local machine with Postfix. How to do it?

If you want to send email from an external mail server to your email server this is what you do:
Get a public IP address to your mail server.
Get a domain name for sending the incoming email. Let us call it yourdomain.com.
Map MX entry for your domain yourdomain.com to the public IP address of your mail server. MX entries publish your domain's mail server location so that a mail server like gmail can find our where the email should be sent.
With this setup any email sent to a valid user on your mail server using email address like user#yourdomain.com should reach your server.

Related

Sending email directly using MailKit

All the examples I've seen on using MimeKit/MailKit to send an email has the SMTP client logging into a SMTP server and sending the email through that server. Is it possible to have MimeKit/MailKit send the email directly to the recipient?
In other words, if my app wishes to send an email to friend#hisdomain.com, is it possible to get the MailKit SMTP client to communicate directly to the SMTP server at hisdomain.com and send the email without having to go through my SMTP server? Or, if I have an app programmed to send me the daily whatever, to send the email to my SMTP server without having to actually log into the SMTP server.

Can I use mix of GSuite and my own server to send emails?

I am hosting my email address, for example, arvind#mydomain.com on Gsuite.
How do I add more addresses in my server such as abc#mydomain.com and use my own server, such as my website to send emails to this user. I created abc#mydomain.com using WHM/cpanel for the domain. I am able to send email from this address but they end in spam folder. Also I am not able to send emails to this address.
I have added Google's server to MX entries and my own server such as mail.mydomain.com. However if I try to send email to abc#mydomain.com it fails with "Address not found".
How can I fix it? I am able to edit DNS entries if required to.

Gmail doesn't show own domain mail

I have changed my domain provider to Goddady, also I have my own server so I set domain DNS to this server...
Inside cPanel, I changed mail DNS to google DNS, and all the email is received on the mailboxes correctly.
The problem comes when I try to send mails from Wordpress to any mail from the same domain, gmail doesn't show it, but the email are achieving the server.
From webmail I can check this, only the wordpress mails are arriving to the server, but no to gmail mailbox.
If I try to send mail from Wordpress to another mail (not same domain) it works...
Any ideas?
Thanks a lot
Solution: Open server ports 465 and 587 and set gmail smtp in Wordpress

VestaCP/exim mail server returns 550 smtp auth requried

I have just installed VestaCP on a fresh CentOS VPS.
I have set up email for one domain. All mail sent to that domain bounces with the error 550 smtp auth requried
I have commented out the following;
deny message = smtp auth requried
from exim.conf
I have turned off anti-spam.
I still get the bounce with this message.
Specifically, if I send an email from a gmail account google responds:
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain foobar.tld by mail.foobar.tld. [x.x.x.x].
The error that the other server returned was:
550 smtp auth requried
Any experience with this? I have seen the problem on a number of threads but have not found a solution.
I partially solved the problem. It only occurred when sending mail to the smtp server from a domain that was hosted on the same server for web but not for email. When I sent email from a domain that had nothing to do with any domains hosted on the same server as the exim instance, then it got through. I still can't send email from the domain that was causing the problem and I would like to, but I can work around it.
So to be clear in case anyone reads this:
domain1 web is hosted on server1
domain1 email is hosted on google's servers
domain2 is hosted on server1 for web and email
exim is running on server1
when I send email from thunderbird via google's server from email#domain1 to and email#domain2 the exim instance asks google's smtp server for authentication even though the mail is being delivered to a mailbox in its list of domains it can deliver to on the same physical server where it is running.
I suspect that it is suspicious of the from address, which it shouldn't be since the mx records indicate that it does not host mail for that domain.

DotNetNuke is not sending out mails using SMTP Server

I have configured my DNN mail server to send out mail using our companies Email service provider. I cannot send any emails to external email server.
For ex. My email provider is testx#ttt.com. I can send emails to testy#ttt.com and textz#ttt.com. However i cannot send to testy#gmail.com or testy#hotmail.com
The error i see in the DNN event viewer is as below
System.Net.Mail.SmtpFailedRecipientsException: Unable to send to all recipients.
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable.
The server response was: This domain is not hosted here
I have the same email address configured in my outlook and i can send/recieve to any emails like gmail or hotmail. Following are my DNN email settings
It sounds like one or two things might be happening here:
Your SMTP server isn't set up to allow relaying from the IP address of your web server.
You may need to create an SPF (Sender Policy Framework) or TXT record in DNS for your SMTP server's primary domain that allows SMTP traffic from the IP address of the server where your DNN website is hosted. An SPF record may already be in use for your email domain, but generally you'd add something like this to it: v=spf1 a ip4:1.2.3.4 -all, where 1.2.3.4 is the IP address of your web server.