SMTP Banner Check Reverse DNS does not match SMTP Banner

emrahtolu

New Member
Jun 30, 2021
10
0
1
39
HTML:
Connecting to 123.456.78.910

220 mail.domain.local Service ready [599 ms]
EHLO keeper-us-east-1c.mxtoolbox.com
250-Requested mail action okay, completed
250-SIZE 20485760
250-ETRN
250-8BITMIME
250 OK [255 ms]
MAIL FROM:<supertool@mxtoolboxsmtpdiag.com>
250 Requested mail action okay, completed [253 ms]
RCPT TO:<test@mxtoolboxsmtpdiag.com>
554 Transaction failed [249 ms]

LookupServer 2871ms

I don't know how to solve this problem. I searched but I couldn't find any kind of solution that makes sense or that I can implement. All I want is for the ehlo result to go to the current mail.domain.com address. not using my local address. I manually changed the dns/searchdomain/ part, everything appeared normal but this time my mails were accepted/bounced.

HTML:
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. you can
delete your own text from the attached returned message.

                    the mail system

<emrahtolu@domain.com>: mail for 10.1.0.20:25 loops back to myself

Can you briefly explain me step by step? I don't know much about console
 
Last edited:
What are you trying to do?
What did you do to get the output you posted?
 
Are you sure that the test is going to PMG ? - asking because usually in the default config Proxmox is printed in the smtpd banner
250-Requested mail action okay, completed
this also does not look like it's coming from a postfix instance
 
Are you sure that the test is going to PMG ? - asking because usually in the default config Proxmox is printed in the smtpd banner

this also does not look like it's coming from a postfix instance
I changed the name from pmg to mail. mail.domain.local comes from this query. regular pmg.domain.local. naturally responds. because it is pmg that responds. normally mail.domain.com should correspond to the answer. Why is the father giving this error? How exactly is the way to fix this?
 
I changed the name from pmg to mail. mail.domain.local comes from this query. regular pmg.domain.local. naturally responds. because it is pmg that responds. normally mail.domain.com should correspond to the answer. Why is the father giving this error? How exactly is the way to fix this?
Hello,

if you want to be fully green with mxtoolbox, then do this:
cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates/

Edit the file /etc/pmg/templates/main.cf.in
and replace this:

myhostname = [% dns.hostname %].[% dns.domain %]

to this to the fqdn you need:
myhostname=mail.domain.com

Then reload the pm filter service:
systemctl restart pmg-smtp-filter.service

BR,
 
  • Like
Reactions: tarkvsg
Hello,

if you want to be fully green with mxtoolbox, then do this:
cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates/

Edit the file /etc/pmg/templates/main.cf.in
and replace this:

myhostname = [% dns.hostname %].[% dns.domain %]

to this to the fqdn you need:
myhostname=mail.domain.com

Then reload the pm filter service:
systemctl restart pmg-smtp-filter.service

BR,
Thank you, if I open the console and just write them, I will change the appropriate places according to myself. Will it be enough? I may not be able to master the commands in this regard.
 
Thank you, if I open the console and just write them, I will change the appropriate places according to myself. Will it be enough? I may not be able to master the commands in this regard.
This should do the trick, I tried it myself, also note, that the /etc/pmg/templates/ will be in included in backup also.
 
This should do the trick, I tried it myself, also note, that the /etc/pmg/templates/ will be in included in backup also.
Edit the file /etc/pmg/templates/main.cf.in
and replace this:
I can't quite understand here.
 
Last edited:
Edit the file /etc/pmg/templates/main.cf.in
and replace this:
I can't quite understand here.
You need to edit the text config file manually on the console with nano/vi/vim/mcedit and locate the line I mentioned.

I mostly use nano fo the hotkeys, so if needed:
nano /etc/pmg/templates/main.cf.in
search for the line with [ctrl] + [w] and typing "myhostname" (look at the bootom of the screen) [Enter] will search for the first match
In my config this is the second match, so [ctrl] + [w] and [Enter] again
edit the line to your config, then save the file with [ctrl] + [o]
If you mess up, then exit with [ctrl] + [x] or copy from /var/lib/pmg/templates/main.cf.in again.

BR
 
Hi emrahtolu,
I ran into the very same problem. Edited the main.cf.in as described by pigen and got the error message for incoming mails. Outgoing mail is working perfect. And I´m sure that all mail traffic is going through Proxmox because both the incoming and outgoing mails are showing up in the sender and receiver Statistic screens in the gui. Does anybody have a solution? Would postconf -n output help?

Best regards,

Mike
 
Hi emrahtolu,
I ran into the very same problem. Edited the main.cf.in as described by pigen and got the error message for incoming mails. Outgoing mail is working perfect. And I´m sure that all mail traffic is going through Proxmox because both the incoming and outgoing mails are showing up in the sender and receiver Statistic screens in the gui. Does anybody have a solution? Would postconf -n output help?

Best regards,

Mike
I couldn't. I made a mistake and then I gave up. then the system crashed. While it was corrupt, I went and installed 7.1. it works as it is now. If you find a solution and know exactly how it's done, please let me know. console. I'm trying something very foreign to me, but I can't progress. I'm like in a bottleneck. so this problem bothered me a lot.
 
I'm not sure what all your issues are with your hostnames, but I solved the first problem by modifying the main.conf.in file in /etc/pmg/templates, I modified this line (somewhere around line 11) so that it reads:

smtpd_banner = [% pmg.mail.banner %]

I removed the "$myhostname". That way, I can put exactly what I want in the mail banner section in the GUI:

1642174111949.png

Since PMG was inserted between my smtp server and the world, outside systems were no longer seeing my mx hostname presented on the banner (which was failing the mxtoolbox SMTP Banner check you showed above). With the change above, I can control the entire banner text presented during the transaction and I don't have to change pmg's actual hostname to make that work.
 
I'm new to this stuff. Can you tell me how to do it in the simplest way?

I'm not sure what all your issues are with your hostnames, but I solved the first problem by modifying the main.conf.in file in /etc/pmg/templates, I modified this line (somewhere around line 11) so that it reads:

smtpd_banner = [% pmg.mail.banner %]

I removed the "$myhostname". That way, I can put exactly what I want in the mail banner section in the GUI:

View attachment 33263

Since PMG was inserted between my smtp server and the world, outside systems were no longer seeing my mx hostname presented on the banner (which was failing the mxtoolbox SMTP Banner check you showed above). With the change above, I can control the entire banner text presented during the transaction and I don't have to change pmg's actual hostname to make that work.
I'm new to this stuff. Can you tell me how to do it in the simplest way?
 
Here's the simplest way to explain what I did.
  1. Copy the template file:
    cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates
    You may need to make the /etc/pmg/templates directory if it doesn't exist already.
  2. Edit that file:
    nano -c /etc/pmg/templates/main.cf.in
  3. Find the line (probably line 11) that says:
    smtpd_banner = $myhostname [% pmg.mail.banner %]
    change it to:
    smtpd_banner = [% pmg.mail.banner %]
  4. Since by SMTP standards, you have to have host name in the banner, we now have to add it back via the GUI:
    Configuration -> Mail Proxy -> Options
    Find the option near the bottom that says SMTPD banner with an entry of "ESMTP Proxmox"
    Double click on that entry and add the hostname you want in front. It should look something like this: "host.domain ESMTP Proxmox" when done. It should probably be the same hostname as your MX record.
  5. When you save that, PMG should regenerate the /etc/postfix/main.cf file. You can verify by checking that file for the proper banner setting.
 
Here's the simplest way to explain what I did.
  1. Copy the template file:
    cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates
    You may need to make the /etc/pmg/templates directory if it doesn't exist already.
  2. Edit that file:
    nano -c /etc/pmg/templates/main.cf.in
  3. Find the line (probably line 11) that says:
    smtpd_banner = $myhostname [% pmg.mail.banner %]
    change it to:
    smtpd_banner = [% pmg.mail.banner %]
  4. Since by SMTP standards, you have to have host name in the banner, we now have to add it back via the GUI:
    Configuration -> Mail Proxy -> Options
    Find the option near the bottom that says SMTPD banner with an entry of "ESMTP Proxmox"
    Double click on that entry and add the hostname you want in front. It should look something like this: "host.domain ESMTP Proxmox" when done. It should probably be the same hostname as your MX record.
  5. When you save that, PMG should regenerate the /etc/postfix/main.cf file. You can verify by checking that file for the proper banner setting.
You may need to make the /etc/pmg/templates directory if it doesn't exist already. how to create directory

Actually, I think the problem is that I can't find this 11th line.
 
Here's the simplest way to explain what I did.
  1. Copy the template file:
    cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates
    You may need to make the /etc/pmg/templates directory if it doesn't exist already.
  2. Edit that file:
    nano -c /etc/pmg/templates/main.cf.in
  3. Find the line (probably line 11) that says:
    smtpd_banner = $myhostname [% pmg.mail.banner %]
    change it to:
    smtpd_banner = [% pmg.mail.banner %]
  4. Since by SMTP standards, you have to have host name in the banner, we now have to add it back via the GUI:
    Configuration -> Mail Proxy -> Options
    Find the option near the bottom that says SMTPD banner with an entry of "ESMTP Proxmox"
    Double click on that entry and add the hostname you want in front. It should look something like this: "host.domain ESMTP Proxmox" when done. It should probably be the same hostname as your MX record.
  5. When you save that, PMG should regenerate the /etc/postfix/main.cf file. You can verify by checking that file for the proper banner setting.
PMG 8.0.7. Work! Thanks a lot!
 
  • Like
Reactions: Dirk_M

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!