Hello and good morning. I wanted to ask if anyone can help me with configuring nethserver as a mail server. my problem is that it works only locally and I can not interface with external mail. In short, if I have a user firstname.lastname@example.org how can I configure the mail to receive and send as xxx.mydomain.it. thanks in advance.
we have to know better how your mail works:
You have a MX record of your domain that points to your public ip of internet connection or you want todownolad your mails forma a internet provider?
you’ll need pop3connector (getmail), smarthost and setup a mail identity in your client.
Thank you very much for the answers and for the timeliness I would like my server nethserver to be the provider of mail services!
then you need:
- your MX record to point to your public (static) IP (you’d use a dyndns host too, if is it the case)
- your 25 and 587 ports exposed to wan
- your public domain (the real one) created into NS
- your real email addresses created into NS
- your email clients to use NS as email server (imap and smtp) configured for your public email addresses…
with this configuration, internal email will work as expected (not routed externally) and public email too…
If you use some public/big ISP like TIM or Fa®tweb here in italy, I strongly suggest you to buy a smtp service and use a good smarthost to send your emails to the world, otherwise you’ll be in trouble with BL almost every day.
And probably your mails goes anywhere.
The mail is configurated on aruba
Please, tell us the whole story, thank you
if you want your NS to be your email server for your domain, you need to move away from aruba (regarding email management); just use it for your DNS server
otherwise, you need something to fetch emails from aruba, but in my experience all the fetching stuff is a mess and prone to errors
First of all, you need an MX record in your public DNS (mydomain.it)
Secondly, you need to set a custom helo for your mailservers public name (eg mail.mydomain.it)
In order to prevent your mail to end up in the recipients spam box, you need to configure an SPF record in your public DNS.
You will need to teel your mailserver to accept mail for mydomain.net and create aliasses for the public mailboxes and deliver that mail to the local users.
Anny issues, shoot … I have this working flawlessly, but it can be a bit tricky to set up.
Additional things you need to do afterwards:
Configure the mail property of your AD accounts, assuming you are using AD.
Perhaps this holds true for OpenLDAP as well, unsure.
In SOGo, if using that, go to the mail settings an alter the listed email to the public one for each user.
In short, from what I’m learning if I do not publish the Ns server to the outside, what does not seem feasible?
…sending and receiving mail. If you do not have a public MX DNS record pointing to your mailserver, other mailservers will not be able to deliver mail for your domain to your server. Most other mailservers will also not accept mail from your mailserver.
If you want to use the Nethserver as a mailserver, it needs to be connected to internet, be reachable over the used ports, and have a valid DNS and helo configuration.
The mailboxes are already created on Aruba server?
If yes you can proceed in this manner:
A very basic configuration
To download mail from Aruba
Create a new domain on Nethserver that correspond to your domain registered with Aruba:
In dashboard: “email” -> tab “Domains” -> button "Create new"
Domain: "your Aruba registered domain"
Put the dot on “Delivery locally”
Create email aliases for your users:
In dashboard: “email addresses” -> tab “Mail aliases” -> button "create new"
email address: "the email in your Aruba domain"
Destinations: “The local user where email has to go”
Create pop3 connector for download mail from your Aruba server to your NS
In dashboard: “Pop3 connector” -> button "create new
mail address: "the email in your Aruba domain"
server address: "your pop3 server on Aruba domain"
username: "the username to access to mailbox on Aruba"
password: "the correspondent password"
Deliver messages to: “the user on NS where mail has to go”
(Warning: there’s a issue if you want to delivery mail to a group instead to a user. read here: https://community.nethserver.org/t/howto-to-deliver-mails-downloaded-with-pop3-connector-getmail-to-a-email-group-in-nethserver-ng-7-x/8775 )
To send mail
- Create smarthost
In dashboard: “email” -> tab “smarthost” -> thick "Send mail using a smarthost"
hostname: "your smtp server on Aruba"
username: "the username of one mailbox you have on aruba (for example email@example.com)"
password: "the corresponds password of firstname.lastname@example.org"
thick “allow unencrypted connections”
(Warning: If Aruba accepts only connections on 465 port you have to read here: https://community.nethserver.org/t/howto-use-ssl-port-465-in-smarthost/6670 )
Remember to configure correctly the “From:” field in your mail clients.
Thanks I will put your advice into practice and I will keep you updated
if I have more emails and I have to go out with different addresses as I do with the smarthost?
You can use only one.
Aruba does not check correspondence in the email address in "From: " field and account with which the mail is sent (unlike gmail)
I usually create a specific account or use a generic account (like info@) to use as smarthost credentials.
thank you so much