I don't receive a single message from root..??

Started by venty, June 23, 2025, 06:09:43 PM

Previous topic - Next topic

Starburst

If you system has a problem with localhost, you force it with 127.0.0.1
It's says, "If you are having problem with Step 4, change the ending to:"

I'll update that to say REPLACE the 4 lines in Step4 with.

milter_protocol = 6, is the default. So where it's there or not doesn't matter, it's just to make sure.

non_smtpd_milters = $smtpd_milters, just redirects it to look at $smtpd_milters, or to be safe you can specify that line again. Just like milter_protocol.

--

I looked at Postfix.

CWP put the line in main.cf under #network settings, when it builds/re-builds the mail server.
Checked all of our servers, and it says "mydestination = $myhostname = name.hostname.com'

Not sure why CWP does that, as it's redundant, and just replaces $myhostname on that line.

While the line smtp_helo_name = $myhostname, I had entered manually.

@overseer, what does your servers look like for that line?

overseer

CWP systems are as you described, mydestination = $myhostname = name.hostname.com

On a dedicated server I maintain (non-CWP), it is more clasically set:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, host.domain.com, mail.domain.com

venty

#17
Hi,

for me :

mydestination = $myhostname = name.hostname.com
where name.hostname.com is replaced with my ...

and no record smtp_helo_name = $myhostname

and as far as I can tell and test, DKIM works with localhost...

BR
Venty

venty

#18
Quote from: venty on June 27, 2025, 07:18:29 AM
Hi,

for me :

mydestination = $myhostname = name.hostname.com
where name.hostname.com is replaced with my ...

and no record smtp_helo_name = $myhostname

and as far as I can tell and test, DKIM works with localhost...

BR
Venty

and in fail main.cf no record: "smtp_helo_name"

venty

Quote from: venty on June 27, 2025, 10:19:53 AM
Quote from: venty on June 27, 2025, 07:18:29 AM
Hi,

for me :

mydestination = $myhostname = name.hostname.com
where name.hostname.com is replaced with my ...

and no record smtp_helo_name = $myhostname

and as far as I can tell and test, DKIM works with localhost...

BR
Venty

and in fail main.cf no record: "smtp_helo_name"

overseer

I don't have the directive on my CWP servers, nor on a dedicated server I maintain. These are the closest I have:
# smtpd_helo_restrictions
smtpd_helo_restrictions =
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname
smtpd_helo_required = yes

venty

Hi,

Is it necessary to add a record to the file main.cf and what is it for:

smtp_helo_name = $myhostname

Thanks in advance!

BR
Venty

overseer

You are specifying your server's hostname to announce it in the HELO exchange when it is talking to other mail servers. As you could see by my code block above, I (and many other mail admins) reject mail from servers that don't have their HELO hostname set (as many spammers don't use proper protocol and give proper HELO greetings. So for best mail delivery results and to avoid bounced mails, you should set your helo hostname as Starburst recommended.

venty


Hi,

Thank you very much, I understood everything, just one last thing to clarify :)

When going through CWP,  I go to the Postfix Mail Server Manager, and check the box where it is shown in the picture:

https://prnt.sc/TXLDNMUAot9p

In this case, when building the mail server, what exactly add or change in the entries in the main.cf file ?

Many thanks in advance!

BR
Venty

overseer

Quote from: Starburst on June 26, 2025, 08:46:45 PM
CWP put the line in main.cf under #network settings, when it builds/re-builds the mail server.
Checked all of our servers, and it says "mydestination = $myhostname = name.hostname.com'

Not sure why CWP does that, as it's redundant, and just replaces $myhostname on that line.
Wow, on a new Alma install using CWP's re-build mail server function, it must've buggered up the mydestination BAD with the duplicative line. So another postfix instance rejected it. Study the 5.5.2 Helo rejection:
<overseer@domain.net>: host mail.domain.com[111.111.111.111] said: 501
    5.5.2 <srv1.domain.net?=?srv1.domain.net>: Helo command
    rejected: Invalid name (in reply to RCPT TO command)

Hard setting it to mydestination = srv1.domain.net was far more acceptable to the other postfix server!

venty

Quote from: venty on July 04, 2025, 10:29:45 AM

Hi,

Thank you very much, I understood everything, just one last thing to clarify :)

When going through CWP,  I go to the Postfix Mail Server Manager, and check the box where it is shown in the picture:

https://prnt.sc/TXLDNMUAot9p

In this case, when building the mail server, what exactly add or change in the entries in the main.cf file ?

Many thanks in advance!

BR
Venty

Hi,

My question is whether when rebuilding the mail server, will everything we added or changed in the main.cf file be saved or deleted?

Thank you very much!

BR
Venty

overseer

Keep backups of your main config files (postfix, dovecot, apache, nginx) and vhost definition files. Assume that rebuilding mail & web servers will nuke your changes -- so have a backup to replace the default or merge back in your changes. But you shouldn't ever have to change those once the server is set up.

venty

Hi,

Ok, lastly, for this topic, the following remains as a summary:
1.In main.cf under #network settings, replace:

"mydestination = $myhostname = name.hostname.com'

with "mydestination = srv1.domain.net"
????

2. To the main.cf file, add:

UNDER (# rules restrictions):
smtp_helo_name = $myhostname
????

BR
Venty

overseer

mydestination = $myhostname
is most canonical, then you only have to change it once at the top of the file if the hostname needs to change. But for any of the main directives (mydestination, smtp_helo_hostname, smtpd_sasl_local_domain), you can hardcode the hostname if you want. Just get rid of CWP's buggy double equals on a line (interpreted as setting a string, then a variable).