The Perfect SpamSnake - Ubuntu 12.04 - No mail getting through from the outside

Discussion in 'HOWTO-Related Questions' started by Roderick1st, Feb 8, 2013.

  1. Roderick1st

    Roderick1st New Member

    *FIXED*

    Hi All,

    I have just completed putting together a spam snake using the software and how-to named The Perfect SpamSnake - Ubuntu Jeos 12.04 LTS Precise Pangolin, which is put together very nicely.

    However I can't seem to receive email from the outside world.

    If I telnet into the server from a machine inside the local network I am able to send an email to a user hosted on my exchange 2007 email server, but when I try from external sources I get an error. I also can't receive email from my googlemail account.

    I have attached a copy of the mail.log, however if you need more information I'll gladly post it.

    Thanks in advance,

    Rod.



    #####Telnet from outside local network#####

    220-ESMTP SpamSnake
    ehlo britishint.com
    250-spamsnake.______.co.uk
    250-SIZE 10485760
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    mail from :ravery@britishint.com
    250 2.1.0 Ok
    rcpt to: rod@manorfarmlusby.co.uk
    550 5.5.1 Protocol error


    #####Telnet from within local net#####

    220 ESMTP SpamSnake
    ehlo britishint.com
    250-spamsnake.______.co.uk
    250-PIPELINING
    250-SIZE 10485760
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    mail from: ravery@britishint.com
    250 2.1.0 Ok
    rcpt to: rod@manorfarmlusby.co.uk
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    subject: Test Message

    Hello
    .
    250 2.0.0 Ok: queued as 3E9FE5A98
     
    Last edited: Feb 8, 2013
  2. Roderick1st

    Roderick1st New Member

    OK ... a little sleep helps:

    I have found the issue to be with the line below in main.cf:

    smtpd_recipient_restrictions = reject_unauth_destination, permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, whitelist_policy, grey_policy, spf_policy, rbl_policy, permit



    spf_policy causes the following error:

    Feb 8 13:25:45 spamsnake postfix/smtpd[1051]: warning: connect to private/policy: No such file or directory
    Feb 8 13:25:46 spamsnake postfix/smtpd[1051]: warning: connect to private/policy: No such file or directory
    Feb 8 13:25:46 spamsnake postfix/smtpd[1051]: warning: problem talking to server private/policy: No such file or directory
    Feb 8 13:25:46 spamsnake postfix/smtpd[1051]: NOQUEUE: reject: RCPT from mail-ee0-f53.google.com[74.125.83.53]: 451 4.3.5 Server configuration problem; from=<r______@googlemail.com> to=<rod@______.co.uk> proto=ESMTP helo=<mail-ee0-f53.google.com>


    rbl_policy causes the following error:

    Feb 8 13:24:18 spamsnake postfix/smtpd[952]: connect from mail-ea0-f181.google.com[209.85.215.181]
    Feb 8 13:24:18 spamsnake postfix/smtpd[952]: warning: unknown smtpd restriction: "rbl_policy"
    Feb 8 13:24:18 spamsnake postfix/smtpd[952]: NOQUEUE: reject: RCPT from mail-ea0-f181.google.com[209.85.215.181]: 451 4.3.5 Server configuration error; from=<r______@googlemail.com> to=<rod@______.co.uk> proto=ESMTP helo=<mail-ea0-f181.google.com>


    If anyone can shed some light as to how to resolve these two issues I would be very grateful.

    Rod.
     
  3. Roderick1st

    Roderick1st New Member

    Right ... fixed the SPF problem using info on this link: https://help.ubuntu.com/community/Postfix/SPF

    Basically remove spf_policy and replace with
    Code:
    check_policy_service unix:private/policy-spf
    Leave all other settings as is regarding SPF

    I am assuming in my noobiness that this is doing the intended job.
     
  4. Roderick1st

    Roderick1st New Member

    ... and rbl issue is fixed...

    postfix did not like referencing made up rbl_policy instead added the following directly to smtpd_recipient_restrictions:

    reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net,

    so now line reads:
    Code:
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, whitelist_policy, grey_policy, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, check_policy_service unix:private/policy-spf, permit
    Thanks for letting me air my problems ;-)
     
    Last edited: Feb 8, 2013

Share This Page