Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479524 - mail-mta/sendmail - add systemd unit
Summary: mail-mta/sendmail - add systemd unit
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
Depends on:
Blocks: install-systemd-unit systemd-love
  Show dependency tree
Reported: 2013-08-02 15:19 UTC by CFuga
Modified: 2013-09-03 19:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

sendmail service file (sendmail.service,469 bytes, text/plain)
2013-08-02 15:19 UTC, CFuga
sm-client service file (sm-client.service,489 bytes, text/plain)
2013-08-02 15:20 UTC, CFuga

Note You need to log in before you can comment on or make changes to this bug.
Description CFuga 2013-08-02 15:19:48 UTC
Created attachment 354934 [details]
sendmail service file

The package should provide sendmail.service and sm-client.service files.
Comment 1 CFuga 2013-08-02 15:20:22 UTC
Created attachment 354936 [details]
sm-client service file
Comment 2 Graham Murray 2013-08-03 13:43:20 UTC
(In reply to CFuga from comment #1)
> Created attachment 354936 [details]
> sm-client service file

I found a problem using this. /usr/share/sendmail-cf/cf/ (which m4 incorporates into /etc/mail/ defines the PIDfile for the sm-client to be /var/spool/clientmqueue/ I had to replace the PIDFile line in sm-cient.service to use this otherwise systemd started the service but then (after a timeout) killed the sendmail queue handler because it could not read the defined pid file.
Comment 3 Tim Harder gentoo-dev 2013-08-05 19:23:53 UTC
@systemd herd: Feel free to check, test, and commit this when it's working properly.
Comment 4 Pacho Ramos gentoo-dev 2013-08-20 09:29:58 UTC
I will review, test and commit it in a week if nobody disagrees. Thanks
Comment 5 Pacho Ramos gentoo-dev 2013-08-30 19:48:59 UTC
Why is:

ExecStartPre=-/usr/bin/make -C /etc/mail

run? I don't see any equivalent in init.d file
Comment 6 Pacho Ramos gentoo-dev 2013-08-31 12:33:29 UTC
Looks like fedora is running a similar one for building mail aliases, no?
Comment 7 CFuga 2013-09-03 00:15:13 UTC
(In reply to Pacho Ramos from comment #6)
> Looks like fedora is running a similar one for building mail aliases, no?

The 'make' order is not for mail aliases. Sendmail uses Berkeley databases for tabular data, e.g. virtual users. But you don't update the database by hand: you should edit the corresponding flat file and run the 'makemap' order to make any modification.

Instead of running 'makemap' for each flat file/database pair, Fedora/Red Hat created a Makefile to maintain those files.

Since the sendmail ebuild doesn't install that Makefile, it's fine to delete that 'ExecStartPre' line from the sendmail service file.
Comment 8 Pacho Ramos gentoo-dev 2013-09-03 19:31:19 UTC
+*sendmail-8.14.7-r1 (03 Sep 2013)
+  03 Sep 2013; Pacho Ramos <> +files/sendmail.service,
+  +files/sm-client.service, +sendmail-8.14.7-r1.ebuild:
+  Add unit file (#479524 by CFuga and Graham Murray)

About making them run in foreground (instead of forking), I have considered it but looks to lead to problems with sm-client: