Unable to send mail...
 
Notifications
Clear all

Unable to send mail after fresh install

10 Posts
6 Users
5 Reactions
4,618 Views
(@amitchell)
Joined: 2 years ago
Posts: 16
Topic starter  

I just set up Carbonio CE server for the 1st time to try it out. Immediately after install I tried sending an email to myself, which originated from the newly installed Carbonio CE server and was to an account on an already existing Zimbra server.  The mail did not send, it went immediately to drafts. Upon checking /var/log/carbonio.log, I did not see an attempt to send the mail. What i did notice was the following error:

 

Oct 16 18:46:40 cmail zmconfigd[28722]: File "/opt/zextras/common/lib/jylibs/state.py", line 796, in rewriteConfig for line in open(fr).readlines():
Oct 16 18:46:40 cmail zmconfigd[28722]: Rewrite failed: [Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in' ([Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in')

 

Can someone tell me if these errors are related to sending mail?

 

Receiving mail appears to work just fine.

 

Thanks for the help.

 

 

 


   
Quote
(@arman)
Admin
Joined: 4 years ago
Posts: 396
 
Posted by: @amitchell

I just set up Carbonio CE server for the 1st time to try it out. Immediately after install I tried sending an email to myself, which originated from the newly installed Carbonio CE server and was to an account on an already existing Zimbra server.  The mail did not send, it went immediately to drafts. Upon checking /var/log/carbonio.log, I did not see an attempt to send the mail. What i did notice was the following error:

 

Oct 16 18:46:40 cmail zmconfigd[28722]: File "/opt/zextras/common/lib/jylibs/state.py", line 796, in rewriteConfig for line in open(fr).readlines():
Oct 16 18:46:40 cmail zmconfigd[28722]: Rewrite failed: [Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in' ([Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in')

 

Can someone tell me if these errors are related to sending mail?

 

Receiving mail appears to work just fine.

 

Thanks for the help.

 

 

 

Hi @amitchell,

We have forwarded this issue to our team as it needed more investigation. As soon as we hear from them, we will write you back.

Thank you so much for being with us.

Regards,

Arman


   
ReplyQuote
(@sharif)
Admin
Joined: 3 years ago
Posts: 593
 

@amitchell

Hi Amitchell,

Meanwhile, could you please help us with some information:

Did you follow all instructions mentioned in the official documentation upto step 7 also including setup of dnsmasq?

Thanks and regards,
Sharif

 

 

 


   
ReplyQuote
mgarbo
(@mgarbo)
Joined: 10 years ago
Posts: 61
 
Posted by: @amitchell

I just set up Carbonio CE server for the 1st time to try it out. Immediately after install I tried sending an email to myself, which originated from the newly installed Carbonio CE server and was to an account on an already existing Zimbra server.  The mail did not send, it went immediately to drafts. Upon checking /var/log/carbonio.log, I did not see an attempt to send the mail. What i did notice was the following error:

 

Oct 16 18:46:40 cmail zmconfigd[28722]: File "/opt/zextras/common/lib/jylibs/state.py", line 796, in rewriteConfig for line in open(fr).readlines():
Oct 16 18:46:40 cmail zmconfigd[28722]: Rewrite failed: [Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in' ([Errno 2] No such file or directory: '/opt/zextras/mailboxd/etc/zimbra.web.xml.in')

 

Can someone tell me if these errors are related to sending mail?

 

Receiving mail appears to work just fine.

 

Thanks for the help.

 

 

 

Here a solution for zimbra.log errors : https://community.zextras.com/forum/postid/3864/

 


   
ReplyQuote
(@amitchell)
Joined: 2 years ago
Posts: 16
Topic starter  

@shariful-islam  Initially I did not install dnsmaq because I was using a real domain name that was pointing to the carbonio server ands had been configured in our dns to do so. Upon receiving your reply I did a fresh new install, following all steps including dnsmasq and disabling systemd-resolved. Unfortunately we are still experiencing the same exact problem. Is there anything else you need to know that would help us resolve this issue?


   
ReplyQuote
(@amitchell)
Joined: 2 years ago
Posts: 16
Topic starter  

@mgarbo Thank you for the info on fixing those errors in the log. I followed the instructions and it did remove the errors from the log file. Unfortunately it did not have any impact on the issue I am experiencing with sending mail. We tried to send a message from carbonio it immediately goes to drafts, no attempt to send the message is shown in the logfile.


   
ReplyQuote
(@sharif)
Admin
Joined: 3 years ago
Posts: 593
 

@amitchell 

Hi,

Sorry to hear that.
Just to ensure we are on the same page, I am sharing the installation procedure.

Step-1 Update & upgrade the repository database

root@mail~# apt update && apt upgrade -y

Step-2 Set Static IP address

Set static IP on your server

 

Step-3 Set /etc/hostname

root@mail:~# cat /etc/hostname
mail.example.com

 

Step-4 Set /etc/hosts

Set the hosts file properly

Warning: Do not keep any ipV6 configuration in your /etc/hosts file.

root@mail:~# cat /etc/hosts
127.0.0.1               localhost
161.97.99.162   mail.latestserver.xyz   mail
root@mail:~#

 

Reboot The Server

root@mail~# reboot now

 

 

Step-5 Add zextras repository

You need to download and add the zextras repository to your system to install the necessary carbonio CE packages.

Head to the Carbonio Community Edition webpage and fill out the form. You will soon receive an e-mail including very easy instructions to add the repository to your operating system.

After you successfully added the repository, upgrade the system.

 

Step-6 Update & upgrade repository database

root@mail~# apt update && apt upgrade -y

 

Step-7 Set up dnsmasq 

Warning:

  • If you have published the DNS records into any public DNS server then you do not need DNSMASQ
  • During the installation of dnsmasq, you may face conflict on port 53. To resolve this, remove and disable systemd-resolved.
root@mail:~# systemctl stop systemd-resolved
root@mail:~# systemctl disable systemd-resolved
root@mail:~# systemctl mask systemd-resolved

Now install dnsmasq: [As you have removed systemd-resolved, you need to set /etc/resolv.conf manually before trying to install dnsmasq]

root@mail:~# apt install dnsmasq -y

vi /etc/dnsmasq.conf

[ADD THESE LINES AT THE BOTTOM OF THE FILE]

server=1.1.1.1
mx-host=example.com,mail.example.com,50
host-record=example.com,192.168.1.152
host-record=mail.example.com,192.168.1.152


#Restart the service#
root@mail:~# /etc/init.d/dnsmasq restart
root@mail:~# /etc/init.d/dnsmasq status

 

Step-8 Install Carbonio CE packages

 

Install and configure postgresql

root@mail:~# apt install postgresql-12 -y
root@mail:~# systemctl reload postgresql

Check out this link to get the details of PostgreSQL configuration.

 

root@mail:~# apt install service-discover-server \
carbonio-directory-server \
carbonio-proxy \
carbonio-webui carbonio-files-ui \
carbonio-mta \
carbonio-appserver \
carbonio-user-management \
carbonio-files-ce carbonio-files-db \
carbonio-tasks-ce carbonio-tasks-db \
carbonio-tasks-ui \
carbonio-storages-ce \
carbonio-preview-ce \
carbonio-docs-connector-ce carbonio-docs-editor \
carbonio-prometheus -y

 

Step-9 Use the following command to configure and launch Carbonio CE

carbonio-bootstrap

 

Step-10 Setup Carbonio Mesh & pending setups

service-discover setup-wizard

&

pending-setups -a

 

Step-11 Configure Carbonio CE databases

root@mail:~# read -s -p "Password:" DB_ADM_PWD

root@mail:~# su - postgres -c "psql --command=\"CREATE ROLE carbonio_adm WITH LOGIN SUPERUSER encrypted password '$DB_ADM_PWD';\""

root@mail:~# su - postgres -c "psql --command=\"CREATE DATABASE carbonio_adm owner carbonio_adm;\""


root@mail:~# PGPASSWORD=$DB_ADM_PWD carbonio-files-db-bootstrap carbonio_adm 127.0.0.1
root@mail:~# PGPASSWORD=$DB_ADM_PWD carbonio-tasks-db-bootstrap carbonio_adm 127.0.0.1


# To unset the variable value
root@mail:~# unset DB_ADM_PWD

 

Step-13 Bootstrap database of Carbonio files

root@mail:~# su - zextras
root@mail:~# su - zextras -c "zmcontrol restart"
root@mail:~# systemctl restart carbonio-prometheus-nginx-exporter.service

root@mail:~# su - zextras -c "zmcontrol -v"
root@mail:~# su - zextras -c "zmcontrol status"
 
root@mail:~# consul members
root@mail:~# systemctl list-units carbonio*

With this step, the installation process is completed.

 

If you followed all of these steps and still not been able to send mail, please check below issues:

1. You server can resolve dns; i.e ping google.com or query mx

2. You have set the server hostname properly.

 

Thanks and regards,

Sharif


   
ReplyQuote
(@amitchell)
Joined: 2 years ago
Posts: 16
Topic starter  

After following the instructions provided, we re-installed Zextras Carbonio CE and successfully are able to send and receive mail. I would like to thank all of the Forum users who helped us. I look forward to learning more about the product. Who knows, one day I may be able to return the favor and help someone else. Open Source at its best. Again, thanks to all! 🙂 


   
ReplyQuote
(@mrzsilva)
Joined: 1 year ago
Posts: 4
 

Hi @amitchell,

Were you able to figure out what was the cause of it?

 

Thanks


   
ReplyQuote
(@anahuac)
Joined: 2 years ago
Posts: 326
 

Try this:

zmprov ms `zmhostname` zimbraSmtpPort 25
zmcontrol restart

Hope it helps

 

 


   
ReplyQuote