Relay problems when testing the Perfect SpamSnake

Discussion in 'HOWTO-Related Questions' started by dboltz, Oct 31, 2008.

  1. dboltz

    dboltz New Member

    I’ve followed the perfect SpamSnake tutorial to build a new MX server. Thanks for this BTW.
    Everything seemed to go good but now I’m trying to test the system before I change the network information to take over our existing MX and I'm having problems. When I telnet to port 25 using the FQDN I end up getting a 554 Relay denied error. If I’m on the system and telnet localhost 25 I don’t get this error and the email will go through to my internal server. In that case, MailWatch doesn't log anything. Can someone please provide some information on why this might be happening?

  2. falko

    falko Super Moderator ISPConfig Developer

    You must authenticate on the server if you're not using localhost.
  3. dboltz

    dboltz New Member

    Thanks for the reply.
    So is there a way to test this using telnet? I've tried the ehlo but I still end up getting relay denied. I've alos tried the AUTH PLAIN but it returns with
    503 5.5.1 Error: authentication not enabled
  4. Rocky

    Rocky Member


    If you're logged in as root on your spamsnake, what happens when you try to do a telnet localhost 25?

  5. dboltz

    dboltz New Member

    If I use localhost then I can run through the whole procedure and the mail is passed on to my domino server and delivered to my mailbox. I've done this with helo and ehlo with both working on localhost 25.
    My mailwatch isn't loging these transactions but I'm not worried about this right now. Could be permissions or something.

    Dave B.
  6. dboltz

    dboltz New Member

    Maybe my config can help someone see something....
    postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    local_recipient_maps =
    local_transport = error:No local mail delivery
    mailbox_size_limit = 0
    message_size_limit = 10485760
    mydestination =
    mydomain =
    myhostname =
    mynetworks =
    myorigin =
    readme_directory = no
    recipient_delimiter = +
    relay_domains = hash:/etc/postfix/relay_domains
    relay_recipient_maps = hash:/etc/postfix/relay_recipients
    relayhost =
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_data_restrictions = reject_unauth_pipelining
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = reject_non_fqdn_sender reject_unknown_sender_domain reject_non_fqdn_recipient reject_unknown_recipient_domain permit_mynetworks reject_unauth_pipelining reject_invalid_helo_hostname reject_non_fqdn_helo_hostname reject_rbl_client reject_unauth_destination
    smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, reject_non_fqdn_sender, reject_unknown_sender_domain
    smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    transport_maps = hash:/etc/postfix/transport
    virtual_alias_maps = hash:/etc/postfix/virtual

    And here is a telnet session result
    220 ESMTP Postfix (Ubuntu)
    250-SIZE 10485760
    250 DSN
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    554 5.7.1 <[email protected]>: Relay access denied
    221 2.0.0 Bye

    Here is one using localhost

    Connected to localhost.localdomain.
    Escape character is '^]'.
    220 ESMTP Postfix (Ubuntu)
    250-SIZE 10485760
    250 DSN
    mail from: [email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    354 End data with <CR><LF>.<CR><LF>
    subject: test message

    250 2.0.0 Ok: queued as 2405C37A573

    Any ideas?
  7. dboltz

    dboltz New Member


    I had a typo in my relay_domains. I had looked at a few times but I guess I saw what I wanted to see.

  8. Rocky

    Rocky Member

    Great new. I knew it was something simple.

    Good luck and I hope the SpamSnake is everything you want it to be.


Share This Page