Koozali.org: home of the SME Server

SME refuses to take mail from specific host

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SME refuses to take mail from specific host
« on: May 01, 2007, 11:40:50 AM »
I'm very confused here...

(Server mentioned is a fully updated SME 7.1.3 in server/gateway mode)

I've set up a D-LINK dns-323 (a lan-connected NAS server) with a static local IP.

http://www.smallnetbuilder.com/content/view/29671/75/

For some reason, when this D-LINK box tries to send email-reports, it's being being declined by the server.

Checking the qpsmtpd-log, I found:

(Extract, only lines ending with "DECLINED")

Code: [Select]
xxx 13622 Plugin peers, hook set_hooks returned DECLINED,
xxx 13622 Plugin check_relay, hook connect returned DECLINED,
xxx 13622 Plugin check_norelay, hook connect returned DECLINED,
xxx 13622 Plugin check_spamhelo, hook helo returned DECLINED,


The complete conversation goes like this:

Code: [Select]
xxx 13622 Accepted connection 0/40 from 192.168.0.201 / backup.foo.net
xxx 13622 Connection from backup.saxdalen.net [192.168.0.201]
xxx 13622 running plugin (set_hooks): peers
xxx 13622 trying to get config for peers/192.168.0
xxx 13622 loading plugin peers peers/192.168.0
xxx 13622 loading plugin check_relay
xxx 13622 loading plugin check_norelay
xxx 13622 loading plugin check_basicheaders
xxx 13622 loading plugin check_badmailfrom
xxx 13622 loading plugin check_badrcptto_patterns
xxx 13622 loading plugin check_badrcptto
xxx 13622 loading plugin check_spamhelo
xxx 13622 loading plugin rcpt_ok
xxx 13622 loading plugin virus/pattern_filter check=patterns action=deny
xxx 13622 loading plugin tnef2mime
xxx 13622 loading plugin virus/clamav clamscan_path=/usr/bin/clamdscan action=reject max_size=25000000
xxx 13622 loading plugin queue/qmail-queue
xxx 13622 trying to get config for peers/192.168.0
xxx 13622 peers hooking valid_auth
xxx 13622 peers hooking set_hooks
xxx 13622 check_relay hooking connect
xxx 13622 check_norelay hooking connect
xxx 13622 check_basicheaders hooking data_post
xxx 13622 check_badmailfrom hooking rcpt
xxx 13622 check_badmailfrom hooking mail
xxx 13622 check_badrcptto_patterns hooking rcpt
xxx 13622 check_badrcptto hooking rcpt
xxx 13622 check_spamhelo hooking ehlo
xxx 13622 check_spamhelo hooking helo
xxx 13622 rcpt_ok hooking rcpt
xxx 13622 virus::pattern_filter hooking data_post
xxx 13622 tnef2mime hooking data_post
xxx 13622 virus::clamav hooking data_post
xxx 13622 queue::qmail_2dqueue hooking queue
xxx 13622 Plugin peers, hook set_hooks returned DECLINED,
xxx 13622 running plugin (connect): check_relay
xxx 13622 trying to get config for relayclients
xxx 13622 trying to get config for morerelayclients
xxx 13622 Plugin check_relay, hook connect returned DECLINED,
xxx 13622 running plugin (connect): check_norelay
xxx 13622 trying to get config for norelayclients
xxx 13622 Plugin check_norelay, hook connect returned DECLINED,
xxx 13622 trying to get config for smtpgreeting
xxx 13622 220 server.saxdalen.net ESMTP
xxx 13622 trying to get config for timeoutsmtpd
xxx 13622 trying to get config for timeout
xxx 13622 dispatching HELO me
xxx 13622 running plugin (helo): check_spamhelo
xxx 13622 trying to get config for badhelo
xxx 13622 Plugin check_spamhelo, hook helo returned DECLINED,
xxx 13622 trying to get config for me



D-LINK support refuses to accept that the NAS behaves badly, so I'll have to ask you gurus here if this possibly might be a problem within the SME-server?

The static IP set to the NAS is of course outside the dhcp-range...[/url]

Offline JonB

  • *
  • 351
  • +0/-0
SME refuses to take mail from specific host
« Reply #1 on: May 01, 2007, 02:15:37 PM »
Don't worry about the DECLINED you are looking for DENIED.

It's confusing but DECLINED is correct operation.

You have uploaded incomplete logs. There are more logs after

Code: [Select]
xxx 13622 trying to get config for me

Jon
...

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SME refuses to take mail from specific host
« Reply #2 on: May 01, 2007, 06:51:23 PM »
Sorry about that....

Here are the remaining lines:

(From a later attempt)

Code: [Select]

***  trying to get config for databytes
*** trying to get config for databytes
***  250-foo.net Hi backup.foo.net [192.168.0.201]
***  250-PIPELINING
***  250-8BITMIME
***  250 SIZE 15000000
***  dispatching AUTH LOGIN
14897 500 Unrecognized command
*** 4161 cleaning up after 14897


...I have no idea what this "Unrecognized command" is...

Offline JonB

  • *
  • 351
  • +0/-0
SME refuses to take mail from specific host
« Reply #3 on: May 02, 2007, 07:07:18 AM »
Your D-Link is using a command during the SMTP connection that the server doesn't recognise.

Jon
...

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SME refuses to take mail from specific host
« Reply #4 on: May 02, 2007, 08:49:34 AM »
Quote from: "JonB"
Your D-Link is using a command during the SMTP connection that the server doesn't recognise.

Jon


Yes, I realized that when I quoted the last lines from the log.

Funny, isn't it, often when you try to explain the situation for someone else you realize that you've already answered your own question... :?

I'll have to get back to Dlink support with this again, I guess :evil:

Thanks for taking your time, JonB!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
SME refuses to take mail from specific host
« Reply #5 on: May 02, 2007, 04:05:06 PM »
Quote from: "jumba"

Code: [Select]

***  trying to get config for databytes
*** trying to get config for databytes
***  250-foo.net Hi backup.foo.net [192.168.0.201]
***  250-PIPELINING
***  250-8BITMIME
***  250 SIZE 15000000
***  dispatching AUTH LOGIN
14897 500 Unrecognized command
*** 4161 cleaning up after 14897


...I have no idea what this "Unrecognized command" is...


"AUTH LOGIN".

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SME refuses to take mail from specific host
« Reply #6 on: May 02, 2007, 09:17:58 PM »
OK, so I finally tried to set the Dlink box to deliver the mail to the smtp server with "Login Method : Anonymous"

This time it fails on these last lines in the log:

Code: [Select]
2007-05-02 21:04:37.339186500 4254 Plugin check_basicheaders, hook data_post returned DENY, Mail with no Date header not accepted here
2007-05-02 21:04:37.339946500 4254 552 Mail with no Date header not accepted here


My final question here would be:

Is there ANY WAY to disable the check_basicheaders plugin for a single device (in this case the known IP-number of the dlink box)

...just curious!

Offline mmccarn

  • *
  • 2,656
  • +10/-0
SME refuses to take mail from specific host
« Reply #7 on: May 18, 2007, 02:27:01 PM »
Quote from: "jumba"
Is there ANY WAY to disable the check_basicheaders plugin for a single device


I describe how to create a customized version of 'check_basicheaders' that should pay attention to the qpsmtpd 'whitelisthosts' plugin in this post: http://forums.contribs.org/index.php?topic=34260.0.  (Here's a link to the entire topic: http://forums.contribs.org/index.php?topic=34260.0.  The second entry describes a method that should work for adding hosts to the qpsmtpd whitelisthosts file)

Most of this topic pre-dates 7.1.3 when qpsmtpd was reconfigured to support different configs for on-site and off-site clients, so the custom template location will be incorrect.

Of course, since 7.1.3 *does* support different configs for on-site and off-site clients, you can disable check_basicheaders for your local network as desribed in entry 11: http://forums.contribs.org/index.php?topic=34260.0 while leaving it intact for traffic arriving from off-site.

(sorry about all the links to the same topic...)

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SME refuses to take mail from specific host
« Reply #8 on: May 18, 2007, 07:23:14 PM »
mmccarn:

I am VERY happy to see your reply, - I followed the steps described in http://forums.contribs.org/index.php?topic=34260.0 and guess what?

It just worked...

Many many thanks!!!!!!!

//Lasse