Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
2361
views
The mail system : user unknown Action: failed Status: 5.1.1 Diagnostic-Code: x-unix; user unknown
I have a mail system from Postfix, Dovecot, Amavis, Spamassin on a Debian Jessie 8.5. Imap and pop3 work fine. Smtp port 465 over ssl sends fine, delivery is okay, but port 25 and 587 got the error "undelivery user unknown for all local recipient and internet mailboxes". My master.cf is: dovecot uni...
I have a mail system from Postfix, Dovecot, Amavis, Spamassin on a Debian Jessie 8.5.
Imap and pop3 work fine. Smtp port 465 over ssl sends fine, delivery is okay, but port 25 and 587 got the error "undelivery user unknown for all local recipient and internet mailboxes".
My master.cf is:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
#
# 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
-o content_filter=spamassassin
# -o smtpd_tls_security_level=none
-o smtpd_tls_security_level=may
-o smtpd_sasl_auth_enable=yes
# -o smtpd_sasl_auth_enable=no
#spamassassin unix - n n - - pipe
# user=spamd argv=/usr/bin/spamc -f -e
# /usr/sbin/sendmail -oi -f ${sender} ${recipient}
spamassassin unix - n n - - pipe
flags=DROhu user=vmail:vmail argv=/usr/bin/spamc -f -e
/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
#smtp inet n - - - 1 postscreen
#smtpd pass - - - - - smtpd
#dnsblog unix - - - - 0 dnsblog
#tlsproxy unix - - - - 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_client_restrictions=permit_sasl_authenticated,permit_mynetworks,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_client_restrictions=permit_sasl_authenticated,permit_mynetworks,reject
-o smtpd_helo_restrictions=permit_mynetworks,reject_invalid_hostname,permit
-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
#-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 - 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 - - n - - smtp
relay unix - - n - - smtp
# -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}
#dovecot unix - n n - - pipe
#flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient} -e
#dovecot unix - n n - - pipe
#flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient} -e
#
# ====================================================================
#
# 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
#virtual_transport = lmtp:unix:private/dovecot-lmtp
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/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/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}
#smtp-amavis unix - - - - 2 smtp
#-o smtp_data_done_timeout=1200
#-o smtp_send_xforward_command=yes
#-o disable_dns_lookups=yes
#-o max_use=20
#amavis unix - - - - 2 smtp
# -o smtp_data_done_timeout=1200
# -o smtp_send_xforward_command=yes
#127.0.0.1:10025 inet n - - - - smtpd
#-o content_filter=
#-o local_recipient_maps=
#-o relay_recipient_maps=
#-o smtpd_restriction_classes=
#-o smtpd_client_restrictions=
#-o smtpd_helo_restrictions=
#-o smtpd_sender_restrictions=
#-o smtpd_recipient_restrictions=permit_mynetworks,reject
#-o mynetworks=127.0.0.0/8
#-o strict_rfc821_envelopes=yes
#-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
#-o smtpd_bind_address=127.0.0.1
#-o content_filter=
#-o local_recipient_maps=
#-o relay_recipient_maps=
#-o smtpd_restriction_classes=
#-o smtpd_delay_reject=no
#-o smtpd_client_restrictions=permit_mynetworks,reject
#-o smtpd_helo_restrictions=
#-o smtpd_sender_restrictions=
#-o smtpd_recipient_restrictions=permit_mynetworks,reject
#-o smtpd_data_restrictions=reject_unauth_pipelining
#-o smtpd_end_of_data_restrictions=
#-o mynetworks=127.0.0.0/8
#-o smtpd_error_sleep_time=0
#-o smtpd_soft_error_limit=1001
#-o smtpd_hard_error_limit=1000
#-o smtpd_client_connection_count_limit=0
#-o smtpd_client_connection_rate_limit=0
#-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
smtp-amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
-o smtpd_helo_restrictions=permit_mynetworks,reject_invalid_hostname,permit
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
policy-spf unix - n n - - spawn
user=nobody argv=/usr/sbin/postfix-policyd-spf-perl
vacation unix - n n - - pipe
flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} ${recipient}
main.cf
#/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 (Debian)
biff = no
#nn appending .domain is the MUA's job.
append_dot_mydomain = no
milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mail.exapmle.net
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
virtual_mailbox_base = /mail/
mailbox_command = /usr/libexec/dovecot/deliver
mydestination = localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 600000000000
message_size_limit = 51200000
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
#net_protocols = all
virtual_minimum_uid = 7030
virtual_uid_maps = static:7030
virtual_gid_maps = static:7030
#relay_recipient_maps =
# mysql:/etc/postfix/mysql_virtual_alias_maps.cf,
# mysql:/etc/postfix/mysql_virtual_alias_domain_maps.cf,
# mysql:/etc/postfix/mysql_virtual_alias_domain_catchall_maps.cf
virtual_alias_maps =
mysql:/etc/postfix/mysql_virtual_alias_maps.cf,
mysql:/etc/postfix/mysql_virtual_alias_domain_maps.cf,
# mysql:/etc/postfix/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_domains =
mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps =
mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf,
mysql:/etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf
#irtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
#irtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
#irtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
#irtual_alias_domains = mysql:/etc/postfix/mysql_virtual_alias_domains_maps.cf
#virtual_transport = virtual
#local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
virtual_transport = dovecot
transport_maps = hash:/etc/postfix/transport
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = #$myhostname
#smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
#smtpd_sasl_security_options = noplaintext
#smtpd_sasl_path = /var/spool/postfix/private/auth
# check_policy_service unix:private/policy is for spf filter
smtpd_recipient_restrictions =
permit_mynetworks,
check_client_access hash:/etc/postfix/client_checks,
check_sender_access hash:/etc/postfix/sender_checks,
permit_sasl_authenticated,
reject_unauth_pipelining,
reject_unauth_destination,
check_policy_service unix:private/policy-spf,
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
# reject_non_fqdn_hostname,
# reject_non_fqdn_sender,
# reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client blackholes.easynet.nl,
reject_rbl_client dnsbl.njabl.org,
# reject_rbl_client bl.spamcop.net,
# reject_rbl_client sbl-xbl.spamhaus.org,
# reject_rbl_client multi.uribl.com,
# reject_rbl_client dsn.rfc-ignorant.org,
# reject_rbl_client dul.dnsbl.sorbs.net,
# reject_rbl_client list.dsbl.org,
# reject_rbl_client dnsbl.sorbs.net,
# reject_rbl_client cbl.abuseat.org,
# reject_rbl_client ix.dnsbl.manitu.net,
# reject_rbl_client combined.rbl.msrbl.net,
# reject_rbl_client rabl.nuclearelephant.com,
# reject_rbl_client dnsbl.sorbs.net,
# reject_rbl_client bad.psky.me,
# reject_rbl_client b.barracudacentral.org,
# reject_rbl_client truncate.gbudb.net,
# reject_rbl_client dnsbl-1.uceprotect.net,
# reject_rbl_client sbl.spamhaus.org,
# reject_rbl_client zen.spamhaus.org,
permit
#smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_invalid_hostname,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_rbl_client sbl-xbl.spamhaus.org
content_filter = smtp-amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
smtpd_tls_cert_file=/etc/ssl/certs/mail.pem
smtpd_tls_key_file=/etc/ssl/private/mail.key
smtpd_use_tls=yes
smtpd_tls_auth_only = no
smtpd_tls_mandatory_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA,3DES, MD5, DES+MD5
smtp_tls_mandatory_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA,3DES, MD5, DES+MD5
smtpd_tls_dh1024_param_file = /etc/ssl/private/dhparams.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
#smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
smtpd_sasl_security_options = noanonymous
#smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated
broken_sasl_auth_clients = yes
smtp_use_tls = yes
default_process_limit = 500
smtp_destination_recipient_limit = 1024
#policy_time_limit = 3600myorigin = /etc/mailname
#local_transport = local
#local_transport = virtual
#dovecot_destination_concurrency_limit = 2
#dovecot_destination_recipient_limit = 1
#content_filter = smtp-amavis:[127.0.0.1]:10024
policy-spf_time_limit = 3600
strict_rfc821_envelopes = yes
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_client_restrictions =
smtpd_helo_restrictions =
check_client_access hash:/etc/postfix/rbl_override,
permit_mynetworks,
# reject_non_fqdn_hostname,
# reject_invalid_hostname,
permit
smtpd_sender_restrictions =
check_client_access hash:/etc/postfix/rbl_override,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
smtpd_tls_security_level = may
smtp_tls_security_level = may
#smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
#smtpd_sasl_security_options = noplaintext
#smtpd_tls_auth_only = no
spamassassin_destination_recipient_limit = 1
vacation_destination_recipient_limit = 1
dovecot_destination_recipient_limit = 1
#smtpd_tls_loglevel = 3
#debug_peer_level = 5
#debug_peer_list = 127.0.0.1
#ebug_peer_level = 5
Error mesege:
is is the mail system at host mail.domain
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
: user unknown
Reporting-MTA: dns; mail.bookaa.net
X-Postfix-Queue-ID: B6D5FA0599
X-Postfix-Sender: rfc822; me@domain.com
Arrival-Date: Thu, 24 Nov 2016 14:40:43 +0100 (CET)
Final-Recipient: rfc822; user@domain
Original-Recipient: rfc822;user@domain
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; user unknown
The log file:
> Nov 24 14:40:44 mail postfix/qmgr: B6D5FA0599:
> from=, size=1137, nrcpt=1 (queue active) Nov 24 14:40:44
> mail postfix/smtpd: disconnect from mail.domail[IP SERVER] Nov
> 24 14:40:44 mail postfix/pipe: B6D5FA0599: to=,
> relay=spamassassin, delay=0.54, delays=0.37/0/0/0.17, dsn=5.1.1,
> status=bounced (user unknown) Nov 24 14:40:44 mail
> postfix/cleanup: 2C4A1A05DE:
> message-id= Nov 24 14:40:44
> mail postfix/bounce: B6D5FA0599: sender non-delivery
> notification: 2C4A1A05DE Nov 24 14:40:44 mail postfix/qmgr:
> 2C4A1A05DE: from=, size=3257, nrcpt=1 (queue active) Nov 24 14:40:44
> mail postfix/qmgr: B6D5FA0599: removed Nov 24 14:40:44 mail
> postfix/pipe: 2C4A1A05DE: to=, relay=dovecot,
> delay=0.23, delays=0/0/0/0.22, dsn=2.0.0, status=sent (delivered via
> dovecot service) Nov 24 14:40:44 mail postfix/qmgr: 2C4A1A05DE:
> removed
oxyOsky
(47 rep)
Nov 23, 2016, 12:05 PM
• Last activity: Apr 16, 2021, 09:59 PM
0
votes
2
answers
367
views
Why is Amavis giving a Retry limit exceeded / File exists error on startup?
I noticed my mail server was getting some `service temporarily unavailable` errors and wasn't able to deliver emails, so after digging into it I found the cause was Postfix was unable to connect to Amavis. When I looked at Amavis' logging (which I found in `/var/log/mail.warn`), I found this: ``` [s...
I noticed my mail server was getting some
service temporarily unavailable
errors and wasn't able to deliver emails, so after digging into it I found the cause was Postfix was unable to connect to Amavis.
When I looked at Amavis' logging (which I found in /var/log/mail.warn
), I found this:
[snip] (!!)TROUBLE in pre_loop_hook: db_init: BDB no dbS: BDB0002 __fop_file_setup: Retry limit (100) exceeded, File exists. at (eval 91) line 318.
[snip] (!)_DIE: Suicide () TROUBLE in pre_loop_hook: db_init: BDB no dbS: BDB0002 __fop_file_setup: Retry limit (100) exceeded, File exists. at (eval 91) line 318.
Why is this happening, and how can I fix it?
I'm running Debian, and I believe I had both updated packages and rebooted shortly before this started happening, so maybe an update broke something.
Scott Weldon
(113 rep)
Jul 7, 2020, 07:47 PM
• Last activity: Mar 22, 2021, 01:12 PM
1
votes
0
answers
185
views
How can I add 'email scanned for viruses' to the emails
I have a small, Opensuse-based computer for my family, which includes GUI, Postfix, amavis, clamd & spamassassin. I noticed that Amavis adds a line among the hidden headers: X-Virus-Scanned: amavisd-new at mycomputer.mydomain.pl Now, I also noticed that some of the incoming emails have similar messa...
I have a small, Opensuse-based computer for my family, which includes GUI, Postfix, amavis, clamd & spamassassin. I noticed that Amavis adds a line among the hidden headers:
X-Virus-Scanned: amavisd-new at mycomputer.mydomain.pl
Now, I also noticed that some of the incoming emails have similar messages also in the body text, visible to the reader, after the sender's signature.
How can I set up my system to add a similar notification in the body text as well?
Jasio
(634 rep)
Feb 16, 2020, 04:49 PM
2
votes
1
answers
397
views
SELinux is blocking connections from Amavis back into itself: no way in/out?
Running a fresh CentOS8 install here, MTA is Postfix with Amavis hooked in. I want to have Amavis inject messages from ORIGINATING (incoming submissions from port 587/Postfix through 10026/Amavis) back into Amavis (port 10024) after (internal) DKIM signing. But port 10024 has already been assigned f...
Running a fresh CentOS8 install here, MTA is Postfix with Amavis hooked in. I want to have Amavis inject messages from ORIGINATING (incoming submissions from port 587/Postfix through 10026/Amavis) back into Amavis (port 10024) after (internal) DKIM signing. But port 10024 has already been assigned for listening for incoming smtp connections from 25/Postfix, so I cannot add it as a sending-to port in the SELinux configuration.
The messages flow:
- 25/smtp -> Postfix -> smtp-amavis/10024
- 10024 -> Amavis: scan -> 10025
- 10025 -> Postfix -> delivery
- 587/submission -> Postfix -> smtp-amavis/10026
- 10026 -> Amavis ORIGINATING: scan & DKIM sign -> smtp-amavis/10024
The problem I run into is that SELinux does not allow me to feed messages from the last flow back into smtp-amavis at port 10024 (Amavis to Amavis) because this port has already been assigned for receiving:
[root@services amavisd]# semanage port -l | grep 1002
amavisd_recv_port_t tcp 10026, 10024
amavisd_send_port_t tcp 10027, 10025
spamd_port_t tcp 783, 10026, 10027
Interestingly, SELinux did not complain about ports 10026, 10027 already being assigned to spamd when I added then to amavisd_recv_port_t and amavisd_send_port_t respectively:
[root@services amavisd]# semanage port -lC
SELinux Port Type Proto Port Number
amavisd_recv_port_t tcp 10026
amavisd_send_port_t tcp 10027
How can I fix this? as SELinux does not allow me to add 10024 as a sending port too:
[root@services amavisd]# semanage port -a -t amavisd_send_port_t -p tcp 10024
ValueError: Port tcp/10024 already defined
**Or am I going completely the wrong way with this**, and should submitted messages not be fed back into Amavis through port 10024 at all (which makes this an Amavis rather than an SELinux question)? For originally the Amavis configuration forwarded submitted messages to port 10027 for (external) DKIM signing by OpenDKIM, as you can see here:
# forward to a smtpd service providing DKIM signing service
#forward_method => 'smtp:[127.0.0.1]:10027',
forward_method => 'smtp:[127.0.0.1]:10024',
So the last flow originally was:
- 10026 -> Amavis ORIGINATING: scan -> OpenDKIM@10027: sign -> delivery
But OpenDKIM is not (yet) available for CentOS8 (used to be via the EPEL repo), and Amavis now supports an internal DKIM signing service that I'm trying to use.
So there are two ways out I see:
- configure SELinux so that it can feed DKIM-signed messages from the submission flow back into the basic smtp flow
(assuming that this somewhat loopy set-up works)
- keep the original Amavis configuration, which means that there will have to be a service behind port 10027 that delivers outgoing (i.e. submitted) messages
Which way to go, and how to do it?
Adrian
(21 rep)
Jan 1, 2020, 08:20 PM
• Last activity: Jan 2, 2020, 11:49 AM
0
votes
1
answers
259
views
amavisd: Unrecognized character \xBB;
I have a problem to start the amavisd. When I try to start with `/etc/init.d/amavis start` I get the following error: `Starting amavisd: Problem in Amavis::DKIM code: Unrecognized character \xBB; marked by <-- HERE after <-- HERE near column 1 at /usr/lib/perl5/Net/DNS/RR/Unknown.pm line 1. Compilat...
I have a problem to start the amavisd. When I try to start with
/etc/init.d/amavis start
I get the following error:
`Starting amavisd: Problem in Amavis::DKIM code: Unrecognized character \xBB; marked by <-- HERE after <-- HERE near column 1 at /usr/lib/perl5/Net/DNS/RR/Unknown.pm line 1.
Compilation failed in require at /usr/lib/perl5/Net/DNS/RR.pm line 15.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS/RR.pm line 15.
Compilation failed in require at /usr/lib/perl5/Net/DNS/Packet.pm line 16.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS/Packet.pm line 16.
Compilation failed in require at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 25.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS/Resolver/Base.pm line 25.
Compilation failed in require at /usr/lib/perl5/Net/DNS/Resolver/UNIX.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS/Resolver/UNIX.pm line 9.
Compilation failed in require at /usr/lib/perl5/Net/DNS/Resolver.pm line 19.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS/Resolver.pm line 22.
Compilation failed in require at /usr/lib/perl5/Net/DNS.pm line 91.
BEGIN failed--compilation aborted at /usr/lib/perl5/Net/DNS.pm line 91.
Compilation failed in require at /usr/share/perl5/Mail/DKIM/DNS.pm line 14.
BEGIN failed--compilation aborted at /usr/share/perl5/Mail/DKIM/DNS.pm line 14.
Compilation failed in require at /usr/share/perl5/Mail/DKIM/PublicKey.pm line 18.
BEGIN failed--compilation aborted at /usr/share/perl5/Mail/DKIM/PublicKey.pm line 18.
Compilation failed in require at /usr/share/perl5/Mail/DKIM/Signature.pm line 13.
BEGIN failed--compilation aborted at /usr/share/perl5/Mail/DKIM/Signature.pm line 13.
Compilation failed in require at /usr/share/perl5/Mail/DKIM/Verifier.pm line 13.
BEGIN failed--compilation aborted at /usr/share/perl5/Mail/DKIM/Verifier.pm line 13.
Compilation failed in require at (eval 95) line 47.
BEGIN failed--compilation aborted at (eval 95) line 47.
(failed).
`
I think there is somthing like a BOM in any File. But where can I find it? I tryed to find the error with searching for the \xBB
but no success.
Phil
(1 rep)
Jan 13, 2015, 08:15 AM
• Last activity: Mar 10, 2019, 04:22 AM
0
votes
1
answers
722
views
How to automatically move mails to SPAM or JUNK folder instead of removing them?
I have problem with amavis-new. amavis-new removes an e-mails tagged as SPAM are removed instead of leave them tagged by SpamAssassin. Here's /var/log/mail.log: Jul 20 20:04:09 cloud-vps opendmarc[9520]: D6A8940030: mail.com none Jul 20 20:04:09 cloud-vps postfix/qmgr[1347]: D6A8940030: from= , size...
I have problem with amavis-new. amavis-new removes an e-mails tagged as
SPAM are removed instead of leave them tagged by SpamAssassin. Here's
/var/log/mail.log:
Jul 20 20:04:09 cloud-vps opendmarc: D6A8940030: mail.com none
Jul 20 20:04:09 cloud-vps postfix/qmgr: D6A8940030: from=, size=6018, nrcpt=1 (queue active)
Jul 20 20:04:09 cloud-vps postfix/smtpd: disconnect from mout.gmx.com[74.208.4.201] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Jul 20 20:04:19 cloud-vps amavis: (27212-02) Blocked SPAM {NoBounceOpenRelay,Quarantined}, [74.208.4.201]:56671 [80.82.28.18] -> , quarantine: B/spam-Btuzpnjs5cte.gz, Queue-ID: D6A8940030, Message-ID: , mail_id: Btuzpnjs5cte, Hits: 1000, size: 6082, 9557 ms
Jul 20 20:04:19 cloud-vps postfix/smtp: D6A8940030: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=1.2/0.03/0.54/9.3, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=27212-02, DISCARD(bounce.suppressed))
Jul 20 20:04:19 cloud-vps postfix/qmgr: D6A8940030: removed
Have anyone ideas how to prevent removing them by amavis-new? I want to
automatically move these mails to SPAM or JUNK folder instead of
removing them.
user227030
Jul 20, 2018, 06:33 PM
• Last activity: Jul 20, 2018, 08:54 PM
1
votes
0
answers
955
views
I want to blacklist mail in amavisd-new from a domain where sender addresses are utf8 encoded
In amavisd.conf I have read_hash(\%blacklist_sender,'/etc/amavis/blacklist'); @blacklist_sender_maps = (\%blacklist_sender);` In the blacklist file I have `@example.com` (not the real domain) However the sender address is always utf8 encoded so does not match the blacklist. How can I blacklist this...
In amavisd.conf I have
read_hash(\%blacklist_sender,'/etc/amavis/blacklist');
@blacklist_sender_maps = (\%blacklist_sender);`
In the blacklist file I have
@example.com
(not the real domain)
However the sender address is always utf8 encoded so does not match the blacklist. How can I blacklist this domain?
user250650
(111 rep)
Sep 11, 2017, 03:12 PM
• Last activity: Sep 11, 2017, 03:55 PM
0
votes
1
answers
113
views
amavis: [virus_name_to_spam_score] is empty when using certain clam database
I have a weird behavior regarding virus_name_to_spam_score. I’m using 2 custom Clamav DB. Here are the logs when using SaneSecurity where we can see that everything is working fine: Jun 12 10:57:53 prd-mail-1 amavis[4428]: (04428-01) run_av (ClamAV-clamd) result: /var/lib/amavis/tmp/amavis-20170612T...
I have a weird behavior regarding virus_name_to_spam_score. I’m using 2 custom Clamav DB. Here are the logs when using SaneSecurity where we can see that everything is working fine:
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) run_av (ClamAV-clamd) result: /var/lib/amavis/tmp/amavis-20170612T105753-04428-qozS1fmk/parts/p004: Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL FOUND\n
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) run_av (ClamAV-clamd): /var/lib/amavis/tmp/amavis-20170612T105753-04428-qozS1fmk/parts INFECTED: Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) lookup_re("Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL") matches key "(?^:^Sanesecurity\\.TestSig_)", result=undef
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) lookup [virus_name_to_spam_score] => undef, "Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL" does not match
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) virus_scan: (Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL), detected by 1 scanners: ClamAV-clamd
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) lookup_re("Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL") matches key "(?^:.*)", result="1"
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) lookup [viruses_that_fake_sender] => true, "Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL" matches, result="1", matching_key="(?^:.*)"
Jun 12 10:57:53 prd-mail-1 amavis: (04428-01) Virus Sanesecurity.TestSig_Type4_Hdr.2.UNOFFICIAL matches (?^:.*), sender addr ignored
Now when using SecurityInfo.com I can see that the first run the virus is detected but then the virus_name_to_spam_score is empty. What I’m trying to do is use @virus_name_to_spam_score_maps to set the emails coming from this list be marked as spam but since the check is empty unfed is returned and they are always marked as viruses. Here are the logs:
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) prolong_timer run_av_3: timer 288, was 288, deadline in 479.8 s
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) run_av (ClamAV-clamd) result: /var/lib/amavis/tmp/amavis-20170612T092354-18890-TNOnpS50/parts/p013: SecuriteInfo.com.Spam-4703.UNOFFICIAL FOUND\n/var/lib/amavis/tmp/amavis-20170612T092354-18890-TNOnpS50/parts/p009: SecuriteInfo.com.Spam-4703.UNOFFICIAL FOUND\n
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) run_av (ClamAV-clamd): /var/lib/amavis/tmp/amavis-20170612T092354-18890-TNOnpS50/parts INFECTED:
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) lookup_re(""), no matches
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) lookup [virus_name_to_spam_score] => undef, "" does not match
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) virus_scan: (), detected by 1 scanners: ClamAV-clamd
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) lookup_re("") matches key "(?^:.*)", result="1"
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) lookup [viruses_that_fake_sender] => true, "" matches, result="1", matching_key="(?^:.*)"
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) Virus matches (?^:.*), sender addr ignored
Jun 12 09:25:32 prd-mail-1 amavis: (18890-02) lookup_sql_field(virus_lover) rec=0, "email@domain.com" result: undef
Any idea what might cause this ?
ca_maer
(1 rep)
Jun 14, 2017, 03:54 PM
• Last activity: Jun 20, 2017, 07:26 PM
1
votes
0
answers
145
views
Spamassassin spam score and block configuration?
I've searched in the community and Google for this topic. There hasn't been a precise answer. I wanted to see the spam scores in the mail.log or syslog for Spamassassin running on my Linux server. It used to. I've looked at files in both /etc/amavis and /etc/spamassassin. The system is currently del...
I've searched in the community and Google for this topic. There hasn't been a precise answer.
I wanted to see the spam scores in the mail.log or syslog for Spamassassin running on my Linux server. It used to.
I've looked at files in both /etc/amavis and /etc/spamassassin.
The system is currently deleting spams and infected mails. I'd like to change that behavior.
When I look at the file that should define it (20-debian-defaults), it contradicts the actual behaviour (i.e. spam is actually deleted instead of the configured passed).
I am running Debian distro, Jessie.
Thanks, Caesar.
CaesarS
(153 rep)
Jun 12, 2016, 12:18 AM
1
votes
0
answers
1055
views
Scan outgoing Postfix email for spam with Spamassassin
Is there a way to filter outgoing Postfix email for spam possibly with Spamassassin? I found [this][1] answer about how to do it with Amavis but it's terribly outdated and not very well explained. [1]: https://serverfault.com/questions/126282/postfix-check-outgoing-mail-for-spam
Is there a way to filter outgoing Postfix email for spam possibly with Spamassassin?
I found this answer about how to do it with Amavis but it's terribly outdated and not very well explained.
brickmasterj
(115 rep)
Jan 15, 2016, 10:06 AM
Showing page 1 of 10 total questions