[BlueOnyx:25632] Re: Switching between sendmail and postfix on 3210R

Michael Stauber mstauber at blueonyx.it
Fri Oct 7 22:17:38 -05 2022


Hi Neil,

> My mail gets relayed via a 3rd party who insists on connections via port 
> 587 - which the GUI doesn't seem to accept in the Smart Relay Server 
> field. I'd put it in manually to make it work in sendmail.mc...

Port 587 gets opened and bound by the MTA (Sendmail *or* Postfix) when 
the checkbox "Enable Submission Port" is ticked in "Network Services" / 
"Email" in the "Basic" Tab.

For "Smart Relay Server" see the same GUI page in the "Advanced" Tab. 
That's where you can set this.

In fact pretty much every aspect of the Email related GUI works for both 
Sendmail and Postfix.

The GUI writes the changes to the Sendmail configuration files (even if 
Postfix is the MTA) and restarts whatever MTA is enabled. Whenever 
Postfix is restarted, it will parse the Sendmail configuration and an 
will dynamically write out an updated Postfix configuration.

Therefore manual edits to the Postfix configuration should only be done 
for options that the GUI does not change.

> However, when sendmail.mc gets parsed, the port (in RELAY_MAILER_ARGS) 
> doesn't get picked up, so postfix tries to use port 25 - and the relay 
> won't accept the authenticated connection! Editing mail.cf  manually (or 
> via Webmin) to set the relayhost enabled it to work - until the file 
> gets regenerated automatically.

If you don't want the MTA to use port 25, then you can simply untick the 
checkbox "Enable SMTP Server". It will still use port 465 and 587 if 
"Enable SMTPS Server" and "Enable Submission Port" are enabled.

> The other thing that's a bit of a pain is that it seems /etc/procmailrc 
> gets regenerated when I make the switch... 

I'm not going to touch that, as /etc/procmailrc is a file on BlueOnyx 
that's entirely "owned" by the GUI. If you want to prevent the GUI from 
messing with a custom /etc/procmailrc, then you can use this command to 
prevent even user "root" from making changes to it:

chattr +i /etc/procmailrc

If you want to "unlock" it again, use:

chattr -i /etc/procmailrc


> There are other utilities (like the sendmail command) that seem to be 
> able to "soft link" in /etc/alternatives/mta* to either a version for 
> .sendmail or .postfix. What switches these links - as the GUI change 
> doesn't seem to have done it. Do I have to do it manually?

No, we don't touch these at all. When you switch the MTA in the GUI, we 
simply run "systemctl disable <service>" and "systemctl enable 
<service>" on Sendmail and Postfix. There is also a config file called 
/etc/sysconfig/bxmta which gets updated and tells the GUI which MTA is 
active. That file either has ...

MTA=POSTFIX

... or ...

MTA=SENDMAIL

... in it.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list