[SOLVED] SmartHost Bounty

killmasta93

Renowned Member
Aug 13, 2017
958
56
68
30
Hi,
I have been trying for few months to get smarthost to work but had no luck, Im willing to pay someone to assist me on why it does not work. PM for details.
 
What’s the problem with your smarthost entry? Should be for outgoing mails only, they will then get through your smarthost and it need to accept your mailserver relaying mails through it.

If you need further help, would require information on your mail flow and systems, you use as I can only help on systems, I know.
 
Thanks for the reply, currently i have a postfix as for the email server and on the main.cf i relay to proxmox email server.

Code:
: to=<sistemas@clientdomain.com>, relay=local, delay=0.17, delays=0.07/0.07/0/0.02, dsn=5.1.1, status=bounced (unknown user: "sistemas")
but im getting this in the log of proxmox,
If you can solve this issue, ill send you the money though paypal

Thank you
 
Thanks for the reply, on my postfix on my main i have this
Code:
smtp_sasl_security_options = noanonymous
myhostname = mail.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.com, mail.mydomain.com, localhost.mydomain.com, localhost
relayhost = 192.168.3.141:26
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.3.0/24 192.168.3.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtp_destination_concurrency_limit = 2
smtpd_client_connection_count_limit = 10
smtpd_client_connection_rate_limit = 30
 
This seems to be fine. Another thing to check: Did you add your domain "clientdomain.com" to the relay domains in PMG? You can find this setting in Configuration -> Mail Proxy -> Relay domains.
 
Thanks for the reply, thats correct on the relay domain i have
Code:
mydomain.com
thats whats driving me insane i cannot get it to work
 
Thanks for the reply this is a log from proxmox
Code:
Nov 24 11:51:42 pmg postfix/smtpd[24725]: connect from hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/smtpd[24725]: 4555F100F97: client=hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header To: killmasta93@gmail.com from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header Subject: test from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header From: <sistemas@mydomain.com> from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/smtpd[24725]: disconnect from hermes.casa.local[192.168.3.150] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Nov 24 11:51:42 pmg postfix/qmgr[698]: 4555F100F97: from=<sistemas@mydomain.com>, size=3815, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 2018/11/24-11:51:42 CONNECT TCP Peer: "[127.0.0.1]:45214" Local: "[127.0.0.1]:10023"
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: new mail message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/smtpd[24733]: connect from localhost.localdomain[127.0.0.1]
Nov 24 11:51:42 pmg postfix/smtpd[24733]: 6713310145A: client=localhost.localdomain[127.0.0.1], orig_client=hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 6713310145A: message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/qmgr[698]: 6713310145A: from=<sistemas@mydomain.com>, size=6573, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: accept mail to <killmasta93@gmail.com> (6713310145A)
Nov 24 11:51:42 pmg postfix/smtpd[24733]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 commands=5
Nov 24 11:51:42 pmg postfix/local[24735]: 6713310145A: to=<killmasta93@gmail.com>, relay=local, delay=0.19, delays=0.11/0/0/0.07, dsn=5.1.1, status=bounced (unknown user: "killmasta93")
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 955391011C5: message-id=<20181124165142.955391011C5@pmg.casa.local>
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: processing time: 0.144 seconds (0, 0.017)
Nov 24 11:51:42 pmg postfix/lmtp[24729]: 4555F100F97: to=<killmasta93@gmail.com>, relay=127.0.0.1[127.0.0.1]:10023, delay=0.35, delays=0.06/0/0.04/0.24, dsn=2.5.0, status=sent (250 2.5.0 OK (1011C55BF9819E5FA8B))
Nov 24 11:51:42 pmg postfix/qmgr[698]: 4555F100F97: removed
Nov 24 11:51:42 pmg postfix/qmgr[698]: 955391011C5: from=<>, size=8451, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg postfix/bounce[24736]: 6713310145A: sender non-delivery notification: 955391011C5
Nov 24 11:51:42 pmg postfix/qmgr[698]: 6713310145A: removed
Nov 24 11:51:42 pmg postfix/smtp[24734]: Anonymous TLS connection established to 192.168.3.150[192.168.3.150]:27: TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)
Nov 24 11:51:42 pmg postfix/smtp[24734]: 955391011C5: to=<sistemas@mydomain.com>, relay=192.168.3.150[192.168.3.150]:27, delay=0.2, delays=0.04/0/0.06/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 13B4E2293F)
Nov 24 11:51:42 pmg postfix/qmgr[698]: 955391011C5: removed
Nov 24 11:51:50 pmg postfix/postscreen[24661]: CONNECT from [190.13.141.234]:64046 to [192.168.3.141]:25
Nov 24 11:51:51 pmg postfix/postscreen[24661]: PASS OLD [190.13.141.234]:64046
Nov 24 11:51:51 pmg postfix/smtpd[24828]: connect from unknown[190.13.141.234]
Nov 24 11:51:51 pmg postfix/smtpd[24828]: disconnect from unknown[190.13.141.234] helo=1 auth=0/1 quit=1 commands=2/3
 
Thanks for the reply this is a log from proxmox
Code:
Nov 24 11:51:42 pmg postfix/smtpd[24725]: connect from hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/smtpd[24725]: 4555F100F97: client=hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header To: killmasta93@gmail.com from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header Subject: test from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: info: header From: <sistemas@mydomain.com> from hermes.casa.local[192.168.3.150]; from=<sistemas@mydomain.com> to=<killmasta93@gmail.com> proto=ESMTP helo=<mail.mydomain.com>
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 4555F100F97: message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/smtpd[24725]: disconnect from hermes.casa.local[192.168.3.150] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Nov 24 11:51:42 pmg postfix/qmgr[698]: 4555F100F97: from=<sistemas@mydomain.com>, size=3815, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 2018/11/24-11:51:42 CONNECT TCP Peer: "[127.0.0.1]:45214" Local: "[127.0.0.1]:10023"
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: new mail message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/smtpd[24733]: connect from localhost.localdomain[127.0.0.1]
Nov 24 11:51:42 pmg postfix/smtpd[24733]: 6713310145A: client=localhost.localdomain[127.0.0.1], orig_client=hermes.casa.local[192.168.3.150]
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 6713310145A: message-id=<008201d48415$f98723f0$ec956bd0$@mydomain.com>
Nov 24 11:51:42 pmg postfix/qmgr[698]: 6713310145A: from=<sistemas@mydomain.com>, size=6573, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: accept mail to <killmasta93@gmail.com> (6713310145A)
Nov 24 11:51:42 pmg postfix/smtpd[24733]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 commands=5
Nov 24 11:51:42 pmg postfix/local[24735]: 6713310145A: to=<killmasta93@gmail.com>, relay=local, delay=0.19, delays=0.11/0/0/0.07, dsn=5.1.1, status=bounced (unknown user: "killmasta93")
Nov 24 11:51:42 pmg postfix/cleanup[24728]: 955391011C5: message-id=<20181124165142.955391011C5@pmg.casa.local>
Nov 24 11:51:42 pmg pmg-smtp-filter[18443]: 1011C55BF9819E5FA8B: processing time: 0.144 seconds (0, 0.017)
Nov 24 11:51:42 pmg postfix/lmtp[24729]: 4555F100F97: to=<killmasta93@gmail.com>, relay=127.0.0.1[127.0.0.1]:10023, delay=0.35, delays=0.06/0/0.04/0.24, dsn=2.5.0, status=sent (250 2.5.0 OK (1011C55BF9819E5FA8B))
Nov 24 11:51:42 pmg postfix/qmgr[698]: 4555F100F97: removed
Nov 24 11:51:42 pmg postfix/qmgr[698]: 955391011C5: from=<>, size=8451, nrcpt=1 (queue active)
Nov 24 11:51:42 pmg postfix/bounce[24736]: 6713310145A: sender non-delivery notification: 955391011C5
Nov 24 11:51:42 pmg postfix/qmgr[698]: 6713310145A: removed
Nov 24 11:51:42 pmg postfix/smtp[24734]: Anonymous TLS connection established to 192.168.3.150[192.168.3.150]:27: TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)
Nov 24 11:51:42 pmg postfix/smtp[24734]: 955391011C5: to=<sistemas@mydomain.com>, relay=192.168.3.150[192.168.3.150]:27, delay=0.2, delays=0.04/0/0.06/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 13B4E2293F)
Nov 24 11:51:42 pmg postfix/qmgr[698]: 955391011C5: removed
Nov 24 11:51:50 pmg postfix/postscreen[24661]: CONNECT from [190.13.141.234]:64046 to [192.168.3.141]:25
Nov 24 11:51:51 pmg postfix/postscreen[24661]: PASS OLD [190.13.141.234]:64046
Nov 24 11:51:51 pmg postfix/smtpd[24828]: connect from unknown[190.13.141.234]
Nov 24 11:51:51 pmg postfix/smtpd[24828]: disconnect from unknown[190.13.141.234] helo=1 auth=0/1 quit=1 commands=2/3

Hi,

why do you then mention smarthost as there is no smarthost setting on this. It looks like gmail.com has been entered to be delivered local, so therefor the system is looking for a local user, which does not exist. If you would be able to provide me credentials via PM, I can have a few on your setup and test your setup on any misconfiguration regarding your problem.

Regards,
Christian
 
Hi,

why do you then mention smarthost as there is no smarthost setting on this. It looks like gmail.com has been entered to be delivered local, so therefor the system is looking for a local user, which does not exist. If you would be able to provide me credentials via PM, I can have a few on your setup and test your setup on any misconfiguration regarding your problem.

Regards,
Christian
sure im going to send you pm thank you
 
I just had a short test on my test system and I can't see there something like

Nov 24 11:51:42 pmg postfix/local[24735]: 6713310145A: to=<killmasta93@gmail.com>, relay=local, delay=0.19, delays=0.11/0/0/0.07, dsn=5.1.1, status=bounced (unknown user: "killmasta93")

So that looks like it tries to deliver local instead of sending out to "the internet". So there seems to be the problem. Looks like gmail.com has been set anywhere on PMG to be handled as local domain.
 
Based on my test system, for performing valid outgoing mails, the following steps are required:

1. Ensure, port 26 of PMG is available for the sending mail system
2. If not in the same network, add the sending mail system to the trusted networks (CIDR notation required here, e.g. if you test with a client computer, remember to add /32 to the external client IP address)
3. Ensure, the recipient domain is neither(!) listed in relay domains, otherwise you may run into a loop
4. Ensure, the recipient domain is nor(!) the domain port of the host name of your PMG installation, otherwise mails are considered as local
5. You may test outgoing mails via telnet from a client computer meanwhile tail -f /var/log/mail.log on the PMG system
6. You may test different destination addresses to ensure, there is no problem with 3 or 4
7. You may test, that PMG is able to resolve the domain, you try to reach to, and be able to fetch its MX record
 

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!