Ik zit met het volgende probleem:
Wanneer er local mail wordt verstuurd van een local user naar een local user wordt deze mail gebounced naar de postmaster.
Als ik dus als root of een user met mailx een mailtje stuur naar {$username} of {$username@hostname.domain.nl) wordt deze mail gebounced naar de postmaster. Zie onderstaande maillog + gebounced mailtje.
Ik weet waar het naar alle waarschijnlijkheid aan ligt. De config die ik gebruikt is namelijk postfix (zie mail.cf + master.cf) + cyrus imap + amavis-new + dracd.
Het gaat waarschijnlijk fout bij locale mail die gefiltert wordt door amavis. In de maillog en het gebounced email hieronder zie je de foutmelding : "([localhost]: Name or service not known)" deze [localhost] slaat op de regel "content_filter = smtp-amavis:[localhost]:10024" in de main.cf van postfix. Ik heb al van alles geprobeer maar ik zie door de bos de bomen niet meer ;-)
Waarom wordt mijn locale mail niet afgeleverd maar gebounced naar de postmaster?
Wie kan mij helpen met dit irritant probleempje...?
maillog
gebounced mail
main.cf
master.cf
Wanneer er local mail wordt verstuurd van een local user naar een local user wordt deze mail gebounced naar de postmaster.
Als ik dus als root of een user met mailx een mailtje stuur naar {$username} of {$username@hostname.domain.nl) wordt deze mail gebounced naar de postmaster. Zie onderstaande maillog + gebounced mailtje.
Ik weet waar het naar alle waarschijnlijkheid aan ligt. De config die ik gebruikt is namelijk postfix (zie mail.cf + master.cf) + cyrus imap + amavis-new + dracd.
Het gaat waarschijnlijk fout bij locale mail die gefiltert wordt door amavis. In de maillog en het gebounced email hieronder zie je de foutmelding : "([localhost]: Name or service not known)" deze [localhost] slaat op de regel "content_filter = smtp-amavis:[localhost]:10024" in de main.cf van postfix. Ik heb al van alles geprobeer maar ik zie door de bos de bomen niet meer ;-)
Waarom wordt mijn locale mail niet afgeleverd maar gebounced naar de postmaster?
Wie kan mij helpen met dit irritant probleempje...?
maillog
code:
1
2
3
4
5
6
7
8
9
10
11
| May 17 09:29:19 hostname postfix/pickup[32348]: 7A571C4A: uid=0 from=<root> May 17 09:29:19 hostname postfix/cleanup[2023]: 7A571C4A: message-id=<42899D4F.mailx1K41630NP@hostname.domain.nl> May 17 09:29:19 hostname postfix/qmgr[14605]: 7A571C4A: from=<root@hostname.domain.nu>, size=421, nrcpt=1 (queue active) May 17 09:29:19 hostname postfix/smtp[2025]: 7A571C4A: to=<username@hostname.domain.nl>, orig_to=<username>, relay=none, delay= 0, status=bounced ([localhost]: Name or service not known) May 17 09:29:19 hostname postfix/cleanup[2023]: B7B0BC4B: message-id=<20050517072919.B7B0BC4B@hostname.domain.nl> May 17 09:29:19 hostname postfix/qmgr[14605]: B7B0BC4B: from=<>, size=2158, nrcpt=1 (queue active) May 17 09:29:19 hostname postfix/qmgr[14605]: 7A571C4A: removed May 17 09:29:20 hostname postfix/pipe[2028]: B7B0BC4B: to=<username@localhost.domain.nu>, orig_to=<root@hostname.domain.nl>, rel ay=cyrus, delay=1, status=sent (hostname.domain.nl) May 17 09:29:20 hostname postfix/qmgr[14605]: B7B0BC4B: removed |
gebounced mail
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| This is the Postfix program at host hostname.domain.nl.
I'm sorry to have to inform you that your message could not be
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 Postfix program
<username@hostmain.domain.nl> (expanded from <username>): [localhost]: Name or
service not known
Reporting-MTA: dns; hostname.domain.nl
X-Postfix-Queue-ID: 7A571C4A
X-Postfix-Sender: rfc822; root@hostname.domain.nl
Arrival-Date: Tue, 17 May 2005 09:29:19 +0200 (CEST)
Final-Recipient: rfc822; username@hostname.domain.nl
Original-Recipient: rfc822; michiel
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; [localhost]: Name or service not known
Subject:
test
From:
root@hostname.domain.nl (root)
Date:
Tue, 17 May 2005 09:29:19 +0200
To:
username@hostname.domain.nl
test |
main.cf
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
mydomain = domain.nl
myhostname = hostname.domain.nl
myorigin = hostname.domain.nl
mynetworks = 10.1.0.0/24, 127.0.0.0/8, btree:/etc/postfix/dracd
relayhost = smtp.tiscali.nl
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_spool_directory = /var/mail
mailbox_transport = cyrus
fallback_transport = lmtp:unix:/var/lib/imap/socket/lmtp
smtpd_banner = $myhostname ESMTP $mail_name
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
mailbox_size_limit = 0
message_size_limit = 10240000
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated,
check_client_access btree:/etc/postfix/dracd
reject_unauth_destination
# check_relay_domains
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/certs/server.pem
smtpd_tls_cert_file = /etc/postfix/certs/server.pem
smtpd_tls_CAfile = /etc/postfix/certs/server.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
content_filter = smtp-amavis:[localhost]:10024 |
master.cf
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| # ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 2 smtpd -o content_filter=smtp:[127.0.0.1]:10024
#smtps inet n - n - 2 smtpd -o smtpd_tls_wrappermode=yes -o content_filter=smtp:[127.0.0.1]:10024
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -o smtpd_etrn_restrictions=reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
#tlsmgr fifo - - n 300 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
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
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
localhost:10025 inet n - n - - smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
smtp-amavis unix - - y - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-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 |