From owner-freebsd-questions@FreeBSD.ORG Thu Apr 30 13:28:08 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 280BD7AF for ; Thu, 30 Apr 2015 13:28:08 +0000 (UTC) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::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 D2FA9195E for ; Thu, 30 Apr 2015 13:28:07 +0000 (UTC) Received: by qcbii10 with SMTP id ii10so28667795qcb.2 for ; Thu, 30 Apr 2015 06:28:07 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IfCSGwUvytZmfjWGC2LtivIO7G1DJlSygPKWqhM2FUw=; b=i12KQ07LOOW7SsOrEUsB/nvxI2jVTsLbu9jUTFhY9A6bFTzuW0tN6wE1oZN9yYrGJJ crlQbKK/3QaKKti/bgZC5Q5fIpDihgo5rKHFOcUKatV5kvUdLW7uejVak6+5v6mDDBRS UpwyGRBPjJR7hVfV0PJPqroNhsKiK8ZkaGNzCuiFBVGDBJB8LGF4cIFUd5z8yxyhkMKI 1VlveDhZwwCBz5LuAaY2F91lOFs/4h4yNK1IbtQS+YoJmZ6irq6Pv/Du3KbPDrnj9POT QBPp8mR2N+o1WUwV7bUsJfiI6u/CUIvZw8q6AOuEnCWtBYrkmc+6iDrwXV0fa9uVqVm1 Y18g== X-Received: by 10.140.231.210 with SMTP id b201mr4594966qhc.82.1430400486961; Thu, 30 Apr 2015 06:28:06 -0700 (PDT) Received: from [192.168.70.205] (50-200-12-74-static.hfc.comcastbusiness.net. [50.200.12.74]) by mx.google.com with ESMTPSA id r198sm16326162qha.2.2015.04.30.06.28.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 06:28:06 -0700 (PDT) Message-ID: <55422DE7.2010506@gmail.com> Date: Thu, 30 Apr 2015 08:28:07 -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: Ernie Luzar CC: freebsd-questions@freebsd.org Subject: Re: using pkg for postfix/spamassassin install References: <55416FEB.3020101@gmail.com> <55418DF3.4000102@gmail.com> <554211DC.8030502@gmail.com> In-Reply-To: <554211DC.8030502@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 13:28:08 -0000 On 4/30/2015 6:28 AM, Ernie Luzar wrote: > Noel wrote: >> 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 >>> >>> /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. >>> # >>> # >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >>> >>> # service type private unpriv chroot wakeup maxproc command + >>> args >>> # (yes) (yes) (no) (never) (100) >>> # >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >>> >>> smtp inet n - n - - smtpd >>> -o content_filter=3Dspamassassin >>> >>> #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=3Dpostfix/submission >>> # -o smtpd_tls_security_level=3Dencrypt >>> # -o smtpd_sasl_auth_enable=3Dyes >>> # -o smtpd_reject_unlisted_recipient=3Dno >>> # -o smtpd_client_restrictions=3D$mua_client_restrictions >>> # -o smtpd_helo_restrictions=3D$mua_helo_restrictions >>> # -o smtpd_sender_restrictions=3D$mua_sender_restrictions >>> # -o smtpd_recipient_restrictions=3D >>> # -o smtpd_relay_restrictions=3Dpermit_sasl_authenticated,reject >>> # -o milter_macro_daemon_name=3DORIGINATING >>> #smtps inet n - n - - smtpd >>> # -o syslog_name=3Dpostfix/smtps >>> # -o smtpd_tls_wrappermode=3Dyes >>> # -o smtpd_sasl_auth_enable=3Dyes >>> # -o smtpd_reject_unlisted_recipient=3Dno >>> # -o smtpd_client_restrictions=3D$mua_client_restrictions >>> # -o smtpd_helo_restrictions=3D$mua_helo_restrictions >>> # -o smtpd_sender_restrictions=3D$mua_sender_restrictions >>> # -o smtpd_recipient_restrictions=3D >>> # -o smtpd_relay_restrictions=3Dpermit_sasl_authenticated,reject >>> # -o milter_macro_daemon_name=3DORIGINATING >>> #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 - - =20 >>> 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=3D5 -o smtp_connect_timeout=3D5 >>> 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 >>> # >>> # >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> >>> # Interfaces to non-Postfix software. >>> # >>> spamassassin unix - n n - - pipe >>> user=3Dspamd argv=3D/usr/local/bin/spamc -f -e >>> /usr/sbin/sendmail -oi -f ${sender} ${recipient} >>> >>> >>> >>> /usr/local/etc/postfix/main.cf >>> biff =3D no >>> syslog_facility =3D local5 >>> disable_dns_lookups =3D yes >>> mailbox_size_limit =3D 100000000 >>> message_size_limit =3D 100000000 >>> ## 9999 value disables compatibility function >>> compatibility_level =3D 9999 >>> smtputf8_enable =3D 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 >>> >>> >>> > > > > You have the sendmail package installed, along with postfix.=20 > Remove > > or disable sendmail. > > > > What's happening is that sendmail submits mail via SMTP back to > > postfix, which causes a mail loop. > > > > sendmail is what comes with the basic freebsd install IE, no package. > sendmail is disabled in rc.conf so that is not the problem. > > Of course it's the problem. You're using the real sendmail(TM) sendmail command and it's causing a mailer loop. Your logs show the proof. If you were using postfix, it would log as pickup, not sendmail. I suppose you forgot to edit /etc/mail/mailer.conf to enable postfix. https://www.freebsd.org/doc/en/books/handbook/mail-changingmta.html -- Noel Jones