Zentyal Forum, Linux Small Business Server

Zentyal Server => Email and Groupware => Topic started by: luckyfreddy on March 04, 2020, 08:57:49 am

Title: [solved] non-authoritive Domain (to configure gmail-addresses?)
Post by: luckyfreddy on March 04, 2020, 08:57:49 am
Hello together,

to connect my (and families) Smartphones and Computers i would install an Zentyal 6.1 Development for private. Is there any possibility to set an hostname like gmail.com to your mailaddress, without to block any other gmail.com-addresses which where not configured at zentyal? At Microsoft Exchange there is an option to set an domain "non-authorized", so that Exchange first try send an mail at the internal user-account (if available) and then (when no matching account with that mail-address would be found) sent it out to the smarthost (smtp.gmail.com).

Would there be an possibility to set something similar?

Sorry for my worse english; i'm not a native speaker.

Greetings,
Fred
Title: Workaround for this problem
Post by: luckyfreddy on May 29, 2020, 04:38:14 pm
I've found an workaround for that problem:

In the /etc/postfix/main.cf - File I comment out the virtual_mailbox_domains, virtual_alias_maps and virtual_mailbox_maps and reload the postfix-service with "service postfix reload".

That's it. From now on all communication will be send through the smarthost/relayhost and it's done. Unfortunately this changes are not safe from any changes at the GUI and propably not at updates. So I think, that it is rather an workaround than an solution, but it worked for me.

Credits: Found the soultion here: https://support.plesk.com/hc/en-us/articles/213931945-Mail-to-external-mail-service-is-delivered-locally (https://support.plesk.com/hc/en-us/articles/213931945-Mail-to-external-mail-service-is-delivered-locally)


edit:
Unfortunatelly after restart or any changes at the "mail"-section the outcomments would be removed and the unwated behavior is back.

Perhaps anybody has an idea to fix that without cronjobs to write the changes all time in the file and reload the postfix-service?
Title: Re: [unlucky workaround] non-authoritive Domain (to configure gmail-addresses?)
Post by: luckyfreddy on June 04, 2020, 05:52:17 pm
I found out the reason why it would be uncommented after reboot. The file /etc/postfix/main.cf would generated by an zentyal-init-script while booting the system.

I could find the draft-file, which shoud be /usr/share/zentyal/stubs/mail/main.cf.mas.

I think using an script (e.g. via cronjob?)... something like that:
Code: [Select]
sed -i s/^virtual_mailbox_domains/#virtual_mailbox_domains/g /usr/share/zentyal/stubs/mail/main.cf.mas
sed -i s/^virtual_alias_maps/#virtual_alias_maps/g /usr/share/zentyal/stubs/mail/main.cf.mas
sed -i s/^virtual_mailbox_maps/#virtual_mailbox_maps/g /usr/share/zentyal/stubs/mail/main.cf.mas
...should make it safe for upgrades. What do you think?
Title: Re: [solution suggested] non-authoritive Domain (to configure gmail-addresses?)
Post by: doncamilo on June 05, 2020, 02:03:16 pm
 :)

Read the official documentation: https://doc.zentyal.org/en/appendix-c.html#stubs (https://doc.zentyal.org/en/appendix-c.html#stubs)

Regarding the templates, Zentyal has a good architecture. Zentyal looks for the templates. first, in the '/etc/zentyal/stubs/...' folders (that you have to create) If the needed template doesn't exists in this location, it searches the template in the default '/usr/share/zentyal/stubs/...' folders.

Cheers!
Title: Re: [resolved] non-authoritive Domain (to configure gmail-addresses?)
Post by: luckyfreddy on June 05, 2020, 04:05:38 pm
That is great.
My problem first was, that i don't know where to configure my wish from the topic. That's why i could not found the right place in the documentation.

As I found my "workaround" I forgot to check the documentation. So thank you for the link; I think it helps. This seemed to me a solution for me.

Thank you and greetings from germany.