Can I remove Postfix?

Ask questions about your setup or get help installing ZCS server (ZD section below).
spartacus
Posts: 11
Joined: Fri Apr 24, 2015 10:18 am

Can I remove Postfix?

Postby spartacus » Mon May 04, 2015 2:12 pm

Now I have successfully installed Zimbra 8.6 FOSS on Centos 7 64bit.  I noticed that  Postfix is still installed on the system (the service is disabled).

[root@mail ~]# rpm -qa | grep postfix
postfix-2.10.1-6.el7.x86_64

[root@mail ~]# service status postfix
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
[root@mail ~]# service postfix status
Redirecting to /bin/systemctl status  postfix.service
postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled)
   Active: inactive (dead)


The reason why I want to remove it is because for some strange reason, the root user still keeps on receiving email

Will I break anything is I remove Postfix server still keeps on receiving mail!
Thanks



spartacus
Posts: 11
Joined: Fri Apr 24, 2015 10:18 am

Can I remove Postfix?

Postby spartacus » Mon May 04, 2015 2:31 pm

Let me add some more clarification. Currently. if I issue the following command:

/usr/sbin/sendmail -f "Test Subject" admin@domain.net < /dev/null



the email ends up being delivered to the Postfix server and NOT the admin account associated with the Zimbra server.



But is I issue

/opt/zimbra/postfix/sbin/sendmail -f "Test Subject" admin@domain.net < /dev/null

the email does end up in the Admin account inbox managed by Zimbra. Hope this helps clarify.



Thanks again
phoenix
Ambassador
Ambassador
Posts: 26701
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Can I remove Postfix?

Postby phoenix » Mon May 04, 2015 3:00 pm

No, you can't remove the installed version of postfix as there are system dependencies for it and as long as it's disabled it should not cause you any problems.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
spartacus
Posts: 11
Joined: Fri Apr 24, 2015 10:18 am

Can I remove Postfix?

Postby spartacus » Mon May 04, 2015 3:51 pm

Ok, I have followed the following steps:



[root@mail action.d]# alternatives --config mta



There is 1 program that provides 'mta'.



Selection Command

-----------------------------------------------

*+ 1 /usr/sbin/sendmail.postfix



Enter to keep the current selection[+], or type selection number:



So I followed the following like:



http://wiki.zimbra.com/wiki/How_to_%22fix%22_system%27s_sendmail_to_use_that_of_zimbra



and entered the following command:



/usr/sbin/alternatives --install /usr/sbin/sendmail mta /opt/zimbra/postfix/sbin/sendmail 25

--slave /usr/bin/mailq mta-mailq /opt/zimbra/postfix/sbin/mailq

--slave /usr/bin/newaliases mta-newaliases /opt/zimbra/postfix/sbin/newaliases

--slave /usr/share/man/man1/mailq.1.gz mta-mailqman /opt/zimbra/postfix/man/man1/mailq.1

--slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman /opt/zimbra/postfix/man/man1/newaliases.1

--slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /opt/zimbra/postfix/man/man1/sendmail.1

--slave /usr/share/man/man5/aliases.5.gz mta-aliasesman /opt/zimbra/postfix/share/man/man5/aliases.5

--initscript zimbra





I then issued

[root@mail ~]# alternatives --config mta and chose option 2



There are 2 programs which provide 'mta'.



Selection Command

-----------------------------------------------

* 1 /usr/sbin/sendmail.postfix

+ 2 /opt/zimbra/postfix/sbin/sendmail



Enter to keep the current selection[+], or type selection number:





I then issued the following command:



[root@mail ~]# alternatives --display mta

mta - status is manual.

link currently points to /opt/zimbra/postfix/sbin/sendmail

/usr/sbin/sendmail.postfix - priority 30

slave mta-pam: /etc/pam.d/smtp.postfix

slave mta-mailq: /usr/bin/mailq.postfix

slave mta-newaliases: /usr/bin/newaliases.postfix

slave mta-rmail: /usr/bin/rmail.postfix

slave mta-sendmail: /usr/lib/sendmail.postfix

slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz

slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz

slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz

slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz

/opt/zimbra/postfix/sbin/sendmail - priority 25

slave mta-pam: (null)

slave mta-mailq: /opt/zimbra/postfix/sbin/mailq

slave mta-newaliases: /opt/zimbra/postfix/sbin/newaliases

slave mta-rmail: (null)

slave mta-sendmail: (null)

slave mta-mailqman: /opt/zimbra/postfix/man/man1/mailq.1

slave mta-newaliasesman: /opt/zimbra/postfix/man/man1/newaliases.1

slave mta-aliasesman: /opt/zimbra/postfix/share/man/man5/aliases.5

slave mta-sendmailman: /opt/zimbra/postfix/man/man1/sendmail.1

Current `best' version is /usr/sbin/sendmail.postfix.





Is this correct? Should the MTA status be set to manual or auto?



Thanks again.
tvizirov
Zimbra Employee
Zimbra Employee
Posts: 22
Joined: Fri Jan 23, 2015 10:32 am

Can I remove Postfix?

Postby tvizirov » Tue Jun 09, 2015 9:16 am

Follow this link if you want to stop emails to be delivered to root:

http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/

Return to “Installation and Upgrade”

Who is online

Users browsing this forum: No registered users and 4 guests