setting up postfix/cyrus

Hello I should setup a postfix/cyrus mail server with LDAP support on openSUSE 12.1.

The DNS server and the LDAP server seems to work correctly.

I think, first of all I have to activate LDAP support in the Yast DNS configuration. Here I get the error “A problem occurred while connecting to the LDAP Server”.

When I start the Yast mail configuration tool I get the error “There is no main mail domain defined. Please fix it”, although there is already a main mail domain defined in the Yast mail configuration tool. I even can see this main mail domain in Yast LDAP Browser.

Can someone help me please?

Although been a very long time since I’ve personally setup a mail server in a LDAP Domain, I can assure you that you have to make sure your LDAP is rock solid network-wide before you can even dream of deploying LDAP dependent application servers like Mail.

You should test extensively and if necessary fix any anomalies like you describe first. Sorry, can’t provide any insights without knowing if the Domain Controller(s), DNS and DHCP are on the same or different machine.

HTH,
TSU

They are all on the same machine.

Here is, what YaST logs:


2013-02-06 23:19:45 <1> cl1(3912) [Perl] modules/DnsServer.pm(DnsServer::LdapInit):1602 Initializing LDAP support
2013-02-06 23:19:45 <3> cl1(3912) [bash] ShellCommand.cc(shellcommand):78 
2013-02-06 23:19:45 <3> cl1(3912) [bash] ShellCommand.cc(shellcommand):78 Note: This output shows SysV services only and does not include native
2013-02-06 23:19:45 <3> cl1(3912) [bash] ShellCommand.cc(shellcommand):78 systemd services. SysV configuration data might be overridden by native
2013-02-06 23:19:45 <3> cl1(3912) [bash] ShellCommand.cc(shellcommand):78 systemd configuration.
2013-02-06 23:19:45 <3> cl1(3912) [bash] ShellCommand.cc(shellcommand):78 
2013-02-06 23:19:45 <1> cl1(3912) [Perl] modules/DnsServer.pm(DnsServer::LdapInit):1629 Trying LDAP server: cl1.andreas.madritsch.com cl2.andreas.madritsch.com:389
2013-02-06 23:19:45 <1> cl1(3912) [Perl] modules/DnsServer.pm(DnsServer::LdapInit):1642 Trying LDAP domain: dc=andreas,dc=madritsch,dc=com
2013-02-06 23:19:45 <1> cl1(3912) [Perl] modules/DnsServer.pm(DnsServer::LdapInit):1649 Main configuration DN: ou=ldapconfig,dc=andreas,dc=madritsch,dc=com
2013-02-06 23:19:45 <2> cl1(3912) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-06 23:19:45 <2> cl1(3912) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-06 23:19:45 <1> cl1(3912) [ui] YPushButton.cc(setFunctionKey):204 Guessing button role YOKButton for YPushButton "Ja" at 0x7fa6e847df88 from function key F10
2013-02-06 23:19:45 <1> cl1(3912) [ui] YPushButton.cc(setFunctionKey):204 Guessing button role YCancelButton for YPushButton "Nein" at 0x7fa6e848df38 from function key F9
2013-02-06 23:19:47 <1> cl1(3912) [Perl] modules/DnsServer.pm(DnsServer::LdapInit):1677 User choose to use LDAP: 1
2013-02-06 23:19:47 <3> cl1(3912) [agent-ldap] LdapAgent.cc(debug_exception):485 ldap error while binding with  (-1): Can't contact LDAP server
2013-02-06 23:19:47 <2> cl1(3912) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-06 23:19:47 <2> cl1(3912) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-06 23:19:47 <1> cl1(3912) [ui] YPushButton.cc(setFunctionKey):204 Guessing button role YOKButton for YPushButton "OK" at 0x7fa6e83d6198 from function key F10

Please let me know, when other logs were helpful.

As I examined the YaST log above, line 7 seemed suspicious. Obviously YaST does not support redundant LDAP client configurations. After correcting this, I was able to enable LDAP support in DNS. So the first problem is solved and anything works fine with DNS and LDAP. In the LDAP Browser I see all DNS entries and an entry Mailserver.

Unfortunately the maiserver still does not work. Here is, what YaST logs,when I start the Yast mail configuration tool:


2013-02-07 01:59:47 <1> cl1(13951) [YCP] MailServer.ycp:349 ----- Start MailServer::Read -----
2013-02-07 01:59:47 <1> cl1(13951) [YCP] Progress.ycp:380 Progress::New(Mailserver-Einstellungen werden gelesen, 8, "Benötigte Pakete lesen", "Globale Mailserver-Einstellungen lesen", "Mailserver-Transport-Routes lesen", "Mailserver-Schutzeinstellungen werden gelesen", "Weiterleitungs-Einstellungen des Mailservers lesen", "Lokale Zustellungseinstellungen des Mailservers lesen", "Aufträge zum Abrufen von Mail lesen", "Mailserver-Domains lesen"])
2013-02-07 01:59:47 <1> cl1(13951) [YCP] Progress.ycp:469 No progress icons defined
2013-02-07 01:59:47 <1> cl1(13951) [qt-styler] QY2Styler.cc(getScaled):234 Loaded pixmap from "work_area"  size: 896x691
2013-02-07 01:59:49 <1> cl1(13951) [YCP] NetworkInterfaces.ycp:584 ETHTOOL_OPTIONS:ETHTOOL:OPTIONS
2013-02-07 01:59:49 <1> cl1(13951) [YCP] NetworkInterfaces.ycp:597 config=$"BOOTPROTO":"static", "BROADCAST":"", "ETHTOOL_OPTIONS":"", "IPADDR":"192.168.0.1/24", "MTU":"", "NAME":"NetXtreme BCM5704 Gigabit Ethernet", "NETMASK":"", "NETWORK":"", "REMOTE_IPADDR":"", "STARTMODE":"auto", "USERCONTROL":"no"]
2013-02-07 01:59:49 <1> cl1(13951) [YCP] NetworkInterfaces.ycp:584 ETHTOOL_OPTIONS:ETHTOOL:OPTIONS
2013-02-07 01:59:49 <1> cl1(13951) [YCP] NetworkInterfaces.ycp:597 config=$"BOOTPROTO":"static", "BROADCAST":"", "ETHTOOL_OPTIONS":"", "IPADDR":"192.168.1.11/24", "MTU":"", "NAME":"NetXtreme BCM5704 Gigabit Ethernet", "NETWORK":"", "PREFIXLEN":"24", "REMOTE_IPADDR":"", "STARTMODE":"auto", "USERCONTROL":"no"]
2013-02-07 01:59:49 <1> cl1(13951) [YCP] NetworkInterfaces.ycp:597 config=$"BROADCAST":"127.255.255.255", "FIREWALL":"no", "IPADDR":"127.0.0.1", "NETMASK":"255.0.0.0", "NETWORK":"127.0.0.0", "STARTMODE":"auto", "USERCONTROL":"no"]
2013-02-07 01:59:53 <3> cl1(13951) [bash] ShellCommand.cc(shellcommand):78 
2013-02-07 01:59:53 <3> cl1(13951) [bash] ShellCommand.cc(shellcommand):78 Note: This output shows SysV services only and does not include native
2013-02-07 01:59:53 <3> cl1(13951) [bash] ShellCommand.cc(shellcommand):78 systemd services. SysV configuration data might be overridden by native
2013-02-07 01:59:53 <3> cl1(13951) [bash] ShellCommand.cc(shellcommand):78 systemd configuration.
2013-02-07 01:59:53 <3> cl1(13951) [bash] ShellCommand.cc(shellcommand):78 
2013-02-07 01:59:53 <3> cl1(13951) [agent-ldap] LdapAgent.cc(Execute):1257 Missing hostname of LDAPHost, aborting
2013-02-07 01:59:53 <3> cl1(13951) [agent-ldap] LdapAgent.cc(Execute):1313 Ldap not initialized: use Execute(.ldap) first!
2013-02-07 01:59:53 <3> cl1(13951) [agent-ldap] LdapAgent.cc(Read):550 Ldap not initialized: use Execute(.ldap) first!
2013-02-07 01:59:53 <3> cl1(13951) [agent-ldap] LdapAgent.cc(Read):550 Ldap not initialized: use Execute(.ldap) first!
2013-02-07 01:59:53 <2> cl1(13951) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-07 01:59:53 <2> cl1(13951) [qt-ui] YQUI.cc(qMessageHandler):729 <libqt-warning> QCssParser::parseHexColor: Unknown color name '#ffff'
2013-02-07 01:59:53 <1> cl1(13951) [ui] YPushButton.cc(setFunctionKey):204 Guessing button role YOKButton for YPushButton "OK" at 0x7f67a8932eb8 from function key F10

On 2013-02-07 02:26, amadrits wrote:
>
> As I examined the YaST log above, line 7 seemed suspicious. Obviously
> YaST does not support redundant LDAP client configurations. After
> correcting this, I was able to enable LDAP support in DNS. So the first
> problem is solved and anything works fine with DNS and LDAP. In the LDAP
> Browser I see all DNS entries and an entry Mailserver.

I believe this yast module is more complete in the SLES version than in
openSUSE.

> Unfortunately the maiserver still does not work. Here is, what YaST
> logs,when I start the Yast mail configuration tool:
>
>
> Code:
> --------------------
> 2013-02-07 01:59:53 <3> cl1(13951) [agent-ldap] LdapAgent.cc(Execute):1257 Missing hostname of LDAPHost, aborting
>
> --------------------

Maybe that’s the important line. It is not the mailserver entry, but the
ldap server entry :-?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

LDAP configuration should work OK with Yast. Check if you can open LDAP connection with LDAP Browser. Anyway even if you’ll solve the problem with LDAP, there is a bug, at least for x86-64, which doesn’t permit to save the settings: https://bugzilla.novell.com/show_bug.cgi?id=745134. Also it is present in 12.2. Didn’t try yet 12.3 beta, but I suspect that it is not solved and there.

OK, DNS and LDAP works perfectly and the mail services too, except the error message YaST displays, when starting the mail configuration module, so I decided to give up this YaST module.

One problem I have now, is that postfix does not start during boot, although the links ar set correct in /etc/init.d. I do not find any error messages. When I start postfix manually after boot, anything works as excepted. I think that is a SuSE specific problem. Can anybody give me a hint please.

to check the service status:

chkconfig -l postfix

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

postfix                   0:off  1:off  2:off  3:on   4:off  5:on   6:off

to set it on boot:

chkconfig postfix 35

or use yast/system services (Runlevel)

On 2013-03-26 14:16, amadrits wrote:

> One problem I have now, is that postfix does not start during boot,
> although the links ar set correct in /etc/init.d. I do not find any
> error messages. When I start postfix manually after boot, anything works
> as excepted. I think that is a SuSE specific problem. Can anybody give
> me a hint please.

links?

Those links are ignored.

First: 12.1 uses systemd, no systemv, so knowledge about those “links”
is obsolete.

Second, even if you use systemv (the classic system) you never
manipulate those links directly, because openSUSE uses a makefile like
system instead to choose what to start and in which order - not the
links. This is documented here:

openSUSE 11.4 Reference: Chapter 17. Booting and Configuring a Linux
System

Notice that I’m intentionally pointing you to the 11.4 documentation:
the current documentation is about systemd, not systemv.

If what you are using is 12.1 in the default systemd mode, the
documentation is this instead:

openSUSE 12.2 Reference: Chapter 8. The systemd daemon

And now I point you to the 12.2 doc instead of the 12.1 you have because
the relevant chapter is empty in 12.1 (chapter 5). The documenters work
is delayed to what is actually in existence, even more about systemd.

And after all that speech, just try this:


su -
chkconfig postfix
chkconfig postfix on
chkconfig postfix

It is not systemd specific, but “the boss” said that it was to be
maintained. So it should work.

One last thing: “SuSE” does not exist.

It is either “openSUSE”, written that way, or it is “SUSE” - and if it
is SUSE then you are on the wrong forums, and this thread will be closed
by an admin. So it is important that you be precise in what you write.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I did never manipulate this links directly. They have been made by the yast mail module. With systemv they worked as expected. After recreating them with the yast runlevel module they worked with systemd too. Obviously the yast mail module did not set the runlevel entries correctly.

Thanks for the hints.

By the way: I am using openSUSE 12.1.

On 2013-03-26 22:16, amadrits wrote:

> By the way: I am using openSUSE 12.1.

I know :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)