The Perfect SpamSnake Ubuntu Natty with the latest packages

Discussion in 'Installation/Configuration' started by alleks, Aug 17, 2011.

  1. alleks

    alleks Member

    Debian add package to dpkg --list

    Ok, I have followed this tutorial : http://www.howtoforge.com/the-perfect-spamsnake-ubuntu-jeos-10.10-maverick-meerkat-p3 but on a ubuntu natty (11.04) version. I have installed the latest version of all the packages I could but now I am stuck installing baruwa_1.1.0-3~natty_all.deb and baruwa-doc_1.1.0-3~natty_all.deb because it says this:

    Code:
    Dependency is not satisfiable: mailscanner (>= 4.80.10)
    
    The thing is that I am running MailScanner 4.85 (the latest) but it isn't shown in the debian's installed packages list.

    So is there any1 to add that the mailscanner is installed and using x version?

    There is the command dpkg --list but where is the db that contains all those lines so I can add my own.
     
    Last edited: Aug 17, 2011
  2. Mark_NL

    Mark_NL Member

    If package A is depending on package B .. there's a big change you cannot install package A when you've installed package B from tarballs. Since the binaries and libraries are different as to which package A is compiled against.

    In windows they'll call it dll hell :)

    I suggest you install the debian package of mailscanner.
     
  3. alleks

    alleks Member

    The debian package provided is older then requested. It's 4.79.11-2.1 and baruwa 1.1.3 request >= 4.80.

    So as I asked, how can I do to just add a simple line where it identifies mailscanner as installed with the corresponding version.
     
  4. alleks

    alleks Member

    Ok I have fixed that error by extracting the .deb and removing where it said that it needed amavis x. But my problem is now that celeryd is not working so that means that baruwa is not working.

    Can somebody help me configuring The Perfect SpamSnake on Natty?
     
  5. Mark_NL

    Mark_NL Member

    If you're using packages from the same repository it WILL work and you won't have any dependency problems. If you start using custom build packages from websites, you can run into these problems .. From my experience i can tell you it's better to either run some older versions and use the repo for it, or go all out on tarballs (but that's a bitch to maintain if you're rushing into it).

    don't mind the older versions, since the security updates will also be done on the older builds in the repo.
     
  6. Rocky

    Rocky Member

    Add baruwa source via http://apt.baruwa.org/.

    Install python-django-celery python-importlib

    That will install all the depends for Baruwa, including celeryd.
     
    Last edited: Aug 20, 2011
  7. alleks

    alleks Member

    Ok it was easier than it looked to setup spamsnake on ubuntu natty but I do have some issues.

    This is my main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = MailGateway
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = /usr/share/doc/postfix
    
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    [I]myhostname = filter.domain.com[/I]
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    [I]myorigin = domain.com
    mydestination = filter.domain.com, localhost, localhost.localdomain[/I]
    relayhost =
    [I]mynetworks = 127.0.0.0/8, 82.123.0.0/24[/I]
    mailbox_size_limit = 0
    
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    message_size_limit = 10485760
    local_transport = error:No local mail delivery
    local_recipient_maps =
    relay_domains = mysql:/etc/postfix/mysql-relay_domains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-relay_recipients.cf
    transport_maps = mysql:/etc/postfix/mysql-transports.cf
    virtual_alias_maps = hash:/etc/postfix/virtual
    disable_vrfy_command = yes
    strict_rfc821_envelopes = no
    smtpd_delay_reject = yes
    smtpd_recipient_limit = 100
    smtpd_helo_required = yes
    smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, permit
    smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, permit
    smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, permit
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, look_ahead, whitelist_policy, grey_policy, rbl_policy, spf_policy, permit
    smtpd_data_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining
    smtpd_restriction_classes = spf_policy, rbl_policy, grey_policy, whitelist_policy, verify_recipient, look_ahead
    spf_policy = check_policy_service unix:private/policy
    rbl_policy = reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net
    grey_policy = check_policy_service unix:private/greyfix
    whitelist_policy = check_client_access mysql:/etc/postfix/mysql-global_whitelist.cf, check_sender_access mysql:/etc/postfix/mysql-global_whitelist.cf
    header_checks = regexp:/etc/postfix/header_checks
    
    verify_recipient = reject_unknown_recipient_domain, reject_unverified_recipient
    look_ahead = check_recipient_access hash:/etc/postfix/access
    unverified_recipient_reject_code = 550
    address_verify_map = btree:/var/lib/postfix/verify
    
    Now is when I learned that networks you establish in mynetworks are like a whitelist. So that means my other domain that uses these ips 82.123.54.1 / 82.123.54.2 / 82.123.79.5 they're not filtered, they are just allowed to send directly.

    the look_ahead = check_recipient_access hash:/etc/postfix/access it just checks to see if the destination user exists, right?

    Why when I send an email from outside the mynetworks it happens this:
    1. It receives it
    2. It filters it
    3. And it's saved as filter
    4. The destination user doesn't receive it
    5. The sender user gets it back with mail for domain.com loops back to myself
     
  8. Rocky

    Rocky Member

    Make mydestination blank, reload postfix and try it again.

    Yes, look_ahead checks to see if the user exists.
     
  9. alleks

    alleks Member

Share This Page