Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starting postfix at boot time on Centos 7

1,021 views
Skip to first unread message

in...@itrezero.it

unread,
Feb 24, 2016, 12:25:35 PM2/24/16
to

Hi all.

I compiled postfix 3.0.3 from source code but (maybe a stupid question)… don’t know how to start it at boot of a Centos 7 machine!

Tried with “chkconfig” and “systemctl” without any results!

How can I do this? Is there a “postfix.service” to be enabled with systemctl?

Thank you very much for your help

-Francesco


Questa e-mail è stata inviata da un computer privo di virus protetto da Avast.
www.avast.com

Wolfe, Robert

unread,
Feb 24, 2016, 12:32:49 PM2/24/16
to

Mike Coddington

unread,
Feb 24, 2016, 12:43:15 PM2/24/16
to
On Wed, Feb 24, 2016 at 06:25:08PM +0100, in...@itrezero.it wrote:
> Hi all.
>
> I compiled postfix 3.0.3 from source code but (maybe a stupid question).
> don't know how to start it at boot of a Centos 7 machine!
>
> Tried with "chkconfig" and "systemctl" without any results!
>
> How can I do this? Is there a "postfix.service" to be enabled with
> systemctl?
>
> Thank you very much for your help
>
> -Francesco


For what it's worth, I run Postfix on CentOS 7 also. Here's what my service file looks like. I'm running 2.10 because that's what the distribution comes with, but as far as I can tell, the file should still work for you.

[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service

[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStartPre=-/usr/libexec/postfix/chroot-update
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop

[Install]
WantedBy=multi-user.target

Danny Horne

unread,
Feb 24, 2016, 12:48:51 PM2/24/16
to
Because you installed for source rather than through Yum, you haven't
got the System V init scripts. If you try to install these via Yum
it'll want to install Postfix as well, to avoid that run -

|rpm -Uvh --nodeps $(repoquery --location postfix-sysvinit)|

Then you'll be able to run -

systemctl enable postfix
systemctl start postfix


On 24/02/2016 5:25 pm, in...@itrezero.it wrote:
>
> Hi all.
>
> I compiled postfix 3.0.3 from source code but (maybe a stupid
> question)… don’t know how to start it at boot of a Centos 7 machine!
>
> Tried with “chkconfig” and “systemctl” without any results!
>
> How can I do this? Is there a “postfix.service” to be enabled with
> systemctl?
>
> Thank you very much for your help
>
> -Francesco
>
>
> Questa e-mail è stata inviata da un computer privo di virus protetto
> da Avast.
> www.avast.com <https://www.avast.com/sig-email>
>


signature.asc

Danny Horne

unread,
Feb 24, 2016, 12:51:07 PM2/24/16
to
This command should just read

rpm -Uvh --nodeps $(repoquery --location postfix-sysvinit)



signature.asc

in...@itrezero.it

unread,
Feb 25, 2016, 6:22:13 AM2/25/16
to

Thank you all.

I preferred to use the “/etc/rc.d/init.d/postfix start script” from my old Centos 6 and installed on C7 with a simple chkconfig.

Many thanks again.

-Francesco

 

 

Da: owner-pos...@postfix.org [mailto:owner-pos...@postfix.org] Per conto di Wolfe, Robert
Inviato: mercoledì 24 febbraio 2016 18:32
A: in...@itrezero.it; postfi...@postfix.org
Oggetto: RE: Starting postfix at boot time on Centos 7

 

Not sure if this will help, but a Google search returned this link:

 

https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-2-reference

 

 

From: owner-pos...@postfix.org [mailto:owner-pos...@postfix.org] On Behalf Of in...@itrezero.it
Sent: Wednesday, February 24, 2016 11:25 AM
To:
postfi...@postfix.org
Subject: Starting postfix at boot time on Centos 7

 

Hi all.

I compiled postfix 3.0.3 from source code but (maybe a stupid question)… don’t know how to start it at boot of a Centos 7 machine!

Tried with “chkconfig” and “systemctl” without any results!

How can I do this? Is there a “postfix.service” to be enabled with systemctl?

Thank you very much for your help

-Francesco

 

Questa e-mail è stata inviata da un computer privo di virus protetto da Avast.
www.avast.com

 

Peter

unread,
Feb 26, 2016, 8:20:00 PM2/26/16
to
On 25/02/16 06:25, in...@itrezero.it wrote:
> I compiled postfix 3.0.3 from source code but (maybe a stupid question)…
> don’t know how to start it at boot of a Centos 7 machine!
>
> Tried with “chkconfig” and “systemctl” without any results!
>
> How can I do this? Is there a “postfix.service” to be enabled with
> systemctl?

There is no need to compile postfix yourself on CentOS. You can get the
latest version of postfix pre-built for CentOS 7 (and even 5 and 6) from
the ghettoforge-plus repo at www.ghettoforge.org, complete with init.d
(for 5 and 6) or systemd service files (for 7) as appropriate.


Peter

0 new messages