Empty Messages with SpamSNAKE

Discussion in 'HOWTO-Related Questions' started by jshampur, Mar 6, 2009.

  1. jshampur

    jshampur New Member

    Hi,

    I went through the entire install process except for the PDF and image scanning parts of it. The entire system worked wonderfully for about three months, then last week some users started getting blank messages with the MailScanner signature and nothing else.

    Since I administer this box, and no one else has access, I know that nothing was modified by any carbon based life forms. Nothing was upgraded, no config changed - nothing.

    After some digging around, I changed one settings in /etc/MailScanner.conf from Lock Type = posix to Lock Type = flock - no luck.

    At the moment, the Scan Messages = No so that incoming mail is at least delivered.

    Oh, it is running on Ubuntu 8.0.4

    Any ideas?

    Thanks, Jay
     
    Last edited: Mar 6, 2009
  2. Rocky

    Rocky Member

    Hey,

    Thats a very weird problem you're having. You said it worked for 3 months and then started doing this?

    I've been running mine since this guide was posted, but never had any such development.

    Do you see the mails coming in through the mailwatch interface? Also, are there any errors in your mail.log while this problem is taking place? Post your mail.log, atleast the last section of it so that I can take a look. Also, post your main.cf and master.cf files.

    Thanks,

    Rocky
     
  3. jshampur

    jshampur New Member

    Hi,

    I could not see any errors in the log when it happened, and the relevant mailwatch log entry indicated that the message was the right size and was delivered.

    We have verified the following:

    - Not attachment specific - at various times attachments of every kind were stripped along with the content. The message sent a few minutes later was delivered fine.

    - Not recipient specific - different recipients of completely different messages reported the issue.

    - Not sender specific

    - Once I set the Scan Messages to No, the problems went away, but that defeats the whole purpose, no?

    Basically, I have not been able to establish a pattern.


    Here is my master.cf
    -------
    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - - - - smtpd
    #submission inet n - - - - smtpd
    # -o smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #628 inet n - - - - qmqpd
    pickup fifo n - - 60 1 pickup
    -o content_filter=
    -o receive_override_options=no_header_body_checks
    cleanup unix n - - - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - - 1000? 1 tlsmgr
    rewrite unix - - - - - trivial-rewrite
    bounce unix - - - - 0 bounce
    defer unix - - - - 0 bounce
    trace unix - - - - 0 bounce
    verify unix - - - - 1 verify
    flush unix n - - 1000? 0 flush
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - - - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - - - - smtp
    -o smtp_fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    retry unix - - - - - error
    discard unix - - - - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - - - - lmtp
    anvil unix - - - - 1 anvil
    scache unix - - - - 1 scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail unix - n n - - pipe
    flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp unix - n n - - pipe
    flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix - n n - 2 pipe
    flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman unix - n n - - pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}
    -------------

    Here is main.cf

    # 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 = $myhostname ESMTP $mail_name (SHC)
    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 = no

    # 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.

    myhostname = esafe2.sherbourne.on.ca
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = sherbourne.on.ca
    mydestination =
    relayhost =
    mynetworks = 127.0.0.0/8, 192.168.0.0/20, 192.168.10.0/24
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    message_size_limit = 10485760
    local_transport = error:No local mail delivery
    local_recipient_maps =
    virtual_alias_maps = hash:/etc/postfix/virtual
    relay_recipient_maps = hash:/etc/postfix/relay_recipients
    transport_maps = hash:/etc/postfix/transport
    relay_domains = hash:/etc/postfix/relay_domains
    smtpd_helo_required = yes
    # smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, reject_unknown_sender_domain
    smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining, reject_rbl_client zen.spamhaus.org
    smtpd_data_restrictions = reject_unauth_pipelining
    header_checks = regexp:/etc/postfix/header_checks
    disable_dns_lookups = yes
     
  4. Rocky

    Rocky Member

    Can you also share your mailscanner.conf file. I'd like to see if there are any misconfigurations.
     
  5. jshampur

    jshampur New Member

    Hi,

    I've attached the MailScanner.conf

    Thanks.
     

    Attached Files:

  6. Rocky

    Rocky Member

    Hey,

    Make sure the following line looks like the below in MailScanner.conf:

    "Quarantine Whole Messages As Queue Files = no"

    Thanks,

    Rocky
     
  7. jshampur

    jshampur New Member

    Yep, that is how I have it.

    Thanks.
     

Share This Page