From owner-freebsd-questions@FreeBSD.ORG Thu Apr 30 02:05:44 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08CC0BDA for ; Thu, 30 Apr 2015 02:05:44 +0000 (UTC) Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6FD618ED for ; Thu, 30 Apr 2015 02:05:43 +0000 (UTC) Received: by qku63 with SMTP id 63so25996994qku.3 for ; Wed, 29 Apr 2015 19:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ixOyl4OTvulxPzxoAfR9vQIx+gY/KTTWnmjTPtzPsJE=; b=kmuf5ppnEQTd7VxJWPBOPEipVgKxTYvZMDETXddr720Qy7Ok70Rjw6VbjeH0lVeVbn ZBaKnrtkO5IcsPGG3gwfIdWbhy/xCn5P3DIL5pkAKNaDotOsyNYgWJMGlsXDb/nkTO3Q T9yOWsW+H9/IAmvtmk+E2Q7ZezlMCaZK66fwf2mm7BVtjRGvV3UqpmLRMHTFNL2pDcm3 qO3cQjndzevZ1vsFRh8wQz76n7lCuoNYau9PQSiH2fSnWHXw8mZtRLxgEfbUEEWWGHjU nq+TKQHldDKuvApY7UQxTYEzGmP1vhcvn20mDqWjl3+6INqGfInNOT2sogfuYQggoHDu I0BQ== X-Received: by 10.55.15.129 with SMTP id 1mr3527655qkp.29.1430359542909; Wed, 29 Apr 2015 19:05:42 -0700 (PDT) Received: from [192.168.5.121] (adsl-98-87-130-252.bna.bellsouth.net. [98.87.130.252]) by mx.google.com with ESMTPSA id k71sm15628019qhc.42.2015.04.29.19.05.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 19:05:42 -0700 (PDT) Message-ID: <55418DF3.4000102@gmail.com> Date: Wed, 29 Apr 2015 21:05:39 -0500 From: Noel User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: using pkg for postfix/spamassassin install References: <55416FEB.3020101@gmail.com> In-Reply-To: <55416FEB.3020101@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 02:05:44 -0000 On 4/29/2015 6:57 PM, Ernie Luzar wrote: > Hello list. > > For many years been using postfix/qpopper for email service on my > lan with no problems. Now I want to add spamassassin in > preperation so I can also admin my public domain name on my own > computer instead of having my domain hoster do it for me. > > This is a list of my goals, > make email password required to send/receive email. > have email tagged with word "spam" in email subject line. > have spam email list all the spamassassin tests with scores in the > header so they can be seen. > don't have postfix duplicate any test that spamassassion is doing. > Use the pkg version of postfix & spamassassin. > Don't use any custom scripts > Can NOT be used as a relay email server by the public. > Auto-forward some old unused email address to a current email > address. > use port 5225 instead of port 25. > > > Now I have read many postfix spamassassin config howtos, but they > are all out dated, using previous versions of freebsd or old > versions of postfix and or spamassassin. And for sure none of them > talk about using the new pkg versions. I have based my config on > this howto http://www.freebsdonline.com/content/view/556/506/ > > When I run with the following config files I get this error over > and over again until I postfix stop. Any help would be greatly > appreciated. > > Apr 29 17:58:25 powerman sendmail[1915]: t3TLwPYV001915: > SYSERR(spamd): Too many hops 27 (25 max): from MAILER-DAEMON via > localhost, to bob@powerman.com > Apr 29 17:58:40 powerman sendmail[1941]: t3TLweS4001941: > SYSERR(spamd): Too many hops 27 (25 max): from MAILER-DAEMON via > localhost, to MAILER-DAEMON@powerman.com You have the sendmail package installed, along with postfix. Remove or disable sendmail. What's happening is that sendmail submits mail via SMTP back to postfix, which causes a mail loop. > > > /usr/local/etc/postfix/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" or > # on-line: http://www.postfix.org/master.5.html). > # > # Do not forget to execute "postfix reload" after editing this file. > # > # > ========================================================================== > # service type private unpriv chroot wakeup maxproc command + > args > # (yes) (yes) (no) (never) (100) > # > ========================================================================== > smtp inet n - n - - smtpd > -o content_filter=spamassassin > > #smtp inet n - n - 1 postscreen > #smtpd pass - - n - - smtpd > #dnsblog unix - - n - 0 dnsblog > #tlsproxy unix - - n - 0 tlsproxy > #submission inet n - n - - smtpd > # -o syslog_name=postfix/submission > # -o smtpd_tls_security_level=encrypt > # -o smtpd_sasl_auth_enable=yes > # -o smtpd_reject_unlisted_recipient=no > # -o smtpd_client_restrictions=$mua_client_restrictions > # -o smtpd_helo_restrictions=$mua_helo_restrictions > # -o smtpd_sender_restrictions=$mua_sender_restrictions > # -o smtpd_recipient_restrictions= > # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject > # -o milter_macro_daemon_name=ORIGINATING > #smtps inet n - n - - smtpd > # -o syslog_name=postfix/smtps > # -o smtpd_tls_wrappermode=yes > # -o smtpd_sasl_auth_enable=yes > # -o smtpd_reject_unlisted_recipient=no > # -o smtpd_client_restrictions=$mua_client_restrictions > # -o smtpd_helo_restrictions=$mua_helo_restrictions > # -o smtpd_sender_restrictions=$mua_sender_restrictions > # -o smtpd_recipient_restrictions= > # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject > # -o milter_macro_daemon_name=ORIGINATING > #628 inet n - n - - qmqpd > pickup unix n - n 60 1 pickup > cleanup unix n - n - 0 cleanup > qmgr unix n - n 300 1 qmgr > #qmgr unix n - n 300 1 oqmgr > tlsmgr unix - - n 1000? 1 tlsmgr > rewrite unix - - n - - > trivial-rewrite > bounce unix - - n - 0 bounce > defer unix - - n - 0 bounce > trace unix - - n - 0 bounce > verify unix - - n - 1 verify > flush unix n - n 1000? 0 flush > proxymap unix - - n - - proxymap > proxywrite unix - - n - 1 proxymap > smtp unix - - n - - smtp > relay unix - - n - - smtp > # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 > showq unix n - n - - showq > error unix - - n - - error > retry unix - - n - - error > discard unix - - n - - discard > local unix - n n - - local > virtual unix - n n - - virtual > lmtp unix - - n - - lmtp > anvil unix - - n - 1 anvil > scache unix - - n - 1 scache > # > # > ==================================================================== > # Interfaces to non-Postfix software. > # > spamassassin unix - n n - - pipe > user=spamd argv=/usr/local/bin/spamc -f -e > /usr/sbin/sendmail -oi -f ${sender} ${recipient} > > > > /usr/local/etc/postfix/main.cf > biff = no > syslog_facility = local5 > disable_dns_lookups = yes > mailbox_size_limit = 100000000 > message_size_limit = 100000000 > ## 9999 value disables compatibility function > compatibility_level = 9999 > smtputf8_enable = no > > > > > /usr/local/etc/mail/spamassassin/local.cf > # This is the right place to customize your installation of > SpamAssassin. > # > # See 'perldoc Mail::SpamAssassin::Conf' for details of what can be > # tweaked. > # > # Only a small subset of options are listed below > # > ########################################################################### > > > # Add *****SPAM***** to the Subject header of spam e-mails > # > rewrite_header Subject *****SPAM***** > > > # Save spam messages as a message/rfc822 MIME attachment instead of > # modifying the original message (0: off, 2: use text/plain > instead) > # > report_safe 1 > > > # Set which networks or hosts are considered 'trusted' by your mail > # server (i.e. not spammers) > # > # trusted_networks 212.17.35. > > > # Set file-locking method (flock is not safe over NFS, but is > faster) > # > # lock_method flock > > > # Set the threshold at which a message is considered spam > (default: 5.0) > # > # required_score 5.0 > > > # Use Bayesian classifier (default: 1) > # > # use_bayes 1 > > > # Bayesian classifier auto-learning (default: 1) > # > # bayes_auto_learn 1 > > > # Set headers which may provide inappropriate cues to the Bayesian > # classifier > # > # bayes_ignore_header X-Bogosity > # bayes_ignore_header X-Spam-Flag > # bayes_ignore_header X-Spam-Status > > > # Some shortcircuiting, if the plugin is enabled > # > ifplugin Mail::SpamAssassin::Plugin::Shortcircuit > # > # default: strongly-whitelisted mails are *really* whitelisted > now, if the > # shortcircuiting plugin is active, causing early exit to save > CPU load. > # Uncomment to turn this on > # > # shortcircuit USER_IN_WHITELIST on > # shortcircuit USER_IN_DEF_WHITELIST on > # shortcircuit USER_IN_ALL_SPAM_TO on > # shortcircuit SUBJECT_IN_WHITELIST on > > # the opposite; blacklisted mails can also save CPU > # > # shortcircuit USER_IN_BLACKLIST on > # shortcircuit USER_IN_BLACKLIST_TO on > # shortcircuit SUBJECT_IN_BLACKLIST on > > # if you have taken the time to correctly specify your > "trusted_networks", > # this is another good way to save CPU > # > # shortcircuit ALL_TRUSTED on > > # and a well-trained bayes DB can save running rules, too > # > # shortcircuit BAYES_99 spam > # shortcircuit BAYES_00 ham > > endif # Mail::SpamAssassin::Plugin::Shortcircuit > > > > > > > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"