SA + user procmail
Posted: 2005-11-16 17:59
Guten Tag
ich bin seit heute morgen dran, auf einem Suse 9.3 Rechner eine Mailconfig aufzubauen
Postfix
amavis
clamav
SA
user basierende procmail
Ich habe als Anleitung diese hiergenommen:
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
Sowie
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
und
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
Und ich glaube das war schon der Fehler, jede Lektüre macht es fast genauso und auch wieder nicht.
Ich bin ja gerne willig mir alles durch Lesen selber beizubringen und das hat auch immer klasse geklappt, aber hier bin ich am verzweifeln.
Ich habe dann ganz normale System Accounts angelegt mit einer .forward und einer .procmailrc
.forward:
| /usr/bin/procmail
.procmailrc
LOGFILE = /var/log/procmail
:0fw
| /usr/bin/spamc
/etc/init.d/spamd start
Fehlt noch was?
Wenn ich eine Mail einliefere sieht das so aus:
Nov 16 17:52:33 linux postfix/smtpd[6419]: connect from main.domain.org[IP]
Nov 16 17:52:36 linux postfix/smtpd[6419]: 40CF43412B: client=main.domain.org[IP]
Nov 16 17:52:36 linux postfix/cleanup[6423]: 40CF43412B: message-id=<437B63CB.9000007@domain.org>
Nov 16 17:52:36 linux postfix/qmgr[6385]: 40CF43412B: from=<alias@domain.org>, size=1267, nrcpt=1 (queue active)
Nov 16 17:52:36 linux postfix/smtpd[6419]: disconnect from main.domain.org[IP]
Nov 16 17:52:39 linux postfix/smtpd[6427]: connect from localhost[127.0.0.1]
Nov 16 17:52:39 linux postfix/smtpd[6427]: C5DE53412D: client=localhost[127.0.0.1]
Nov 16 17:52:39 linux postfix/cleanup[6423]: C5DE53412D: message-id=<437B63CB.9000007@domain.org>
Nov 16 17:52:39 linux postfix/qmgr[6385]: C5DE53412D: from=<alias@domain.org>, size=1533, nrcpt=1 (queue active)
Nov 16 17:52:39 linux postfix/smtpd[6427]: disconnect from localhost[127.0.0.1]
Nov 16 17:52:40 linux postfix/smtp[6424]: 40CF43412B: to=<web1p1@empfänger_domain.de>, orig_to=<ms@empfänger_domain.de>, relay=127.0.0.1[127.
0.0.1], delay=7, status=sent (250 2.6.0 Ok, id=05559-04, from MTA: 250 Ok: queued as C5DE53412D)
Nov 16 17:52:40 linux postfix/qmgr[6385]: 40CF43412B: removed
Nov 16 17:52:40 linux postfix/local[6428]: C5DE53412D: to=<web1p1@mail.empfänger_domain.de>, relay=local, delay=1, status=sent (delive
red to command: /usr/bin/procmail)
Nov 16 17:52:40 linux postfix/qmgr[6385]: C5DE53412D: removed
Irgendwas scheint damit nicht zu stimmen das die die procmailrc des Users berücksichtigt wird?
Und wie muss es richtig lauten, .procmailrc oder .procmail.rc?
In einem Buch, 2 Varianten :-/
Ich hoffe ihr könnt mir helfen
Grüsse
Thomas
ich bin seit heute morgen dran, auf einem Suse 9.3 Rechner eine Mailconfig aufzubauen
Postfix
amavis
clamav
SA
user basierende procmail
Ich habe als Anleitung diese hiergenommen:
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
Sowie
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
und
http://www.amazon.de/exec/obidos/ASIN/3 ... 72-9086408
Und ich glaube das war schon der Fehler, jede Lektüre macht es fast genauso und auch wieder nicht.
Ich bin ja gerne willig mir alles durch Lesen selber beizubringen und das hat auch immer klasse geklappt, aber hier bin ich am verzweifeln.
Code: Select all
master.cf:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#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 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
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error 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
#localhost:10025 inet n - n - - smtpd -o content_filter=
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}
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 - - n - 2 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes
#
127.0.0.1:10025 inet n - 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_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes
Code: Select all
main.cf
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual, hash:/etc/postfix/virtual_domains
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mail.domain.de
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $myhostname localhost.$mydomain $mydomain localhost
defer_transports =
disable_dns_lookups = no
relayhost =
mailbox_command = procmail -a "$EXTENSION"
mailbox_transport =
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
strict_rfc821_envelopes = no
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client relays.ordb.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client blacklist.spambag.org, reject_rbl_client dnsbl.njabl.org
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
mime_header_checks = regexp:/etc/postfix/mime_checks
content_filter = smtp-amavis:[127.0.0.1]:10024
.forward:
| /usr/bin/procmail
.procmailrc
LOGFILE = /var/log/procmail
:0fw
| /usr/bin/spamc
/etc/init.d/spamd start
Fehlt noch was?
Wenn ich eine Mail einliefere sieht das so aus:
Nov 16 17:52:33 linux postfix/smtpd[6419]: connect from main.domain.org[IP]
Nov 16 17:52:36 linux postfix/smtpd[6419]: 40CF43412B: client=main.domain.org[IP]
Nov 16 17:52:36 linux postfix/cleanup[6423]: 40CF43412B: message-id=<437B63CB.9000007@domain.org>
Nov 16 17:52:36 linux postfix/qmgr[6385]: 40CF43412B: from=<alias@domain.org>, size=1267, nrcpt=1 (queue active)
Nov 16 17:52:36 linux postfix/smtpd[6419]: disconnect from main.domain.org[IP]
Nov 16 17:52:39 linux postfix/smtpd[6427]: connect from localhost[127.0.0.1]
Nov 16 17:52:39 linux postfix/smtpd[6427]: C5DE53412D: client=localhost[127.0.0.1]
Nov 16 17:52:39 linux postfix/cleanup[6423]: C5DE53412D: message-id=<437B63CB.9000007@domain.org>
Nov 16 17:52:39 linux postfix/qmgr[6385]: C5DE53412D: from=<alias@domain.org>, size=1533, nrcpt=1 (queue active)
Nov 16 17:52:39 linux postfix/smtpd[6427]: disconnect from localhost[127.0.0.1]
Nov 16 17:52:40 linux postfix/smtp[6424]: 40CF43412B: to=<web1p1@empfänger_domain.de>, orig_to=<ms@empfänger_domain.de>, relay=127.0.0.1[127.
0.0.1], delay=7, status=sent (250 2.6.0 Ok, id=05559-04, from MTA: 250 Ok: queued as C5DE53412D)
Nov 16 17:52:40 linux postfix/qmgr[6385]: 40CF43412B: removed
Nov 16 17:52:40 linux postfix/local[6428]: C5DE53412D: to=<web1p1@mail.empfänger_domain.de>, relay=local, delay=1, status=sent (delive
red to command: /usr/bin/procmail)
Nov 16 17:52:40 linux postfix/qmgr[6385]: C5DE53412D: removed
Irgendwas scheint damit nicht zu stimmen das die die procmailrc des Users berücksichtigt wird?
Und wie muss es richtig lauten, .procmailrc oder .procmail.rc?
In einem Buch, 2 Varianten :-/
Ich hoffe ihr könnt mir helfen
Grüsse
Thomas