Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

email Disconnect after HELO

Hi there.


I'm trying to troubleshoot my middleware (Lasso) that's trying to send emails into my mail server. Both the middleware and the mail server are on the same machine. The log states the following:


Jan 2 15:53:16 alpha.mydomain.com postfix/postscreen[43828]: CONNECT from [192.168.1.7]:58759 to [192.168.1.7]:25

Jan 2 15:53:16 alpha.mydomain.com postfix/postscreen[43828]: PREGREET 20 after 0 from [192.168.1.7]:58759: HELO [192.168.1.7]\\r\\n

Jan 2 15:53:16 alpha.mydomain.com postfix/smtpd[43829]: connect from alpha.mydomain.com[192.168.1.7]

Jan 2 15:53:16 alpha.mydomain.com postfix/smtpd[43829]: lost connection after HELO from alpha.mydomain.com[192.168.1.7]

Jan 2 15:53:16 alpha.mydomain.com postfix/smtpd[43829]: disconnect from alpha.mydomain.com[192.168.1.7]


The middleware's log states that it couldn't connect to the mail server (under directives for alpha.local and alpha.mydomain.com), and I am assuming that its log is less informative due to the lack of feedback from the mail server. The mail server's log above indicates that a HELO was received, then the disconnection happens. Over and over again, under all kinds of scenarios.


There's a valid username and password for a user on the server that's being used for authentication. I've loosened up the authentication methods on the server, set to "automatic". Didn't work. Set it up to "Custom" (APOP, CRAM-MD5 and Digest-MD5). Didn't work. A developer for the middleware wants me to test to see if it's an authentication issue. I don't think it is, but I want to make sure.


Just for comparison, I tried setting it up using smtp.gmail.com and it worked. There is no un/pw combination needed for that SMTP system, and it went through just fine.


Is there a way to take away authentication? Yes I know it's a real problem, but it's for a couple of minutes for testing purposes only. This might lead to them reviewing their protocol for authentication if I can prove it's their software.


Thanks for any insight. Truly appreciated.


Cheers

Mac Pro, OS X Mountain Lion (10.8.2), Hypercard UG!

Posted on Jan 2, 2013 1:36 PM

Reply
33 replies

Jan 3, 2013 2:01 AM in response to BioRich

Since your Lasso/FM Server is on your internal subnet, simply add its IP to the mynetworks parameter in main.cf and don't set Lasso to authenticate.


If you still wish to authenticate, you may want to try clear/plaintext first for the sake of troubleshooting. Many software packages have problems with different authentication methods.

Jan 3, 2013 3:28 AM in response to pterobyte

Hi there. Thanks for the reply.


main.cf has a default directive on line 684 that isn't commented-out that has the following:


mynetworks = 127.0.0.0/8, [::1]/128


Not really sure how I would modify that directive to incorporate my allowed internal IP range to be qualified as friendly:


192.168.1.2...1.9.168.1.128


How can I enter that?


Hey thanks for the leadership on this. If I can get this sorted, it can help out a whole dev community.


Cheers

Jan 3, 2013 5:22 AM in response to BioRich

Simply add this:


mynetworks = 127.0.0.0/8, [::1]/128, 192.168.1.0/24


at the end of:


/Library/Server/Mail/Config/postfix/main.cf


(Don't worry about the duplicate parameter, Postfix will keep the last one it encounters. This has the benefit that you can put all your manual changes at the end of the file for easier reading and less interference with Server.app)


When done, issue:


sudo postfix reload


HTH,

Alex

Jan 3, 2013 9:50 AM in response to pterobyte

Ah I changed the other one. Why Apple tosses these things at us, I have no clue.


OK, all changed up. Still nothing.


Here's the result:


Last login: Thu Jan 3 12:44:38 on console

alpha:~ fred$ postconf -n -c /Library/Server/Mail/Config/postfix

biff = no

command_directory = /usr/sbin

config_directory = /Library/Server/Mail/Config/postfix

content_filter = smtp-amavis:[127.0.0.1]:10024

daemon_directory = /usr/libexec/postfix

data_directory = /Library/Server/Mail/Data/mta

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5

dovecot_destination_recipient_limit = 1

enable_server_options = yes

header_checks = pcre:/Library/Server/Mail/Config/postfix/custom_header_checks

html_directory = /usr/share/doc/postfix/html

imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred

inet_interfaces = loopback-only

inet_protocols = all

mail_owner = _postfix

mailbox_size_limit = 0

mailbox_transport = dovecot

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

maps_rbl_domains =

message_size_limit = 10485760

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mydomain = myDomain.com

mydomain_fallback = localhost

myhostname = alpha.myDomain.com

mynetworks = 127.0.0.0/8, [::1]/128, 192.168.1.0/24

newaliases_path = /usr/bin/newaliases

postscreen_dnsbl_sites = zen.spamhaus.org*2

queue_directory = /Library/Server/Mail/Data/spool

readme_directory = /usr/share/doc/postfix

recipient_canonical_maps = hash:/Library/Server/Mail/Config/postfix/system_user_maps

recipient_delimiter = +

relayhost =

sample_directory = /usr/share/doc/postfix/examples

sendmail_path = /usr/sbin/sendmail

setgid_group = _postdrop

smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_rbl_client zen.spamhaus.org permit

smtpd_enforce_tls = no

smtpd_helo_required = yes

smtpd_helo_restrictions = reject_non_fqdn_helo_hostname reject_invalid_helo_hostname

smtpd_pw_server_security_options = cram-md5,digest-md5,login,plain

smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination check_policy_service unix:private/policy permit

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = alpha.myDomain.com

smtpd_tls_CAfile = /etc/certificates/alpha.myDomain.com.E1288333CC7B03BE3AFAF4889B8743F16A8A5295.c hain.pem

smtpd_tls_cert_file = /etc/certificates/alpha.myDomain.com.E1288333CC7B03BE3AFAF4889B8743F16A8A5295.c ert.pem

smtpd_tls_ciphers = medium

smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL

smtpd_tls_key_file = /etc/certificates/alpha.myDomain.com.E1288333CC7B03BE3AFAF4889B8743F16A8A5295.k ey.pem

smtpd_use_pw_server = yes

smtpd_use_tls = yes

tls_random_source = dev:/dev/urandom

unknown_local_recipient_reject_code = 550

use_sacl_cache = yes

virtual_alias_domains = $virtual_alias_maps hash:/Library/Server/Mail/Config/postfix/virtual_domains

virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users

Jan 3, 2013 10:01 AM in response to BioRich

Try adding this to the end of that main.cf as well:


smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname


If it still doesn't work, make sure your Lasso/FM app is not trying to authenticate. Also, try sending once more and please post the relevant bits of:

/var/log/mail.log

/Library/Logs/Mail/mailaccess.log

/var/log/system.log

for the timeframe of your sending attempt.

Jan 3, 2013 12:32 PM in response to pterobyte

192.168.1.4 is my workstation

192.168.1.7 is the server with Lasso and 10.8.2 Server



Some of this I'm not sure if it's relevant, so I just kept it.



SMTP log from Server.app

Jan 3 15:23:03 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [188.2.165.91]:4368

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4213]: connect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:04 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [192.168.1.4]:63328 to [192.168.1.7]:25

Jan 3 15:23:04 alpha.mydomain.com postfix/postscreen[4262]: WHITELISTED [192.168.1.4]:63328

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4325]: connect from unknown[192.168.1.4]

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4325]: disconnect from unknown[192.168.1.4]



/library/logs/mail/mailaccess.log:

Jan 3 15:23:23 alpha.mydomain.com log[1532]: imap-login: ID sent: name=Mac OS X Mail, version=6.2 (1499), os=Mac OS X, os-version=10.8.2 (12C60), vendor=Apple Inc.: rip=192.168.1.4, lip=192.168.1.7

Jan 3 15:23:23 alpha.mydomain.com log[1532]: imap-login: Login: user=<my_username>, method=CRAM-MD5, rip=192.168.1.4, lip=192.168.1.7, mpid=1598





/var/log/system.log:

Jan 3 15:23:28 alpha.mydomain.com mdworker[4331]: Unable to talk to lsboxd

Jan 3 15:23:28 alpha.mydomain.com mdworker[4330]: Unable to talk to lsboxd

Jan 3 15:23:28 alpha.mydomain.com sandboxd[4333] ([4331]): mdworker(4331) deny mach-lookup com.apple.ls.boxd

Jan 3 15:23:28 alpha.mydomain.com sandboxd[4333] ([4330]): mdworker(4330) deny mach-lookup com.apple.ls.boxd

Jan 3 15:23:28 alpha kernel[0]: Sandbox: sandboxd(4333) deny mach-lookup com.apple.coresymbolicationd

Jan 3 15:24:12 alpha.mydomain.com filecoordinationd[126]: NSFileCoordinator only handles URLs that use the file: scheme. This one does not:

(null)

Jan 3 15:24:17 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (2,0)

Jan 3 15:24:17 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Library/PrivilegedHelperTools/com.apple.serverd' [98] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (100000,0)

Jan 3 15:24:24 alpha.mydomain.com BBEdit[707]: CVCGDisplayLink::setCurrentDisplay didn't find a valid display - falling back to 60Hz

Jan 3 15:24:27 --- last message repeated 1 time ---

Jan 3 15:24:27 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (2,0)

Jan 3 15:24:27 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Library/PrivilegedHelperTools/com.apple.serverd' [98] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (100000,0)

Jan 3 15:24:51 alpha.mydomain.com postfix/smtpd[4325]: warning: hostname customer-qro-153-195.megared.net.mx does not resolve to address 189.198.153.195: nodename nor servname provided, or not known

Jan 3 15:24:57 alpha.mydomain.com postfix/smtpd[4213]: warning: hostname 96-38-164-142.dhcp.reno.nv.charter.com does not resolve to address 96.38.164.142: nodename nor servname provided, or not known

Jan 3 15:24:58 alpha.mydomain.com postfix/smtpd[4325]: warning: hostname customer-qro-153-195.megared.net.mx does not resolve to address 189.198.153.195: nodename nor servname provided, or not known

Jan 3 15:25:07 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (2,0)

Jan 3 15:25:07 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Library/PrivilegedHelperTools/com.apple.serverd' [98] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (100000,0)

Jan 3 15:25:17 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (2,0)

Jan 3 15:25:17 alpha.mydomain.com com.apple.SecurityServer[19]: Succeeded authorizing right 'system.privilege.admin' by client '/Library/PrivilegedHelperTools/com.apple.serverd' [98] for authorization created by '/Applications/Server.app/Contents/ServerRoot/usr/libexec/ServerEventAgent' [108] (100000,0)

Jan 3 15:25:26 alpha.mydomain.com postfix/smtpd[4325]: warning: hostname customer-qro-153-195.megared.net.mx does not resolve to address 189.198.153.195: nodename nor servname provided, or not known

Jan 3 15:25:55 alpha.mydomain.com BBEdit[707]: CVCGDisplayLink::setCurrentDisplay didn't find a valid display - falling back to 60Hz





/var/log/mail.log:

Jan 3 15:23:03 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [188.2.165.91]:4368

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4213]: connect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:04 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [192.168.1.4]:63328 to [192.168.1.7]:25

Jan 3 15:23:04 alpha.mydomain.com postfix/postscreen[4262]: WHITELISTED [192.168.1.4]:63328

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4325]: connect from unknown[192.168.1.4]

Jan 3 15:23:04 alpha.mydomain.com postfix/smtpd[4325]: disconnect from unknown[192.168.1.4]

Jan 3 15:23:06 alpha.mydomain.com postfix/smtpd[4213]: lost connection after DATA from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:06 alpha.mydomain.com postfix/smtpd[4213]: disconnect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:13 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [188.2.165.91]:4778 to [192.168.1.7]:25

Jan 3 15:23:13 alpha.mydomain.com postfix/dnsblog[4320]: addr 188.2.165.91 listed by domain zen.spamhaus.org as 127.0.0.4

Jan 3 15:23:13 alpha.mydomain.com postfix/dnsblog[4320]: addr 188.2.165.91 listed by domain zen.spamhaus.org as 127.0.0.10

Jan 3 15:23:13 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [188.2.165.91]:4778

Jan 3 15:23:13 alpha.mydomain.com postfix/smtpd[4325]: connect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:15 alpha.mydomain.com postfix/smtpd[4325]: lost connection after DATA from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:15 alpha.mydomain.com postfix/smtpd[4325]: disconnect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:28 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [188.2.165.91]:1183 to [192.168.1.7]:25

Jan 3 15:23:28 alpha.mydomain.com postfix/dnsblog[4320]: addr 188.2.165.91 listed by domain zen.spamhaus.org as 127.0.0.4

Jan 3 15:23:28 alpha.mydomain.com postfix/dnsblog[4320]: addr 188.2.165.91 listed by domain zen.spamhaus.org as 127.0.0.10

Jan 3 15:23:28 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [188.2.165.91]:1183

Jan 3 15:23:28 alpha.mydomain.com postfix/smtpd[4213]: connect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:30 alpha.mydomain.com postfix/smtpd[4213]: lost connection after DATA from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:30 alpha.mydomain.com postfix/smtpd[4213]: disconnect from cable-188-2-165-91.dynamic.sbb.rs[188.2.165.91]

Jan 3 15:23:53 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [63.161.1.20]:3212 to [192.168.1.7]:25

Jan 3 15:23:53 alpha.mydomain.com postfix/dnsblog[4320]: addr 63.161.1.20 listed by domain zen.spamhaus.org as 127.0.0.4

Jan 3 15:23:59 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [63.161.1.20]:3212

Jan 3 15:24:01 alpha.mydomain.com postfix/smtpd[4325]: connect from unknown[63.161.1.20]

Jan 3 15:24:02 alpha.mydomain.com postfix/smtpd[4325]: disconnect from unknown[63.161.1.20]

Jan 3 15:24:14 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [75.98.72.195]:50563 to [192.168.1.7]:25

Jan 3 15:24:14 alpha.mydomain.com postfix/postscreen[4262]: PASS OLD [75.98.72.195]:50563

Jan 3 15:24:14 alpha.mydomain.com postfix/smtpd[4213]: connect from mx240-out.lists.smartertravelmedia.com[75.98.72.195]

Jan 3 15:24:14 alpha.mydomain.com postfix/smtpd[4213]: EA0FB28BC99: client=mx240-out.lists.smartertravelmedia.com[75.98.72.195]

Jan 3 15:24:15 alpha.mydomain.com postfix/cleanup[4342]: EA0FB28BC99: message-id=<m-5C357E8165-11586120-13566290-130103151031093@deals.tripadvisor.com>

Jan 3 15:24:15 alpha.mydomain.com postfix/qmgr[1816]: EA0FB28BC99: from=<b-5C357E8165-11586120-13566290-130103151031093@deals.tripadvisor.com>, size=40478, nrcpt=1 (queue active)

Jan 3 15:24:15 alpha.mydomain.com postfix/smtpd[4213]: disconnect from mx240-out.lists.smartertravelmedia.com[75.98.72.195]

Jan 3 15:24:16 alpha.mydomain.com postfix/smtpd[4346]: connect from localhost[127.0.0.1]

Jan 3 15:24:16 alpha.mydomain.com postfix/smtpd[4346]: B9E0B28BCA7: client=localhost[127.0.0.1]

Jan 3 15:24:16 alpha.mydomain.com postfix/cleanup[4342]: B9E0B28BCA7: message-id=<m-5C357E8165-11586120-13566290-130103151031093@deals.tripadvisor.com>

Jan 3 15:24:16 alpha.mydomain.com postfix/smtpd[4346]: disconnect from localhost[127.0.0.1]

Jan 3 15:24:16 alpha.mydomain.com postfix/qmgr[1816]: B9E0B28BCA7: from=<b-5C357E8165-11586120-13566290-130103151031093@deals.tripadvisor.com>, size=40936, nrcpt=1 (queue active)

Jan 3 15:24:44 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [189.198.153.195]:43329 to [192.168.1.7]:25

Jan 3 15:24:44 alpha.mydomain.com postfix/dnsblog[4320]: addr 189.198.153.195 listed by domain zen.spamhaus.org as 127.0.0.4

Jan 3 15:24:44 alpha.mydomain.com postfix/dnsblog[4320]: addr 189.198.153.195 listed by domain zen.spamhaus.org as 127.0.0.11

Jan 3 15:24:50 alpha.mydomain.com postfix/postscreen[4262]: DNSBL rank 2 for [189.198.153.195]:43329

Jan 3 15:24:51 alpha.mydomain.com postfix/smtpd[4325]: warning: hostname customer-qro-153-195.megared.net.mx does not resolve to address 189.198.153.195: nodename nor servname provided, or not known

Jan 3 15:24:51 alpha.mydomain.com postfix/smtpd[4325]: connect from unknown[189.198.153.195]

Jan 3 15:24:51 alpha.mydomain.com postfix/postscreen[4262]: CONNECT from [96.38.164.142]:2024 to [192.168.1.7]:25

Jan 3 15:24:51 alpha.mydomain.com postfix/dnsblog[4320]: addr 96.38.164.142 listed by domain zen.spamhaus.org as 127.0.0.4

Jan 3 15:24:53 alpha.mydomain.com postfix/smtpd[4325]: lost connection after DATA from unknown[189.198.153.195]

Jan 3 15:24:53 alpha.mydomain.com postfix/smtpd[4325]: disconnect from unknown[189.198.153.195]

Jan 3, 2013 7:39 PM in response to BioRich

A couple questions/thoughts


- In lasso, did you specify a hostname or IP address?

did you try: 127.0.0.1


- In lasso, can you specify a port?

If so, try: 127.0.0.1 port 10025


- In lasso- disable authentication, you shouldn't need it.


- are you sure the suggestion Alex posted is in place

smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname

Jan 3, 2013 7:52 PM in response to UptimeJeff

Hi Jeff.


Doesn't the arrival of the HELO in the log demonstrate that it's definitely finding the machine, but the first part of the protocol isn't being achieved?


I've not tried 127.0.0.1, but will give it a whirl now. I will try without and with port 10025.


I just looked and it's definitely here: /Library/Server/Mail/Config/postfix/main.cf

Jan 3, 2013 9:47 PM in response to BioRich

Yeah, that port isn't open. I'm using Lasso on my workstation to send the email to the SMTP server, just to erase the "same machine" potential problem. I've tried localhost in there and that didn't change anything. Using that port didn't show up in the SMTP log.


Once changed to port 25 again, the connection showed up in the log:


postfix/smtpd[14668]: lost connection after CONNECT from unknown[192.168.1.4]

Jan 4, 2013 2:52 AM in response to pterobyte

Yes, that's why I'm not using it at the moment because the Lasso engine is off the server. Same result as when the engine is on the server and using either the fully qualified machine name, LAN machine name, IP, or localhost.


Something is happening after the HELO that I'm not familiar with. I don't know postfix.

email Disconnect after HELO

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.