1

Topic: Unable to send eMails outside of the domain

Dear colleagues,

I'm a newbie guy in here a just landed new nickname, in fact this is my first post. So let me thanks the community as I'm sure they are doing an incredible job.

So moving forward after introductions I would like to highlight my issue. Is about the relay of the eMails, in my country as per standard procedure we can't send eMails directly we use to use forwarders to do that for us.

I have a plan already with AuthSMTP into my Synology box and it works like a charm, but I would like to stop to use Synology as a WebMail/Cloud/WebServer and put this into a Ubuntu 16.10 - Virtual Server.

I did the basic installation and I have been able to logon into the portals with the postmaster@myowndomain.com. After that I did setup couple of more settings like do the port-forwarding to the new server in place to see how it behaves without additional configuration and setup the new MX reg into the DNS.

The results are that I'm able to receive eMails from my @gmail.com, but I can't send a reply arriving to @gmail.com. I did add the domain into the trust ones for Google, adding the SPF register into my DNS and it was accepted/approved by them.

I just configured after the "Global relay host" as follows, with the 4 different options and none of these works for me:

Config for: /etc/postfix/main.cf wrote:

relayhost = mail.authsmtp.com
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous

relayhost = [mail.authsmtp.com]:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous

relayhost = [62.13.128.194]:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous

relayhost = 62.13.128.194
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous

Also I did configure the sasl_password as follow:

Config for: /etc/postfix/sasl_password wrote:

  relay.server myauthsmtpuser:myultrasuperprotectedpassword

Following these actions:

Commands: wrote:


postmap hash:/etc/postfix/sasl_password
service postfix restart

Finally a full reboot of the server everytime I was changing the above.

None of the configurations above were working and I'm still not able to receive my eMails at GMail or other Domain.

Then as last option I tried to setup this in MySQL following the small tutorial for: MySQL, MariaDB, PostgreSQL:

MySQL Commands: wrote:


use vmail;
insert into sender_relayhost (account, relayhost) values ('@myowndomain.com', mail.authsmtp.com:25');

The query come through and it was showing an OK, so I did again a full reboot and test, but results were the same the eMails looks to be send, but never received.

Could you please give me a hand in here ?

Many thanks for your help and looking forward to hear from you.

Best regards.


==== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.6
- Linux/BSD distribution name and version: Ubuntu Server 16.10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): My SQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: Let me know how to extrat the logs required and I will do that ASAP.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Unable to send eMails outside of the domain

Do you have correct A and MX type DNS records for your mail domain name?

Others will connect to the mail server listed in MX record, if you don't have MX record, they connect to servers listed in A record instead. So you must make sure the servers in MX record are correct.

3

Re: Unable to send eMails outside of the domain

ZhangHuangbin wrote:

Do you have correct A and MX type DNS records for your mail domain name?

Others will connect to the mail server listed in MX record, if you don't have MX record, they connect to servers listed in A record instead. So you must make sure the servers in MX record are correct.

Hi ZhangHuangbin,

First of all thanks for your reply, too much appreciated.

Then I presume I had setup it correctly, because with my Synology box using exactly the same settings it was working, but might be something you can point that out...

This is what I have now working:

PunBB bbcode test

I did some changes with exactly the same results:

Like to create the following registers as follows:

mail.myowndomain.com (A) 192.168.1.198
myowndomain.com (MX) mail.myowndomina.com

Still exactly the same results, so I don't know where to act to make this works.

I'm frankly excited with this platform as it uses the RoundCube the same I do have now therefore no one will comaplin this is a brand new way to manage their eMails in fact I think that I will be able to copy all current-content.

Let me know if yu see anything that can be improved and I will make that happen ASAP.

Many thanks for your help, will invite you a coffee if all resolved. smile

Best regards.

4

Re: Unable to send eMails outside of the domain

Show me your real email domain name, i will send an email to one of your user to get the error message. This is more helpful than the DNS screenshot.

5

Re: Unable to send eMails outside of the domain

ZhangHuangbin wrote:

Show me your real email domain name, i will send an email to one of your user to get the error message. This is more helpful than the DNS screenshot.

Hi ZhangHuangbin,

I was able to resolve this due the below things, but sorry I'm away from home and I couldn't reply earlier.

In order to receive from all domains I did:

/opt/iredapd/tools/wblist_admin.py  wblist_admin.py --add --whitelist @.

In order to send to all domains it was a simple fact:

Changed the port to smtp to 2525 rather than 25 or 587.
Also I saw that my eMail relay changed a bit the /etc/postfix/sasl_password path, with another name.

So when I was doing a tail -f to see the log for the eMail I saw that it was trying to access a db for the sasl passwords that didn't exist, therefore I did check into the postfix.conf and I saw the error.

Other than that works great, I'm travelling overseas since Monday and I saw that system is doing kind of maintenace and backups that are great.

Now I see that I can't save eMails there is a message that there is no space in the HDD wich isn't turth, because doing the df -h I see a lot of space into the system. I will open a topic while I'm back to home.

Many thanks and really good stuff.

Best regards.