# localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to Daemon0



## parcival (Jan 3, 2011)

Hallo all and a happy new year,
I have here some FreeBSD 8.1 standard installations.
With all these systems, i get from sendmail this error message.


```
Jan  3 13:12:39 ns1 sm-mta[3107]: p03CCdkb003107: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to Daemon0
Jan  3 13:13:41 ns1 sm-mta[3134]: p03CDfhV003134: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to Daemon0
Jan  3 13:14:41 ns1 sm-mta[3161]: p03CEfDG003161: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to Daemon0
Jan  3 13:15:40 ns1 sm-mta[3345]: p03CFext003345: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to Daemon0
```

However, i can send from these systems e-mail.

What do I make wrong? Somebody an idea?

Thank you for every help.

parcival


----------



## DutchDaemon (Jan 3, 2011)

Are you running a monitoring system (snmp, or another mechanism to check running daemons, etc.) on that system?


----------



## parcival (Jan 3, 2011)

Thank you for your help, you are right.
These are zabbix agents.

But

```
zabbix_get -s192.168.1.12 -knet.tcp.service[smtp,Hostname] or
zabbix_get -s192.168.1.12 -knet.tcp.service[smtp]
```

give the same error.

What must i do in sendmail, that he accepts smtp connections of the agent (127.0.0.1 or Hostname)?

thx

parcival


----------



## DutchDaemon (Jan 3, 2011)

There is nothing wrong with your Sendmail. Note that Sendmail is complaining about the connecting party not setting up a proper SMTP session or issuing a proper SMTP command (like the ones in the error message). This is correct, because all Zabbix does is send a tcp packet to elicit a response from port 25 and probably harvest the result code and the hostname in the process, because that's all you get from a connection.

Try:


```
telnet 127.0.0.1 25
[see reply]
quit
```

That's what Zabbix does, and that's what makes Sendmail yell "Hey, that was not a valid smtp session".


----------



## parcival (Jan 3, 2011)

Thank you for the info.
But my log file thereby grows fast and will read difficultly to.


----------



## DutchDaemon (Jan 3, 2011)

Other than finding this message in the sources and commenting it out (I don't think it's a tunable), make sure that the syslogd_enable setting in /etc/rc.conf does not have a *-c* or *-cc* flag, because that will disable the compression of similar log lines


----------



## parcival (Jan 3, 2011)

This well sounds.
If you are able to do this please something more exactly explain.
I am not FreeBSD guru :r
Thank you for your help and greetings to Holland

parcival


----------



## DutchDaemon (Jan 3, 2011)

[cmd=]ps ax | grep syslogd[/cmd]

If you see something like 
	
	



```
/usr/sbin/syslogd -s -cc
or
/usr/sbin/syslogd -s -c
```
compression of log lines is off. Remove *-c* or *-cc* from the *syslogd_flags* line in /etc/rc.conf and restart syslogd using [cmd=]service syslogd restart[/cmd]


----------



## parcival (Jan 3, 2011)

DutchDaemon, this was not the problem but thanks again 
Mine syslogd works without -s -c or -cc.

I have not understood rather this here.
>>Other than finding this message in the sources and commenting it out (I don't think it's a tunable)

Where must i do this and how (sendmail sources)?


----------



## DutchDaemon (Jan 3, 2011)

Proceed at your own risk! Don't come crying here if you shoot yourself in the foot. You'll have to have sources installed, to begin with.


```
cd /usr/src/contrib/sendmail/src/
vi srvrsmtp.c

comment out ([B]C style comments[/B], of course):

					  "%s did not issue MAIL/EXPN/VRFY/ETRN during connection to %s",

cd /usr/src/lib/libsm; make clean; make obj; make depend; make
cd /usr/src/lib/libsmutil; make clean; make obj; make depend; make
cd /usr/src/usr.sbin/sendmail; make clean; make obj; make depend; make; make install

Restart sendmail.
```

You'll have to do this every time you update your installation.


----------



## parcival (Jan 3, 2011)

Ok Ok, I have understood and will not cry here. 

thx

parcival


----------



## wblock@ (Jan 3, 2011)

DutchDaemon said:
			
		

> Proceed at your own risk! Don't come crying here if you shoot yourself in the foot. You'll have to have sources installed, to begin with.
> 
> {... commenting sendmail's "did not issue MAIL/EXPN/VRFY/ETRN" message}



Those messages can be useful to see when a spammer has given up.  Seems like it would be better to fix the Zabbix stuff to actually do something minor on connect instead of just hanging up.


----------

