This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Possible Bug in SMTP relay

I have done a bit of experimenting with the SMTP relay and it would seem that the SMTP Recipient Verification option doesn't work quite as I would expect. I would have thought that it would query back to the inside SMTP server to determine if a valid address is being requested Then reject the message if the address was invalid, instead there is a long pause but no matter what address I enter it is eventually accepted.

Can anyone else reproduce this behaviour? 


This thread was automatically locked due to age.
Parents Reply Children
  • What mail server do you  have behind the astaro? Some mail servers do not actually do much with the SMTP VRFY command. My qmail server, for example does this:

    bash$ telnet mail 25
    Trying x.x.x.x...
    Connected to mail.
    Escape character is '^]'.
    220  ESMTP
    vrfy valid@domain.com
    252 send some mail, i'll try my best
    rset
    250 flushed
    vrfy blurb
    252 send some mail, i'll try my best

    Cheers,

    Karl 
  • I just sniffed the mail server with recipient verification turned on.  The firewall doesn't use the VRFY command, so even if your SMTP server doesn't use it, the verification should still work.  The following are the SMTP commands I saw:  

    Mail is being sent from mail.xyz.com to mail.abc.com


    Command: HELO mail.xyz.com
    Response: 250 mail.abc.com: Hello mail.xyz.com
    Command: MAIL FROM: <>
    Response: 250 <>: Sender ok
    Command: RCPT TO: user@abc.com
    Response: 250 user@abc.com: Recipient Ok
    Command: QUIT




    So, instead of using the VRFY command, the firewall tries to compose an e-mail message to the recipient, and as long as the SMTP server says that the recipient is OK (and the sender, as I'll explain later), then the e-mail will be sent to the SMTP server.

    So, if you are using some other SMTP relay after the firewall or if you SMTP server is configured to accept e-mail for all users at a domain, then Recipient Verification will be worthless because it accepts all mail for a particular domain.

    That does lead me to a new question:
    Is there a way to make the firewall use a valid e-mail address as the MAIL FROM address when performing this check?  My SMTP server is usually configured to deny e-mails with blank sender fields (MAIL FROM: <>), so this check fails and the e-mail is NOT delivered, even when it is sent to a valid user.  Perhaps use the original e-mail address submitted in the MAIL FROM: command received by the firewall, or the administrator e-mail of the firewall?   
  • VRFY is not used for the reason that not all mailers support it, as someone has already pointed out.

    You must configure your backend server to deny delivery to unknown users. If you have a catch-all account for unknown addresses, recipient verification cannot work (it won't do any harm, however).

     [ QUOTE ]
    My SMTP server is usually configured to deny e-mails with blank sender fields (MAIL FROM: <>), so this check fails and the e-mail is NOT delivered  

    [/ QUOTE ] 

    I hope you know what you are doing. You are not accepting bounce messages this way. Your users will never receive bounce messages (delivery failures), so they will never know if the messages they send have reached their recipients.
    You also break the SMTP delivery path, and will end up on blacklists like www.rfc-ignorant.org. Even worse, you and your users will never notice being blacklisted, since you never see the bounce messages  

    My strong advice would be: don't do this.

    /tom
     
  • Luckily for me it is my home e-mail server, so I don't have but a handful of users and if I did manage to get blacklisted I won't get fired for it. [:)]o read the RFC.

    Thanks for the info.  
  • Hmm,

    Some interesting issues there. I guess the first thing is that our internet mail server is not set to accept mail from anyone. It is Sendmail and if I enter an invalid address it returns with a "User unknown" error. So there still seems to be a bit of a problem somewhere.

    So I guess a question would be, does anyone have this feature working at all or is it simply a config issue somewhere for a few of us?

    As for not using the VRFY option to check the internal server, I understand wanting to be compatible but that may be causing more problems than it is solving as we are seeing. Just because some SMTP servers don't support VRFY (most notably Qmail which, although secure, IMHO should be considered broken for several reasons) should just mean those servers are not supported. It is my understanding that VRFY is considered a mandatory command for SMTP compatibility, and I can't think of a better example than this for it's use.

    Anyway that’s my rant for the day.
    Ted