# How to setup mail server correctly

**URL:** <https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982>\
**Category:** Help! (Home for newbies)\
**Created:** [June 4, 2020, 8:14pm UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982 "2020-06-04T20:14:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hosseinhashemidev](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hosseinhashemidev](https://forum.virtualmin.com/u/hosseinhashemidev)\
**Post date:** [June 4, 2020, 8:14pm UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982/1 "2020-06-04T20:14:03Z")

</div>

Hi guys  
I just installed the Virtualmin. and added a new server [mysite.com](http://mysite.com).  
Now I have problem to find the correct server name and ports and credentials.  
Where can I find the correct information.  
I need to add my email accounts to Gmail or outlook.  
What can I do? I could not find a proper tutorial and I’m confused about mail settings on Virtualmin.

at the moment, my email accounts works correctly with webmin but the emails go to spam by Gmail and other email accounts.

Could you please let me know how to fix these issues or share me a proper link / document to resolve the issue?

Thanks.

---

<div class="post-metadata">

**Author:** ![calport](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/calport/32/44_2.png) [@calport](https://forum.virtualmin.com/u/calport)\
**Post date:** [June 5, 2020, 1:46am UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982/2 "2020-06-05T01:46:25Z")

</div>

Both issues have been recently discussed in the forums. Could you browse messages here going back about a week?

Discussions are archived and the archives are made searchable for a reason. You could have saved yourself seven + hours of wait time as wellas the effort that you put in to describe your situation had you just done a quick search or taken a quick look at some of the recent messages here, @hosseinhashemidev.

---

<div class="post-metadata">

**Author:** ![hosseinhashemidev](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/h/bb73d2/32.png) [@hosseinhashemidev](https://forum.virtualmin.com/u/hosseinhashemidev)\
**Post date:** [June 6, 2020, 9:16am UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982/3 "2020-06-06T09:16:27Z")

</div>

I could not find any.  
This is my question, but I can’t see any reply

> [@Correct SMTP settings for gmail to do "Send as"?](https://forum.virtualmin.com/t/correct-smtp-settings-for-gmail-to-do-send-as/61169):
>
> I am new to using webmin/virtualmin and I have setup a few virtual servers using virtualmin. I have user accounts on those virtual servers that I forward mail to gmail from. In gmail, I wish to setup a “send as” to use those domain accounts emails. I’ve been unable to get gmail to connect via TLS. Can somebody either tell me what the correct settings are on the virtualmin side or point me to online documentation that has examples?

Please share me a link if you could find a correct answer.  
Thanks

---

<div class="post-metadata">

**Author:** ![adamjedgar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/a/57b2e6/32.png) [@adamjedgar](https://forum.virtualmin.com/u/adamjedgar)\
**Post date:** [June 6, 2020, 10:32am UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982/4 "2020-06-06T10:32:50Z")

</div>

might be that your emails are not being accepted at the other end because its likely you need to ensure the following exist

1. Reverse ptr for your server (only once done by your vps service provider)
2. spf record in virtual server [domain.com](http://domain.com) dns
3. \_dmarc record in virtual server [domain.com](http://domain.com) dns

Some people use a single dkim instead of spf and dmarc

If you are not hosting dns, then these records need to be added in the domain registrar dns hosting

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [July 6, 2020, 10:32am UTC](https://forum.virtualmin.com/t/how-to-setup-mail-server-correctly/105982/5 "2020-07-06T10:32:51Z")

</div>

Closed on July 6, 2020, 10:32am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
