Code: Select all
This is the mail system at host mail.example.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<info@example.com>: Command died with status 1: "/usr/bin/spamc". Command
output: sendmail: Connection lost in middle of processing
---------- Forwarded message ----------
...
Without spamassassin installed, mailserver works as it should. I followed this guide from: https://janikarhunen.fi/tackle-spam-wit ... nd-postfix
/etc/postfix/master.cf
Code: Select all
#
# 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 - n - - smtpd
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 - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
-o smtpd_reject_unlisted_recipient=no
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
-o content_filter=spamassassin
#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. 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/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# 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/local/sbin/bsmtp -f $sender $nexthop $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}
spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
Code: Select all
# rpm -q centos-release
centos-release-7-6.1810.2.el7.centos.x86_64
Jun 26 23:33:05 ns326984 postfix/smtpd[1637]: connect from mail-vk1-f175.google.com[209.85.221.175]
Jun 26 23:33:06 ns326984 postfix/smtpd[1637]: 9583F420150F: client=mail-vk1-f175.google.com[209.85.221.175]
Jun 26 23:33:06 ns326984 postfix/cleanup[1647]: 9583F420150F: message-id=<CAJu5E59NTQvg+oSwQ4E3wzZQyjFJFrrivDw_qSsm9bvgSDDkkg@mail.gmail.com>
Jun 26 23:33:06 ns326984 postfix/qmgr[842]: 9583F420150F: from=<***HIDDEN***>, size=2689, nrcpt=1 (queue active)
Jun 26 23:33:06 ns326984 postfix/smtpd[1637]: disconnect from mail-vk1-f175.google.com[209.85.221.175]
Jun 26 23:33:06 ns326984 spamd[32078]: spamd: connection from localhost [::1]:56034 to port 783, fd 6
Jun 26 23:33:06 ns326984 spamd[32078]: spamd: setuid to spamd succeeded
Jun 26 23:33:06 ns326984 spamd[32078]: spamd: creating default_prefs: /var/log/spamassassin/.spamassassin/user_prefs
Jun 26 23:33:06 ns326984 spamd[32078]: config: cannot create user preferences file /var/log/spamassassin/.spamassassin/user_prefs: No such file or directory
Jun 26 23:33:06 ns326984 spamd[32078]: spamd: failed to create readable default_prefs: /var/log/spamassassin/.spamassassin/user_prefs
Jun 26 23:33:06 ns326984 spamd[32078]: spamd: processing message <CAJu5E59NTQvg+oSwQ4E3wzZQyjFJFrrivDw_qSsm9bvgSDDkkg@mail.gmail.com> for spamd:5001
Jun 26 23:33:17 ns326984 spamd[32078]: spamd: clean message (1.4/5.0) for spamd:5001 in 10.7 seconds, 2678 bytes.
Jun 26 23:33:17 ns326984 spamd[32078]: spamd: result: . 1 - DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE,SPF_PASS scantime=10.7,size=2678,user=spamd,uid=5001,required_score=5.0,rhost=localhost,raddr=::1,rport=56034,mid=<CAJu5E59NTQvg+oSwQ4E3wzZQyjFJFrrivDw_qSsm9bvgSDDkkg@mail.gmail.com>,autolearn=no autolearn_force=no
Jun 26 23:33:17 ns326984 spamd[32074]: prefork: child states: II
Jun 26 23:33:45 ns326984 dovecot: imap-login: Login: user=<***HIDDEN***>, method=PLAIN, rip=***HIDDEN***, lip=37.187.109.71, mpid=1668, TLS, session=<jfepzECMdIFav6c3>
Jun 26 23:34:22 ns326984 dovecot: imap(***HIDDEN***): Logged out in=468 out=3097
Jun 26 23:34:55 ns326984 dovecot: imap-login: Login: user=<***HIDDEN***>, method=PLAIN, rip=***HIDDEN***, lip=37.187.109.71, mpid=1744, TLS, session=<+U/W0ECMfYFav6c3>
Jun 26 23:35:27 ns326984 sSMTP[944]: Connection lost in middle of processing
Jun 26 23:35:27 ns326984 postfix/pipe[942]: 4A5C9420150E: to=<***HIDDEN***>, relay=spamassassin, delay=611, delays=0.23/0.08/0/611, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/bin/spamc". Command output: sendmail: Connection lost in middle of processing )
Jun 26 23:35:27 ns326984 postfix/cleanup[1803]: 885AE4201510: message-id=<20190626213527.885AE4201510@***HIDDEN***>
Jun 26 23:35:27 ns326984 postfix/bounce[1802]: 4A5C9420150E: sender non-delivery notification: 885AE4201510
Jun 26 23:35:27 ns326984 postfix/qmgr[842]: 885AE4201510: from=<>, size=4418, nrcpt=1 (queue active)
Jun 26 23:35:27 ns326984 postfix/qmgr[842]: 4A5C9420150E: removed
Jun 26 23:35:28 ns326984 postfix/smtp[1812]: 885AE4201510: to=<***HIDDEN***>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c08::1a]:25, delay=1, delays=0.19/0.12/0.41/0.29, dsn=2.0.0, status=sent (250 2.0.0 OK 1561584928 v3si2193660wme.155 - gsmtp)
Jun 26 23:35:28 ns326984 postfix/qmgr[842]: 885AE4201510: removed