Michael Rolli wrote:
Hallöle alle miteinander
Tja, Daniel, auch nicht wirklich.
linux:~ # less /etc/tcp.smtp 127.0.0.1:deny 192.168.1.100:allow,RELAYCLIENT="" :allow linux:~ # TCPREMOTEIP=127.0.0.1; tcprulescheck /etc/tcp.smtp.cdb rule : allow connection
So sieht's dann also aus. Also weiter geprobt:
linux:~ # less /etc/tcp.smtp :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.
So weit, so gut. Dann:
linux:~ # less /etc/tcp.smtp 127.0.0.1:allow :deny linux:~ # tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp linux:~ # tcprulescheck /etc/tcp.smtp.cdb rule : deny connection linux:~ # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 linux.mydomain.com ESMTP (host aus me) helo 250 linux.mydomain.com mail test@test.com 250 ok rcpt test@anything.any 250 ok
Jetzt müsste doch rcpthosts greifen, da die Umgebungsvariable RELAYCLIENT nicht gesetzt ist, oder? Weshalb nur nimmt er die Domain anything.any als RCPT an? Steht ja schliesslich bestimmt nicht in meiner rcpthosts???
Unglaublich! Als ob RELAYCLIENT immer gesetzt ist! Irgendwelche Ideen?
Gruss Michael
Hm ...: #cat /etc/tcprules/smtp.rules 127.0.0.1:deny 192.168.1.100:allow,RELAYCLIENT="" :allow #tcprules /etc/tcprules/smtp.cdb /tmp/smtp.tmp< /etc/tcprules/smtp.rules #export TCPREMOTEIP=127.0.0.1 #tcprulescheck /etc/tcprules/tcp.cdb rule 127.0.0.1: deny connection # export TCPREMOTEIP=192.168.1.100 ; tcprulescheck /etc/tcprules/smtp.cdb rule 192.168.1.100: set environment variable RELAYCLIENT= allow connection #unset TCPREMOTEIP #tcprulescheck /etc/tcprules/smtp.cdb rule : allow connection # *grrr* Wenn das Woertchen export nicht waer ... sorry Daniel